Hi J-People !
I need your advice on technology advance concerning a MVC
thin-client architecture. This message was posted to the Servlet Interest
group as well as to Advanced Java group. I do not like to send the same
message to two different groups but since this concerns both list, I made an
exception :)
So here is the context : we currently have a system which allows
clients to access information contained in an oracle (prior to 8i) database.
The clients access the database through servlets and the response comes in
an HTML form. We call it the Self Service. Maybe this is not very precise...
I will give you an example of how a session is going :
The user connects to a servlet called SS. The SS servlet mostly just
generates a frameset in which different frames are created. The client is
then directed to another servlet called SSResearch. In this new servlet, the
client can perform a search by filling different fields. This request is
sent to the database and the result is formatted in an html table. Some of
the fields in this table are hyperlinks which will take the client to
another servlet (according to what he asked for). This new servlet receives
the information from the hyperlink (doGet), reads the database to get more
information about the topic selected and displays the information, again in
HTML. The client can also set options which are kept in cookies.
Everything is done in JDK 1.1.
Pretty standard isn't it ? Ok, now here is a list of comments about
this architecture :
1 - The are a lot, and I really mean a lot of interaction between the client
and the servlets. The servlets must manage a lot of options and
customization. This makes the code really complexe. It also forces us to
break the MVC rules : since there are a lot of interaction, my predecessor
decided to merge the code that reads the databases (and manage them) with
the code that generates the view (html presentation of the data). The
problem here is that updating the software gets really complicated since the
model and the view are merged.
2 - HTML presentation, even if can be nice and efficient, are not as
professionnal looking as a regular application.
3 - As I said, there are a lot of interactions. But as you know,
interactions between a user and a servlet always ends up by a new HTML page
generation. So for almost every action the client does, we have to go
through a doPost/doGet, and regen another page. This is very annoying.
4 - HTML is limited, and it is pretty hard doing some specific things, such
as formatting an output for printing.
This are a few points I wanted to emphase on.
I proposed to rebuild the application from scratch. I received last week the
credits to do so (about 500 000 $ Can).
1 - The new application will have the following architecture : The servlets
will only be used to query the database and return the output to the view.
The view will be an applet, which will do absolutely no processing on the
data, except some formatting and presentation.
2 - The servlets will be built in jdk 1.1 because we do not want our client
to be forced to update their web server. The Applet will be built in JDK 2
v3 : why ? Because our application needs to do a lot of printing, and, as
you might know, jdk 1.1 and even 1.2 had A LOT of problems with printing,
especially with HP printers. JDK 2 v3 seems to have solved a lot of these
problems. We will use the new Plug-In + signed applet.
3 - The MVC architecture will be strictly respected. As I said, the servlets
will only receive commands, execute them and return the raw answer. The
Applet will just be the front end, the thin-client.
For advanced programmers, you already understand my system quite well with
these infos. It is a very standard application, nothing too tricky : just a
bunch of servlets receiving queries, retreiving info and returning them, and
an applet sending request, receiving data and presenting it.
The thing is that this commercial application is currently used by about 100
000 american employees and about 10 000 canadian employees. It is sold with
our main application, created in C++. These employees and not necessarily
used to computer, which means that the application must be simple and
efficient. As you see, it must be really professionnal.
The Self-Service has avor 40 000 lines of code.
The application has about
Now here are some questions :
1 - Is it realistic to build the applet in JDK 2v3 ? I mean, we will start
working on it in March, so will JDK 2v3 be ready by then to be used for
commercial apps ? Will the plug-In be ready ?
2 - Does anybody have experienced problems using JDK 2 v3 for printing ?
3 - What would be the best way to send info to the servlets and then return,
from the servlets, the ResultSet (JDBC) objects that will contain the data ?
I do not want to use serialization since the servlets will be in jdk 1.1 and
the applet in JDK 1.3.
I am interested in any advice you can give me... This is a big project for
me and I'd like it to be as good as possible :)
Max.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html