* Contrary to what many people say, I don't find it to be any simpler than
Struts or other frameworks I've looked at.  I have to factor in the fact
that I'm not a JSF expert with this next statement, but I actually find it
to be somewhat *more* complex.  I suspect there needs to be a
differentiation between conceptual complexity and hands-on complexity
though.

Complexity is in the eye of the beholder. Coming to Java from a scripting background (Tcl/AOLserver) I originally embraced the request/response cycle and resented frameworks like JSF that try to hide it from me. But I also see lots of other developers who have worked in Java for years and are new to web development, and have a lot of trouble figuring out what code really is supposed to run whenever they click a button.

So I am starting to warm up to JSF gradually, especially after playing with the MyFaces examples. In some cases, I'm finding that JSF can actually *simplify* things greatly:

- form validation defined inline with the form instead of in some separate class or XML file

- forms with multiple submit buttons: #{bean.foo} and #{bean.bar} is much more obvious than MappingDispatchAction

- pre-populating a form (load object for edit): by having POJO backing beans rather than extending Action/ActionForm, you don't have to manually figure out the right ActionForm subclass to instantiate or the right attribute key to shove the form in request scope with. You just populate "this".

On the other hand, JSF does make doing some simple things hard. Like if you want to be able to bookmark a link to an object like "showObject.do?id=993", clearly a legal GET URL, it's not clear how you would do that (or even if its possible).

So like everything else it's a trade-off. Your cost-benefit analysis is going to depend on your individual app. Personally, I'm just salivating over the MyFaces treeTable plus AjaxAnywhere, because I haven't found a way to get the same widget off-the-shelf with Struts. :-)

-- Bill
--
Bill Schneider
Chief Architect

Vecna Technologies, Inc.
5004 Lehigh Road, Suite B
College Park, MD 20740
[EMAIL PROTECTED]
t: 301-864-7594
f: 301-699-3180

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to