• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sticking to the standard?  RSS feed

 
Dave Salter
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In JSF, there seems to be different ways (depending upon the implementation of JSF) of accomplishing the same task. For example, I believe the RI, MyFaces and ADF Faces all provide different ways of displaying tabular data within a page.

I presume everything that is in the RI is available in all other implementations (assuming the same version)

I'd like to ask the authors of "JSF: The Complete Reference" what they think about this. Is it worth just sticking to standard components and using which ever implementation is available on a particular container, or do you not particularly worry about portability?

I'm fairly new to JSF so I'm not sure how many "non-standard" areas there are that are different from the RI.
 
Chris Schalk
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If by sticking to the standard components you mean just using the "Core", and "HTML" libraries that you get from the spec. The answer is a resounding no. The spec was written to be a foundation from which vendors and the open source community can then build on top of. So the "standard" components are pretty basic - just buttons, input fields etc.

MyFaces and other libraries greatly increase the power of the Faces developer by providing a more powerful set of components from which to build apps with. The dataTable is a perfect example. The "standard" dataTable does not have paging/scrolling capabilities built into it. Therefore it makes sense to use a more advanced table such as the one with MyFaces or ADF Faces(trinidad).

With regards to compatibility, if the components are written to spec - they will work together. I haven't seen problems mixing components yet.

Hope this helps..
-chris
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Chris on this topic. Sometimes, people suggest if we want to follow with standard we have to use only the "standard" library. This suggestion does not correspond to main JSF concepts.
JSF has a component architecture. It presumes you will use components to build you applications. Each application requires to create unique functionality. The "standard" (i.e. Core and HTML, defined in the specification) libs are not enough to build desire features, so people just start to write a ton of JSPs code around the "standard" component. Such approach follows to "spaghetti" code, that is hardly maintainable, but first of all, you lose the benefits of JSF architecture.

From other hand, I must to say that some component library offered on the market have hidden stickiness. Stickiness itself brings the limitations of enhancing the application in the future.
To avoid it, try to find answers for three questions:
1. Do the components works with "standard" components including form components (the ones that handle input/output)
2. Are components able to work if I change the JSF implementation (even you are not going to do it right now, the answer helps to recognize will you have problems with next next version of the same implementation, potentiality)
3. Can I write and use my own component(s) along with those components

P.S. If you are going to use "new tendencies", such as Ajax, in you application, you might need to find an answer to couple more questions. However, it is another store.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!