On Mon, 10 Nov 2008 09:22:52 -0500, Lew wrote:
> jagadesh wrote:
>>> i am not saying about the development of framework like spring or jsf.
>>> but wht my exact requirement was i am developing a Web Application. i
>>> want a way to develop a architecture for the application.i am sorry if
>>> i asked a wrong question [ for architecure i asked for framework] . so
>>> please help in deeloping an architecture for my web application
>
> Amit Jain wrote:
>> pro-apache-struts-with-ajax book can help you.
>
> Struts is a decent framework but not necessarily the recommended option.
> If you do want Struts, go to struts.apache.org and read their docs
> before buying a book.
>
> jagadesh, look at Sun's "Model 2" architecture (search the java.sun.com
> site), an implementation of "Model-View-Controller", or "MVC". (GIYF
> and WIYF.) Struts implements Model 2. The newer Java Server Faces, or
> JSF, is a more complex and powerful MVC architecture. Sun has a
> reference implementation, and myfaces.apache.org also has an excellent
> implementation.
>
> First and foremost, get used to this pattern, the heart of web-app MVC.
> Use JSPs for the presentation, i.e., screens, the whole screens and
> nothing but screens. Include no Java code, or "scriptlet", whatsoever
> in the JSP. Instead, use the JSP Standard Tag Library, JSTL, possibly in
> conjunction with either Struts or JSF tags. Put your business logic in
> "plain old Java objects", POJOs, invoked by the JSPs via those tags.
> Put absolutely no visual elements in the business logic. Separate
> database-aware logic into its own "back-end" layer. For plain JSP MVC,
> you will write one servlet called a "controller" (the "C" of "MVC") to
> coordinate between screen submissions, business logic, and selection of
> the next screen at each point.
Adding to the above, be aware that one common replacement for JSPs in the
view layer is Facelets. I'll point you to this article: http://
matthiaswessendorf.wordpress.com/2008/02/29/custom-jsf-components-with-
facelets/ I myself am sold on Facelets rather than JSP.
AHS
|