Hello there,
What would be a good design to choose for developing a simple web application based on Servlets without using any of the available frameworks (struts, jsf, etc)?
By *simple* I mean there are no extensive validation for example, althougt some basic navigation rules do apply.
Thanks in advance
-
Servlet Design (3 messages)
- Posted by: Markos Charatzas
- Posted on: March 16 2004 09:04 EST
Threaded Messages (3)
- Why use Java if you're not going to use a framework or.. by Kris Thompson on March 16 2004 13:16 EST
- Simple MVC by mo cheng on March 17 2004 04:39 EST
- Consider Using Separate JSP Pages for Each Role by Syed Ali on March 17 2004 16:23 EST
-
Why use Java if you're not going to use a framework or..[ Go to top ]
- Posted by: Kris Thompson
- Posted on: March 16 2004 13:16 EST
- in response to Markos Charatzas
Why even use Java if you're not going to use a framework or MVC? Consider Php, Groovy, Ruby. I assume you are not going to use a framework because you don't have time to learn on right? There for use a language to help you get the hack done quickly. Now if you don't know any other "quicky" language than maybe you need to make the time to either learn one or (preferred) use a framework. If you choose the right one than it really isn't that hard to learn
Kris Thompson
www.frameworks-boulder.org -
Simple MVC[ Go to top ]
- Posted by: mo cheng
- Posted on: March 17 2004 04:39 EST
- in response to Kris Thompson
For small simple web applications with several dynamic pages, it is unnecessary to use framwork. You can take advantage of the Requestdispatcher.
One servlet acts as controller and "forward" request to particular jsp page according to the attributes of the request. JSP acts as View.
This is a very simple MVC model.
However, if your application will bloat in the future, you'd better use framework as early as possible. -
Consider Using Separate JSP Pages for Each Role[ Go to top ]
- Posted by: Syed Ali
- Posted on: March 17 2004 16:23 EST
- in response to Markos Charatzas
Hi,
for a simple application splitting the functionality between many components or using a complex framework is overkill. You can stay close to the MVC model and use separate JSP pages for the UI and nonvisual parts. Each application operation would (such as viewList, viewDetail, validateUser, purchase, etc) map to a separate JSP.
The application is easier to maintain and the business logic implementation can be replaced with a Controller servlet and/or Action classes (like in the J2EE Blueprints or Struts at a later date).