File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes If one has to develop a servlet/jsp appln. from scratch... :-) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "If one has to develop a servlet/jsp appln. from scratch... :-)" Watch "If one has to develop a servlet/jsp appln. from scratch... :-)" New topic

If one has to develop a servlet/jsp appln. from scratch... :-)

maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Hi everyone,
This may be a general question. Still I like any help and ideas from you all.
Assume that we are handed over a requirement for a web application. The requirement says
1.There will be users all over the world for our application.
2. They will use our system to store and retrive data
3. The system has to send mails automatically for every so and so dates to so and so users.
4. We decide to develop the application using java, servlets,jsp,jdbc, and a database at the backend
What I like to ask is what are the basic steps we need to take to make this project as a wokable one. In other words, how do we go about developing a simple/moderate/complicated servlet,jsp application. What are good steps in the design, development, testing and deploying on a moderatly complicated servlets web application.
To make it more clear, I can identify the various servlets needed and their processing, what comes in the presentation part (jsps/htmls) and the java beans (busines logic) and view beans for the jsps part. But before we go into coding what are the NECESSARY PROFESSIONAL GROUND WORK we need to do so that the code will be easy to write,change and maintain latter. How do we keep the design of the whole system for reference so that another person can easily scan the whole system easily and it is easy to hand over the whole project to someone else easily. Do we need to learn UML and design the diagrams first? I want the developing of the application to be a plesant experience rather then first itself jumping into coding and when there is a change and we need to change the code a lot and make our life hard.
I would really really appreciate any help in this regard. I used to develop applications using 'c' language. The following are an overall idea about how I used go about.
1. get the user requirements and make a formal write-out
2. make a paper prototype
3. discuss with the client how the system is going to look finally and the functionalities
4. Design the data base and tables
5. Layout the directory structure of the system and which files are going to stay in which directory
6. Identify the modules and their fns and how they interact and which files they are going to operate with
7. Finally go into coding (developing the modules)
8. Test each module as they are developed seperatly (give the needed data either by hard-coding or from a flat-file which will be given later by other modules)
9. Finally test all the modules together
10. make a setup and install appln to install the system
But here with OO development with java/servlets/jsp etc since I don't have a <i>professional <i> experience yet, I would like to get some help from you all , how you are doing in the <i>real world <i>. What are the IDE/tools we need to learn? Any small tip(s) will be really helpful. Since the web application is going to generate a lot of <i>dynamic content </i> from databases should I first start designing the database and tables first, or the Java classes first. THis is the part I am not comfortable with. If I need to write the design using UML what are the important type of diagrams I should use and keep track as and when the design changes. Rational rose is very costly for me to offerd. Is there any free ,simple, easy UML tools available on the net?
Thank you for reading upto here patiently.
maha anna
[This message has been edited by maha anna (edited September 11, 2000).]
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I suggest that you post this same message at "server-side java", they are more in a general discussion this sort of thing. This forum is, I beleive, more inclined to beginners to intermediate levels.
The URL is:^8@.ee6bdcf
and the moderator of the side is Govin Seshadri, a Jguru who also maintains the JSP&servlets FAQs( quite excellent stuff).
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Thank you Sheik. I have posted in the forum which you have given above. Once again thank you for your help.
maha anna
mohan paladi

Joined: Dec 13, 2006
Posts: 8
hello maha anna,
Since i am working for projects on java since last 6 months
i would like to share some of my experiences.
The first thing i noted from u r post was,
The application is very crucial and critical since it is
web based and involves lot of complexities.
The best thing to tackle such problems is this way go
by the way of software Engineering (i.e SDLC even it is OO).
step1: Get the requirement freezed as early as possible.
this can be done by preparing an SRS document i.e
Software requirement analysis specification.
The highlights of this would be
1) the overall intial data flow of u r project.
2) the tools and technologies to be used.
3) the limitations of the project i.e should define the scope.
4) since it is a web based u should decide at this level wether the project is going to be a 3 tier or n tier , so
based on these and other factors we should need to decide
the servers we would use.
ie. a web server or application server or a web application server.
next step is the design the database ie. wether it should be
object oriented or relational model like wise.
And prepare a component list this will contain the nof
classes(servlets), number of jsp pages, nof html static pages

step 3;
i need not to mention start coding.
hope this helps please send feed back regarding the same,
by rectifying if any errors.
thanks and regards
- mohan
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Thank you very much Mohan for sharing your experiences. I am in the process of learning now. I see your steps definitly helpful. Please give me some time before I can even comment on your help.
Once again thank you.
maha anna
paul wheaton

Joined: Dec 14, 1998
Posts: 20972

I always recommend the iterative approach. In this case, I think one week iterations would be good.
First, lets find out what exactly the client has in mind. We want to discuss their business needs first, then try to flesh out what they have in mind for the computer stuff to do.
Since we are working with one week iterations, the total time spent in gathering requirements should not take more than an hour. Just jot them down on paper. Then plan out what you think you can get done by the end of Thursday. Design it using whatever technique works for you, since you are on your own.
Develop the product through Thursday, test on Friday morning and show it to the client on Friday afternoon: "Is this what you had in mind?" Gather more requirements to get you through the next week. On Monday morning start with deciding what you want to accomplish for the week and a little design work.
Repeat until done.
Let's get to work. The requirements you gave are far too broad. What is the problem that we are going to try and solve.

permaculture Wood Burning Stoves 2.0 - 4-DVD set
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Overview :
ABC company has clients all over the world. This company runs its business like this. For each country it has its own company like USA-ABC / UK-ABC / Japan-ABC / AUS-ABC. In each country there are 1...n Regional Managers (RM). Under each Regional Manager, there are 1...n Account Managers (AM). Under each Account Manager there are 1...n employees working for a particular client. In other words it is like this.

The piece of work the RMs want to automate is this :
Every Monday of a week (weekly report), and every first working day of a month (monthly report) all RMs have to send a report on resources to the Accounts Department. The report has 3 sections.
Weekly/Monthly report consists of
1. List of all RELEASED employees
2. List of all NEWLY JOINED employees
3. List of all CURRENT employees
At present what is happening is, all AMs under a RM send their own resource list every week through emails. The RM has to sit and check if there is any error manually and create a consolidated ,new list of RELEASED/NEWLY-JOINED/CURRENT list of employees Accountwise ,for that week/month (or for a given peiord) manually and sends the final report to the Accounts Department's email id.
Requirement :
The RM sees the error correction and making the weekly and monthly report manually is painful. Also receiving all the inputs from AMs THROUGH EMAILs also makes him unhappy. Sometimes the mail gets lost or delayed etc. He wants to automate his work. He wants to make the work done through on-line. He wants all AMs use the web-appln and enter the resource list and wants the AMs to take ownership of their database of resources and he, the RM just wants to make a report OUT OF THE AMs resourse list for the week/month and send the report to the Account department 'just by a click of a button'.
Thank you very much Paul for asking. .

maha anna

[This message has been edited by maha anna (edited September 23, 2000).]
paul wheaton

Joined: Dec 14, 1998
Posts: 20972

I would first write up scenarios of people using the system. Not too much detail, but get the idea of how they envision the processes working. Maybe even mock up some static web pages.
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Thanks Paul. May I borrow sometime before we discuss further.
maha anna
I agree. Here's the link:
subject: If one has to develop a servlet/jsp appln. from scratch... :-)
jQuery in Action, 3rd edition