• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

From where do you start a J2EE Project

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I was not sure where to post my message and so posted on this forum. I want to learn and start working on a J2EE project, does anyone who has worked on j2ee projects let me know how would one start a project. Let say a medium sized web project on j2ee. Where do really start? Do to design the views first, or controller logic other than settings up the development and deployment environment's. Also I will really appreciate if anybody could point me to any references(websites) or good books which would show how to start a j2ee project and what the general path is OR maybe show a good example of a pretty good J2EE project from start(design) to end(build and implementation)? I know any software development path is not linear, but i am pretty sure there is a standarized way to start your work. I have the KB book, but i want get my hands dirty on servlets and JSP's by DOING SOMETHING.

Thank you everyone for your replies
Kitz
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kitty, I've been working as a J2EE software engineer for a couple of years, and this is how the projects usually go:

1. Business users and analaysts get together and discuss what they need the product to do. A list of requirements is drawn up and this becomes the requirements document, e.g. application must provide the facility to edit the text on the following web pages... application must prevent unauthorized access etc. It is also common at this stage to consider the usage/load requirements,development time involved, necessary hardware, support requirements and hence budget available to meet these needs for the forseeable future

2. Using the requirements document the business analysts and UI designers come up with a set of screen shots (often a demo too using dynamic HTML) that show how the application will look and feel, and what the inputs and outputs will be, where the data comes from, and where it goes after the various use cases are complete

3. Using the information from step 2 (this is where I come in!) a detailed design document is drafted. The document first describes the high level architecture, technologies and hardware involved. Next it will specify exactly how all the pretty screen shots will work behind the scenes (through UML sequence, class, and activity diagrams). The UML will explain what exactly happens from the moment a request is received to the time the response is committed. Decisions about every layer of the application must be tied down, such as how is security handled(is there an LDAP server we authenticate against, will we use ceritificate-based encryption), how will DB access be achieved(with a framework like Hibernate maybe, or a straight coded DAO pattern), how will logging take place/what will be logged(Log4J, commons logging), how will the application be configured/initialised, how will input validation occur(commons validator), how will the views be rendered(JSPs, tag libraries), what design patterns are going to be employed etc. etc. etc. The most common patterns I use are the MVC(a la Struts),Session Facade(Sessions EJBs),DAO(Entity EJBs),Value/Transfer Object,Service Locator,Template,Abstract Factory. If any of the design seems unfeasible, we may need to go back to the end user and ask if they really, really need a particular piece of functionality

4. The design document is reviewed by a panel of experts external to the project, and if it passes...

5. Coding begins: the framework is put in place, some prototype code is written to ensure all the layers work individually and are happy with each other, and then coding of the use cases begins. I would usually write the JSPs first (hopefully the CSS files would be provided), then write the Struts action classes, then any DB access code. After each logical module of code is complete, it is unit tested using one of the extensions of JUnit (usually StrutsTestCase for the front end, or Cactus for testing EJBs). Throughout coding there will be communication with the end users to clarify anything that needs more detail

6. When all the code is complete and satisfactorily unit tested (does it do everything we said it would, and in the way we said it would do it?) The application is deployed in a Systems Integration Testing environment where it is picked apart by a QA team. Any bugs thrown up are fixed (if possible) by the coders, and after SIT, it is passed to the end user for the final stage of testing. Hopefully by this stage they like the application and don't demand any extra functionality that they allegedly asked for at the beginning. They usually will make some ridiculous claims at this stage, so it's best to get everything in writing all the way through!

7. Oh yes... someone has to support the application in case anything goes wrong when it has been deployed to the production environment. Hopefully that person isn't me!

Hope this gives a bit of insight - as for a complete example, it would be unusual to find one freely available because it's a lot of work to produce a "medium" sized J2EE project and people need to protect their investment. I'm sure some smaller complete examples are available in books...
[ January 19, 2005: Message edited by: Fletcher Estes ]
 
Kitty Dayal
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you sooo.... much for the reply. Really appreciate it.

The DHTML thing that you suggested, how do you do that. Do you have to design the HTML pages to do that?


show how the application will look and feel, and what the inputs and outputs will be, where the data comes from, and where it goes after the various use cases are complete


What is the fastest/easiest(less time consuming) technique that i could do to do the above quote. (I know how to write the use cases, but i dont want to spend real-time designing HTML pages which i suspect will be changed in the future)

I have couple of questions. Some of the ascepts you mentioned like struts framework, EJB etc. I am not actually using them. All i am building is a JSP/servlet based web application with some swing components, not a business one, though its a commercial app.
Is it must and should that we use these technologies OR

Is it still powerful if i build it with JSP/Servlet on MVC architecture with some back-end. What are the pro's and con's.

Finally i am using Net Beans4.0 as my IDE (i took it because it has some swing tools that are pretty good and easy to use). What do u use? and what's your take on that?

Thank you again for your replies
Kitz
 
Fletcher Estes
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the DHTML, you will need to write HTML code, CSS files and JavaScript. You may find it faster to throw something together in Dreamweaver - it just depends on your preference. The user will be able to click through one static .HTML page to the next, get to see client-side validation (eg. pop-up boxes like: 'User ID is required'), and be presented with dummy data that looks like the type of data drawn from a database. This is how you achieve the look and feel, and it is a bit of work to produce the demo, but it's much faster than actually writing the application. Keep in mind that you don't have to do any of this, but if your customer wants to see what they will be getting ahead of time, it's a great technique. If you suspect the HTML will change in the future, it doesn't matter - it's easy to change, and anyway the customer will have agreed on something at the start.

As for the data: you need to document what DB tables and fields in those tables are used to produce any dynamic content on the JSPs (eg. the text box customerID is populated from CUSTOMER_TABLE.CUST_ID) and also specify where any user-entered data will be stored when they hit 'Submit' or whatever.

People use technologies like Struts and EJBs because it makes application loosely coupled (altering one part does not affect any other part) and highly extensible (easy to modify/adapt to new needs in the future). How many of these frameworks and technologies you use depends on the size of the application, and your future needs. I would recommend Struts over developing your own MVC model if your application caters for more than 5/6 use cases. It introduces rigour and consistency into your design and will reduce development time (once you learn it), while also externalising as much as possible to XML files. How do you intend accessing the DB?

I use Eclipse 3.0 for development - it's second to none.
 
Kitty Dayal
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fletcher,

Really appreciate your replies. Well I dont know, we are developing an application for my school. we want to introduce online course management, web-based courses which would let students to take courses, view grades, all that. And faculties to see their students data, upload a file for a class, generate reports etc. Its not businiess related, no buying/selling and i am new to struts. I have done couple of projects using JSP and servlet technology with MVC and lot of swing/POJO stuff, but not struts or EJB's. Obviously it will have more than 5/6 use cases.

Do u think, with your level of experience, application of such dimension would be well based on JSP/servlet technologies with some back-end/XML.

If u think going struts framework way would be better, can u suggest some resources that u think are good(books/links).

I guess for the DHTML, i would have to come up with some static fancy HTML pages to satisfy people here .

Thank you soo much,
Kitz
 
Fletcher Estes
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your project sounds like a perfect fit for Struts. Here's a good step-by-step guide. The best book I've read on Struts is Programming Jakarta Struts. Also there's reams of info from the horse's mouth.

You need to think about where you're going to store your data (here's good) and how you're going to access it. Straight JDBC access is outdated and difficult to work with - take a look at some alternatives (out of which I'd recommend Hibernate).

The best thing about all of this is it's free!

[ January 21, 2005: Message edited by: Fletcher Estes ]
reply
    Bookmark Topic Watch Topic
  • New Topic