|
Finally! Sun is opening up about what JSF
is.
My initial impression is: It is no
threat. Sun can never admit that it's made a mistake, and keeps layering
kludges and hacks on earlier kludges and hacks in an attempt to set things
right.
I've downloaded the early access release and am
working through the docs and examples. If anything, they seem to have
cribbed some ideas from Tapestry (at least, some of the more obvious ideas) ...
for example, I've seen that they have a ResponseWriter class that has additional
semantics for elements and attributes, just like Tapestry's IMarkupWriter.
Probably just folks coming up with the same solution independantly.
The FacesContext is very similar to a merge of
IRequestCycle and RequestContext.
Based on what I'm seeing, JSF needs to construct a
"component tree" dynamically for each request; big questions are: can it
handle loops inside of forms the way Tapestry can? Part of this is based
on the user creating a "compound" component id (i.e.,
"/login-form/user-name-field") ... the kind of thing Tapestry does
automatically, to any depth ... my best guess is that the developer is
responsible for doling out uinque component ids if loops are
employed.
I suspect that this "tree building" is fairly
equivalent to the rewind phase used by the action service (and when rewinding
forms using the direct service).
The server side interview talked about avoiding
session bloat but had no specifics. Tapestry avoids session bloat by
storing just the persistent properties of pages in the HttpSession ... and those
tend to be few and far between. It also has good facilities for storing
objects in hidden form fields or encoded into URLs.
There is a kind of image component that requires a
URL ... I don't think that JSF handles Tapestry's concept of assets, especially
private assets (one of the key concepts for easily distributable reusable
components).
Of course, you have typical JSP tag cruft all over
your JSP. Hideously ugly ... hard to follow, gives me a
headache.
Basically, take everything you don't like about
Struts and bump the complexity up a few levels. Thank you,
Sun.
Obviously, nothing like the Inspector. Didn't
see an (easy) way for a component to have its own template ... it seems to be
based on a more Swing like model, where components delegate to some kind of
"RenderKit" which means that skinning is easy but getting anything real
accomplished is hard.
Their best demo, "cardemo.war", is pretty
underwhelming. Ugly, awkward. I tried to enter my Zip code "02474",
it got converted to 2474 and was rejected as being "Under 10,000".
Certainly, nothing as cool as ValidField going there.
I had worried that Sun would create something not
good, but good enough. I'm no longer worried. Tapestry is literally
light years beyond JSF ... and works with much older JVMs and servlet APIs to
boot.
Well, it 1am here and I should catch some
sleep. More tomorrow. I'll be posting something a little less rabid
to the server side as well.
|
