Jefferson: Separation of Presentation and Content

Like Thomas Jefferson advocated a “wall of separation between church and state”, the Jefferson add-on attempts to let you create a clean separation between presentation and content in your Vaadin app.

Jefferson lets you define a content hierarchy separately from your business logic and then lets you render this content with any presentation you like. Your content defines only the semantic structure of your app on screen, while the presentation gets to decide exactly what Component implementations to use and how to initialize them. The behavior of your app is then left up to your business logic.

Vaadin Directory link

Jefferson add-on: separation of presentation and content for your Vaadin app

I just released the 1.0.0 Beta version of the
Jefferson add-on
. Check out the
demo project
for a complete example of how to use it. You can see the result running live at the
online demo

I added another, simpler example to the demo project: a Jefferson conversion of the
Simple Address Book
. You can check it out over here:

I just released a new version of the Jefferson add-on:


Added the Control class, which is a View that provides an easy way to register a listener to its rendition.
Refactored the convenience classes in the .content package to extend the new Control class.
All renditions now get a generated style name, enabling easier CSS styling out of the box.

Get it while it’s hot!

Introducing the SmartPresentation!

Just one simple line of code like this

setMainWindow(new Window(“Address Book”,
new SmartPresentation(Orientation.HORIZONTAL).visit(
new SimpleAddressBookView())));

[/code]will automatically lay out any content you can throw at it in a reasonable way on the screen, without you having to worry about the details.

Try it out and let me know what you think! :slight_smile:

Feature requests and bug reports welcome at
Jefferson’s issue tracker