Is JavaServer Faces making to your development experience easier at the expense of your end users experience?
And that assumes that you agree that it’s making your development experience easier.
As you may have guessed, the new project I’m working on uses JSF as the presentation framework. Having recently completed a project using Struts 1.2 and Tiles with a sprinkling of AJAX, I feel like I’ve travelled back in time.
Specifically, I feel like I’ve travelled back to a world where I’m using ASP.NET WebForms 2.0 and C# to create an entirely postback driven, full page reload user interface. JSF 1.2 is newer than the WebForms 2.0 however it doesn’t feel like the JSF specifications have learned any lessons from the WebForms experience.
On this new project, I’ve had need of a tree component for displaying some hierarchical data. Thankfully (or so I thought) there were a few available from different libraries. My choices were somewhat limited by the desire (directive) not to import an entire new JSF component library for a single component. Imagine my horror to discover that for the available tree components, expanding each level in the tree caused a full page reload!
This was the default behavour of the component, the alternative was to load the entire tree structure’s data and send it through with the initial page load. The former was unappealing for the user, the latter was equally unappealing for both the unnecessary load on the database and the slow load time for the page.
After attempting to bend the component to my will, I ultimately created my own with the combination of JSTL, Prototype.js and a little AJAX. Now, it serves the purpose nicely but reinventing the wheel is something I’m generally opposed to and I feel that in creating this component for myself, JSF has not delivered its value either to me or the end user.
This is tree component just is just one way in which that JSF is failing to deliver on its promise to me. This project like every other has budgetary constraints, so perhaps some of the proprietary JSF implementations have more to offer and perhaps JSF 2.0 will address some of these concerns.
For this project specifically, JSF 1.2 is another EE5 technology that has been shoehorned into a EE 1.4 Application Server. The rationale for making this choice seems sound, JSF is a standard, there are multiple implementations offering a lot of choice, there should be many developers with a JSF skill set, making recruitment easier.
However, for all this the goal of the project is to create a Rich Internet Application that provides a quality end user experience and to my mind JSF has failed to deliver on this for us.