Win a copy of Head First Agile this week in the Agile forum!
    Bookmark Topic Watch Topic
  • New Topic

Design Patterns in the JavaServer Pages Book?  RSS feed

 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Report post to moderator
As far as I see in the TOC of the book, I can't find any chapter discussing about the design patterns... Is there any section in the book that discusses about the design pattern that JSPs are involved in(in the view of MVC)???
Or is it intentionally omitted? But I doubt that chapter-18 is related to this... Is it explained in that chapter?
Thank you...
 
Hans Bergsten
Author
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Report post to moderator
Originally posted by Ko Ko Naing:
As far as I see in the TOC of the book, I can't find any chapter discussing about the design patterns... Is there any section in the book that discusses about the design pattern that JSPs are involved in(in the view of MVC)???
Or is it intentionally omitted? But I doubt that chapter-18 is related to this... Is it explained in that chapter?
Thank you...

Ko Ko Naing,
I believe I answer this one in
this thread. Part I is an intro to HTTP, servlet containers and contexts, and to JSP. Part II is about all JSP and JSTL features, using only JSP pages, Part III is about how to use JSP with other J2EE technologies.
However, "model 2", or the Model-View-Controller pattern as I refer to it, doesn't really apply only to the servlet/JSP combo, so I'm not saying that Part II is "model 1" and Part III is "model 2/MVC"; even with just JSP pages, you can use an MVC design, where some JSP pages are Views and others are Controller (they forward or redirect to View pages afte doing some work), and beans are used as the Model. So even in Part II, I use an MVCish pattern, to make it easier to migrate to a servlet/JSP combo later if needed.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please reference the topic Mr. Bergsten linked to in his reply.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!