This post originated from an RSS feed registered with Agile Buzz
by Dominik Wei-Fieg.
Original Post: More fun with JSF
Feed Title: Ars Subtilior
Feed URL: http://typo.ars-subtilior.com/articles.rss
Feed Description: Finest Handmade Code
Random thoughts about agile software development as an art
I’m getting into the flow of JSF at last. OK, flow might be too big a word, maybe it’s more like walk or stumble, but I’m diverting.
My official work these last days has been the creation of a generic component for CRUD operations in JSF, something that is fed with an interface or an class, configured and which then provides views for CRUD operations, lists and Searching and a controller which delegates the work of providing the right instances to a middle tier.
Such a component comes in handy when you have a huge domain model and need CRUD functionality for all domain classes. Sure, it is possible to generate the backing beans and views, but as long as the domain model is still a moving target, you need to regenerate those beans and classes each time a property or association is added to or removed from one of the domain classes. The company I’m working at has profound knowledge of everything that has to do with generation, but we also know that there are situations in which you can simply overdo things (the old problem that to someone who owns (only) a hammer, everything is a nail).
So we decided on a component which does the heavy lifting in this case. We will (most likely) still generate the classes needed to configure the crud component for the different domain classes, but after that we are not forced to touch the views or the backing bean when the domain class changes.
Maybe I’ll come back to write some more about this later on.