JSF, Icefaces and custom components experiences
I got the task to evaluate the new web-frameworks in the company I work for. There were many candicates that might enhance the web user interface and move away from the old struts framework. If you want to know some of my experiences, just read on..
Google web toolkit ?
I had some JSF experiences before, but since that time many things have changed. Today there is a whole variety of 'rich' components and frameworks that provide much better user experience than the old plain JSF HTML renderer.
Icefaces is one of the solution that combines both. It lets you to use the power of JSF and the AJAX together.
AJAX bridge works that way, that it partially updates only the part of the application that has changed.
There are also some other amazing features like the partial form submission (validates your form right after you fill the value in the input field).
Another neat feature - Validators
You can attach to eg. input field any kind of validator you want. There are some pre-defined, like LengthValidator, DoubleRangeValidator, etc.. And if it's not enough, you can write your own.
I saw some custom validators around the internet - eg. the regular expression validator, and many others.
What about custom components?
Even though you are using many of components that comes with the icefaces framework and the JSF, it may happen that you will need to write your own component.
It took me some time to get into it, but after that I must say that it's quite easy. You can generate the forms, form fields, panel grids, data tables, etc.. on the fly ! This is the most powerful feature. This way you can have the component that is absolutelly dynamic.
Unfortunatelly, in every tutorial I read, renderers are using the HTML-like way to produce the component's output. You had to be the one who writes the HTML tags, but this is not a good idea. For those things we had JSP and other 'low-level' web languages.
I found a way how to use existing components and render them dynamically.
You can react to the user interaction with methods like onClick, onChange.. There are some effects as well. This way you can make your form to 'Appear', fade in, fade out..
Myfaces and tomahawk components
Icefaces provide their own set of rich components, which you can see at
but.. I tried to switch the SUN JSF Reference Implementation (RI) for a MyFaces JSF implementation. The switch was without any problem, you just remove the sun's JSF jars and put the MyFaces .jars there. Myfaces have also better error reporting mechanism, and you directly know what's going on..
I haven't tried the JSF 1.2 yet (it's the new implementation). 1.1 was fine for me, also because it's stable and people have experiences with that.
So.. when I had my web application working on myfaces, I tried to use some of the tomahawk components. Here's the link where you can find them:
Things like callendar, sortable table and other are perfect. There is also a possibility to use the Myfaces Sandbox components. It's the bunch of components "waiting" to get into a set of Tomahawk components. I haven't tried those components with my application yet.
But, the great thing is, that you can use both - icefaces and tomahawk components together. Sometimes I experienced some rendering problems, but I thing it's solvable.
What IDE to choose?
I downloaded a BEA Workshop for JSF, which is a great eclipse-based IDE, but unfortunatelly it's not free. There is a trial version, but after some days you don't have any chance to use this IDE any longer.
I found the solution - there is also a free version but only for JSP. It's called "BEA Workshop for JSP". It doesn't provide as much features as BEA Workshop for JSF, but I'm fine with it. I can live without features like showing you available parameters in the JSF tags, and so on.
Main reason why I use this IDE is that it redeploys your web application automatically. This way you don't have make the process "stop, build, run" manually everytime you make some single change.
Icefaces seems to be the best solution when you want the rich user experience, easiness of use and good code maintability. You can separate the work between the component developer and the web designer and it allows you to use all of the existing libraries and the power of java.
Get the latest freelance project announcements
ExtraWatch™ FREE is Joomla, Wordpress, Prestashop, Magento plugin with following features: Live Stats, Nightly Email Reports, Goals, Graphs, Anti-spam, History and more