UI Scaffolding

Leave a comment

May 24, 2011 by huionn

While learning about Seam Forge which is used for scaffolding in Seam 3, I found an interesting project used for UI scaffolding in Seam Forge – Metawidget.

Ruby on Rails starts the trends of scaffolding for rapid application development. Trails and Grails are Java version of RoR. Besides that, there are Naked Objects and Spring Roo. Some use code generation, the others use runtime UI generation with templates. I used Seam 2 with seam-gen before. It is static code generation based on customizable template. Although it provides good productivity to kick start a project, customizing which fields to show/hide and their sequence are quite tedious.

In comparison, Metawidget seems like an improvement where it supports runtime generation of various front-end technologies (desktop, web and android). I skimmed through its documentation and found that it is quite flexible (such as how to order the fields http://metawidget.sourceforge.net/doc/reference/en/html-single/index.html#section-howto-order).


Edit page and search page will display fields of a bean differently. For example, validation may only applicable on edit page. Luckily, metawidget has flexible design to handle it elegantly –http://metawidget.sourceforge.net/doc/reference/en/html/ch09s02.html. The metawidget can be configured with config attribute:

<m:metawidget value="#{employee}" config="metawidget-search.xml"/>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: