Tuesday, April 26, 2005

My Java Faces

At work we use a lot of Java libraries from The Apache Software Foundation. Last week we took a look at MyFaces, which is an implementation of the Java Server Faces specification with some added components that make life easier. While the inner workings of it are still not entirely clear to me, the current impression is that it's like Swing over HTTP. We've started using it in a new project, and it allows us to do some things very quickly, which is good because we're on a tight schedule.

I really like the MyFaces extensions to JSF -- with their help, some complex user interfaces components can be built very easily. I was able to wrap our own generic Data Transfer Object in a very simple DataModel subclass and use it in a MyFaces component that can render sortable tables easily. That required another custom class to implement the sorting, which delegated it to a Data Access Object, and the actual sorting was done in SQL.

No comments: