Adib Saikali wrote:
Sean thanks for the insightful reply. You're reply brought up anotherWell I am not Sean, but I have done some work with JSF the last few weeks.
question for me. I am still working my way through JSF I've got my head
wrapped around the mechanics of doing JSF apps (but not writing components).
But I am still don't know enough to see what is missing from JSF compared to
Struts or other existing frameworks? What are the obvious things that are
missing are there any articles or previous posts that get into the details
of these differences?
what is missing (in ;yfaces less than in the standard JSF) is basically controls which cover 99% of all apps and DB glue frameworks which ease/automate the binding into non JDBC bindings - or mappers (Hibernate, JDO you name it), and most of the tool vendors are not currently at the level I would like them to be with their tools.
Besides that, most other problems sort of are html related or related to the fact that the webforms model is very rigid and not very suitable to simulate modern guis.
Besides that the programming model if you have to go down a tad deeper seems to be overly complicated (which partially is caused by the fact that you have to bind the taglib framework together with the faces framework )
I will go into details now about the points I have risen.
To few controls: I am not talking about myfaces here but faces in general (the specs)
Sun as usual only specified the absolute barebone of controls which have to be implemented and then left it open to the vendors to deliver the rest (which did not work out in swing either)
What happens now is that if you go the sun route, you end up shopping for controls, or you bind yourself to a vendor like oracle (whom still does not know what to do with its own controls or ide) or you have to go for myfaces - which is the currently best option given, that it is the only opensource one, the other ones, you dont get source code access to.
Binding to the dataset:
The ideal programming model would be to layout your form specify a query and bind some kind of control to the view. This sort of is done with JDBC which JSF delivers a somewhat not very good implementation of the Datamodel (relies on movable result sets keeps the connection open, which is a nono if you have more than a handful of users)
There is no standardized way to bind the controls (ie works with the datatable only anyway) to non JDBC frameworks. I literally banged my head for days (given that I dont have good internal docs for the thing) trying to figure out how to bind the hibernate to the data table control. Somebody in here gave me the hint how to do it right (thanks again)
There are still a handful of problems with my solution (therefore I have not put it into the wild yet, mainly scope problems) but implementing that stuff is not as easy as it could be.
The programming model:
a) The JSF Specificators omitted a page scope for the beans, you only have session and request
b) There is one big glue file which binds everything together which might be problematic if the site becomes bigger
c) It is kind of overly comlplicated. I am sort of used to get everything delivered in one contex variable (most frameworks do that). JSF has the necessary data variables (request, session etc....) scattered over the Context variables and one or more Singletons within the framework, which is kindof weird.
d) The Custom Control programming although solvable seems to be overly complicated. I have not have it in my head anymore, but in the worst you end up with a taglib descriptor, a tag class, the associated model a control class, a view and a model for the control class (which is already predefined by the framework)
I am not sure if you can cut it down to one taglib class as sort of a model and an associated renderer view class, it might be possible.
d) There are good how tos missing for lower level tasks. Many tutorials end with hello duke or how to bind JDBC to the data table, once you go beyound that it becomes sort of hunting for good documentation.
Despite those problems (my ideal solution would be Velocity with a set of custom controls pushed into velocity and a small framework additonally to it, which does all the stuff jsf does with only 1/10th the effort), I can see the potential of all this.
The main problem is, the tool vendors have to catch up, once you have a good set of data aware controls/data models (like Delphi had ages ago)
good bindings into various ORM mappers in combination with automatication tools and a good visual editor with a good documentation set for lower level stuff, you will end up with a tool you can pump out web applications in hours and not in weeks (given the current state of affairs)
I personally use myEclipse which at least eases writing the glue code. Looked into Exadel, both of them are not there yet.
The Sun Studio you can forget, it only has a lousy set of controls and the idiotic jdbc access with open connections, but it shows at least where things are heading (multiplatform Visual Basic for webapps)
Oracle I have not tried yet, since Oracle does not know what they are going to do with their tool, and I will be at an IBM conference regarding their new tools next week.
The rest (Borland) I have not had a look yet, since I sort of am on a budget here (cannot afford the IBM stuff but, it is interesting anyway).
Sorry for the long comment here, I am sure I am wrong with some aspects, since my Faces experience is not that long. But getting a Mac soon I will check out webobjects as well, since a friend of mine raves about it big time (given the price for the current miniMac this really might be an option since a miniMac+WebObjects costs far less than the license for good tools on the WinTel side).
See that not as a rant, the work the people have put into myfaces is excellent, but I think if you cannot afford the tools and if you cannot afford to put at least several weeks of low level work into it, stay away from it and look for easier options.

