• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Page-centric design vs Servlet-centric design

 
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?
 
Marshal
Posts: 67418
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Marshal
Posts: 67418
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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!
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • 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.
 
Let nothing stop you! Not even this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic