• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Page-centric design vs Servlet-centric design

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic