Java Server Faces - it is worth the trouble?


General J2EE: Java Server Faces - it is worth the trouble?

  1. Java Server Faces - it is worth the trouble? (3 messages)

    Im developing J2EE web applications right now using Struts + String + Hibernate and everything is working great !

    My manager come today and tell me that we have to start using JSF because this is the next big thing ... its a lot o better than struts ... bla bla bla

    I think he has been talking with some IBM sale reps ... and they put all this craps in his mind ....

    Im not and expert in JSF but something feels really bad with it ... so i want to give him some more information ... like ..

    - advantages and disadvantages in relation to struts
    - advantages and disadvantages for the developer
    - advantages and disadvantages for the users

    and any information to support his desicion (hope not to use JSF)

    thanks very much for helping !!


    Threaded Messages (3)

  2. Component orientation is[ Go to top ]

    First of all, I feel bad for you that your manager decides what technology you should use. Unless ofcourse he's a tech regularly joining in on your projects.

    However, I think you should seriously consider switching to a component based framework. The big advantage of working with a component based frameworks, is that you can isolate components, and work with them as if there's nothing else on your page. Compare that to web MVC frameworks like Stuts where you either chain actions or have deeply inherited actions that have to keep track of everything that is happing on a page when your web interfaces get more complicated. A nice thing about component based frameworks is that - finally - you will be able to create/ use really reusable components, just like you can do with Swing etc.

    Now about Java Server Faces. To be honest, they're not my cup of tea. It's good that action was taken to create such a framework, and the drag-n-drop IDE support is nice if you like visual development, but from a programmer's perspective, I don't like it at all (too much JSP, XML).

    You should tell your manager that, allthough he is right that JSF could be a progression for his projects, he should also consider the other component based frameworks, like Wicket, Tapestry or Echo. And while your at it, give it a try yourself, you might just like it!

  3. Java Server Faces - it is worth the trouble?[ Go to top ]

    I don't think that you need to be negative about JSF from the outset, it's actually not that bad, it's just something new :-)
    Here's some somewhat biased thoughts, but I'm happy in both camps here so I'm not blind to the faults of JSF.
    - advantages and disadvantages in relation to struts
    * Struts has a better model for page re-use and tiles support.
    * Struts also has a bunch of other stuff like container security hooks that JSF doesn't have in it's navigation model (yet).
    * No place for setup and handler "Actions" as such in JSF although it's not much to add this using the available extension points and that's exactly what Struts Shale is doing.
    * But, JSF doesn't have to worry about Form Beans! POJO all the way.
    * JSF has a better extensibility mechanism and phased Event model, although the changes underway in Struts with respect to using Chain will lessen that differentiator.
    - advantages and disadvantages for the developer
    * Basically the component model used by JSF makes for much simpler code. Button on screen -> associated Action in code, no request parsing, no LookupDispatchAction to configure and so on.
    * The use of expression language everywhere. You can for instance conditionally display a DataTable by simply using an EL expression in the render property that will evaluate to true or false. No need to wrap the whole thing in a JSTL Choose or something similar, just set the property.
    * The ability to manipulate the UI component tree in Java before the page is rendered, making dynamic pages really simple
    * You don't need to use a GUI IDE to build faces pages - it's no harder than plain JSP if you want to wrire manually, however, because we're dealing with a standard way of defining and binding UI components IDE's can give a lot more help if you choose to use one.
    - advantages and disadvantages for the users

    * It depends on how much time you want to spend right? JSF defines a component standard and you can already see some really rich component sets coming out (e.g. Oracle's ADF JSF components
    There's nothing here you couldn't write yourself, but the question is would you want to spend the time?
    I think that JSF can deliver a richer UI quicker - that's the basic promise of the whole framework.
    * Oh yes and it's a standard.

    Hope that Helps....
  4. A critic view on JSF[ Go to top ]