jump to navigation

JSF and IceFaces April 4, 2008

Posted by Phill in Frameworks.
Tags: , ,
comments closed

I mentioned a couple of posts ago that I was trying out Google Web Toolkit. Well, I’ve come to the conclusion that Google Web Toolkit is not the right solution for this particular project.

The problem was mainly one of scope: I think GWT, due to the way it’s designed, is more for small-to-medium size projects at the moment. The project which I am currently working on is small at the moment, but we will need to integrate various other things with it in the future and it will grow.

I did look at Echo2 as well (thanks to Dalibor for pointing it out to me), and that does look good – more like it would be able to handle larger applications, due to the way the page is loaded – but I don’t think it’s exactly what we need at the moment either.

What we have done is use JSF with IceFaces. IceFaces is a “Web 2.0” framework for JSF, i.e. it provides a set of JSF components which are AJAX-enabled. It was a bit of a struggle to get working with Tomcat 6.0, but I got there in the end!

Anyway, I’ve been using it for a couple of days now and I really like it. The AJAX is handled completely transparently to you – you just design your JSF application as you would do normally, and IceFaces will handle the AJAX. As an example, it’s really this simple to add an AJAX based table to your JSF page:

1. Use an IceFaces “dataTable” component
2. Have an IceFaces commandButton call the backing bean to populate the table with data (for example, search results)
3. The data table is updated automatically without needing a page refresh
4. …
5. PROFIT!

    Ok, I admit it, items 4 and 5 are not part of it. But still, I think it’s pretty good going.

    There is a bit of configuration to do before you start, but then that’s the same with pretty much any framework I know!

    What I’m trying to do at the moment is set up a “Loading” message, i.e. when you click on a button which will execute a long operation (for example, doing a text comparison on a lot of database fields) a loading message will be shown. By default no message is shown, and I can’t find a way of automatically displaying one for every call (ala DWR).

    Google Web Toolkit March 18, 2008

    Posted by Phill in Frameworks.
    Tags: , ,
    comments closed

    First off, in the “other news” department, I’ve started a new job recently. The main application here is based around Java Swing, however we are porting certain parts of it to the web and so I will continue to blog about JEE based things as and when they come up!

    The past day or two I’ve been looking at Google Web Toolkit. It’s a relatively new way of looking at AJAX application development: you develop all the code in Java, which then gets compiled by the Google compiler and translated into JavaScript. There are various benefits to such an approach, including having the type safety of a statically typed language in JavaScript, being able to unit test, that kind of thing.

    From my experiences recently it seems like a very useful tool for certain types of application. I will try and organise my thoughts and blog about it in the near future!