[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Semantics



Hi,

Syntax and semantics being very closely related fields I thought I could post this here. I hope I am not intruding.

I am currently working on a blog file format for BlogEd, a neat and simple client side blog editor. In the process I got interested in the semantics behind the Atom file format. I started off with the Atom-Owl spec from Danny Ayers, but had to transform it into something like the following, in order to be able to represent the evolution of a feed:

JPEG image



Some points of clarification:
- An Entry points to a number of time stamped EntryStates, which allows one to represent the evolution of changes to an Entry. So rectifying a spelling mistake in the title of an entry creates a new time stamped EntryState, for example.
- A Feed points to a header Entry and all the other Entries that constitute the feed. I did this after noticing a simple one to one mapping between Entry, EntryStates and the Atom Feed properties:


        + Feed.title       -> EntryState.title
        + Feed.link        -> Entry.link
        + Feed.author      -> Entry.author
        + Feed.contributor -> Entry.contributor
        + Feed.tagline     -> EntryState.summary

By packaging the info from a Feed into an Entry, we simplify the model and also gain a little, allowing pictures in the header of a feed for example, as BlogEd does.

There are a few other simplifcations that come to mind, and clarifications that are required, in the area of what exactly the Link class is about.

One of the simplifications comes to light when one notices an interesting symmetry between the Feed and the Entry object in the above diagram. Both have contributor and author links pointing to a Person object, and both have a link object. This leads one to the contemplate the following simplified model where the Feed class inherits from the Entry class.

JPEG image



In this model we are thinking of a Feed as an Entry that points to entries which constitute the content of the feed. In the previous model we were thinking of a Feed as a Set of Entries, plus a few other properties. Now an Entry in this second model could never be more than one Feed, and this may be considered a limitation. There may be other constraints that come to light when I flesh out what exactly a Link is.

In the meantime I thought that maybe this may spark off some interesting ideas.

Henry Story
http://bblfish.net/