Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Page-centric design vs Servlet-centric design

 
TD Bartos
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've recently been reading 'Web Development with Java Server Pages' by Fields, Kolb, and Bayern from Manning press. They describe in great detail in Ch. 10 Servlet-centric design and provide a sample program in Ch. 11.

I'm researching re-writing a JSP application, which follows a page-centric design. I'm trying to evaluate the servlet-centric design to see if applying it makes sense for our application. Our application has a high level navigation bar, and very free-form workflows through each of these high level sections. There are connections between the highlevel sections of the application, i.e. deep in workflow navigation in section 2, I can jump with information to section 1. At what point would a single servlet containing workflow logic just become a large unmanageable mess?

Anyone have any real life experiences with servlet-centric jsp application design? What is it good for, and where does this design practice fall short?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65223
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you are describing is the Model 1 vs. Model 2 design patterns. Modern conventional wisdom greatly favors the Model 2 approach. I resist calling Model 2 "servlet-centric" because it really isn't -- it uses servlets and JSP each to their best advantage.

With regards to:

At what point would a single servlet containing workflow logic just become a large unmanageable mess?


the asnwer is: as soon as it tries to do more than one thing.

A Model 2 architecture does not cram all logic into a single servlet. Rather, many individual servlets provide the logic. Perhaps you are misconstruing the Front Controller pattern?
[ February 21, 2006: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65223
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've recently been reading 'Web Development with Java Server Pages' by Fields, Kolb, and Bayern from Manning press.


That's actually a pretty good book, but bear in mind that it's pretty old at this point. JSP and web architecture patterns have come a long way since then.

You might want to locate a more modern reference. And of course, you should start with the JSP Specification itself.
[ February 21, 2006: Message edited by: Bear Bibeault ]
 
TD Bartos
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i've got the second edition of the book (but it's still from 2002).

do you have suggestions for current books?

i've been doing JSP development for about a year and a half now, but have just picked it up kind-of adhoc as i've needed to learn things. I feel pretty comfortable with the language, but much less knowledgeable in how to architect a high level design for our application leveraging JSP's strengths. The chapters on architecting with JSP is what drew me to the manning book.

thanks!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you search this and the servlet forum with keyword "book" or "books" you'll find that there are several threads per week with this question.

There are two or three books that get mentioned in almost every one of them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic