Re: Web Application Design Patterns

From: Markos Charatzas (xarm_at_forthnet.gr)
Date: 03/17/04


Date: Wed, 17 Mar 2004 09:51:43 +0200

First of all thanks for your reply. It's good to see that someone read
your post got him thinking. It encourages discussion.

Well, all I'm trying to figure out a general design for a web application
where a Servlet handles all the requests that have to do with either
serving a web page or performing a particular action on a web page.

So the way I'm thinking about it is that every web page has,
1. A context
2. A template
3. Some actions that can be performed to it depending on the context

So for example the Servlet should be responsible for,
1. If a web page is requested then update the context to reflect that of
the web page requested
2. If an action is requested, then send it to the *current* web page to
work it out
3. Finally display the template of the web page

Also the Servlet could handle other things like site navigation.
        E.g. know what to show when a previous (back) web page is requested)

With that in mind, I'm thinking as an initial design to have classes that
represent the web pages, and an interface between them and the servlet.

These are the things that got me thinking...

On 16 Mar 2004 13:44:03 -0800, Michael Scovetta
<nospam_googlegroups@scovetta.com> wrote:

>
> A good design is very dependent on the project goals, scope, time,
> resources, etc. Your question is just too open-ended. At one extreme,
> just write a few JSPs with embedded Java if you're talking about a
> one-page site. At the other, Struts will save you time and effort when
> debugging, expanding, or maintaining your app.
>
> I rely heavily on Jakarta (jakarta.apache.org) for things like
> connection pooling, miscellaneous utilities, validation, etc.
>
> Explain more, and maybe I can give you a better suggestion--
>
> M
>
>
> Markos Charatzas <xarm@forthnet.gr> wrote in message
> news:<opr4yj3rtxlzwgym@news.forthnet.gr>...
>> 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



Relevant Pages

  • Re: Thread safety in Tomcat
    ... >> requests). ... > Tomcat to create a new instance of the servlet when the requests collide. ... SingleThreadModel doesn't magically make ... shared state into non-shared state. ...
    (comp.lang.java.programmer)
  • Re: high through put system
    ... We have a Servlet application that has to process 10K requests per ... You need to be more specific about what is not scaling up and how the throughput is measured. ... It makes no sense to look at CPU or memory utilization if your bottleneck is I/O. ...
    (comp.databases.oracle.server)
  • Re: how to send a stream to servlet doPost
    ... It's two different system, One is java application,other is ... use java send a stringto servlet, ... to servlet, servlet sending responses to java application), or are you ... If your case is option 1)java application sending requests to servlet, ...
    (comp.lang.java.programmer)
  • Re: Web Application Design Patterns
    ... which is a simple web app framework, accompanied by a lot of very clear ... discussion around the design decisions. ... > One of the custom tags, renderTable takes care of tabular data: ... >> where a Servlet handles all the requests that have to do with either ...
    (comp.lang.java.programmer)
  • RE: Need Help with Page can not be displayed form my web service
    ... Thanks Dan. ... I didn't go for submitting and polling because all requests are ... will making the call to web service asynchronous ... > convert this design to a batch that gets kicked off behind the scenes. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)