What is JavaServer Faces?
* A set of APIs for:
representing UI components and managing their state,
handling events and input validation,
defining page navigation, and
supporting internationalization and accessibility.
* A JavaServer Pages (JSP) custom tag library for expressing a JavaServer Faces interface within a JSP page.
vineetb: How does JavaServer Faces compare to ASP.NET in terms of event handling, input-validation, and device independence?
Craig McClanahan: There really isn't time to go into a deep dive on the technical similarities and differences between JavaServer Faces and ASP.NET, but at a high level, both frameworks have similar goals -- and, in many cases, similar functionality. It's important to remember that the details of JavaServer Faces's final design are still being worked out, so the answers to these questions are subject to change, too. Perhaps the best way to approach your question is to look at the support JSF is planning in each of these areas (at least in the current design -- everything is still being refined): (1) Event Handling -- JSF looks at two somewhat different types of events: request events, whose purpose is to change the state and visual appearance of a component, and application events that are primarily focused on invoking business logic. Component classes can have built-in event handling, and external event-handling classes can also be registered. (2) Validation -- As with event handling, components can have built-in validation methods, plus you can register your own validators. There is also support for localization of the error messages, redisplay of the previous input, and so on. (3) Device Independence -- As discussed in a previous response, device independence is primarily a matter of selecting the RenderKit (a library of renderers) you want to use, which gives you the opportunity to render a particular component tree in different ways for different devices.
What about Struts then?

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home