This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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?
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 ]
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 ]
Joined: Mar 29, 2005
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.