• 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
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

J2EE architecture

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
We have created an web based application using JSP and Javabeans. We haven't used servlets or EJBs.
This application is basically a planning tool & which has lots of equations & computations.
Is this a good way of developing an application, or is it necessary that we need to use servlets & EJBs to achieve J2EE architecture.
Since I cannot categorize it as MVC architecture, which architecture does this application belong to, because when I am giving a demo to the client, I should be able to explain them.
Thanks
SJ
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd rather see the "front controller" pattern, maybe using Struts or some other package or building your own. People disagree on whether or not this is MVC, but think about what a few simple rules would do to your code:
* Front controller servlet has no HTML - only Java
* Page generator JSP (view) has no Java - only tags
* Business objects (model) have no HTML, no reference to servlet container, session, request, response, etc.
If your team is big enough to specialize in skills and break up into subteams, front controller with these simple rules help clarify who does what. If you might have multiple front-ends, say XML web services, WAP, fat clients, etc. they improve the odds of using the same business modules. Hope that sparks some good ideas!
 
Ranch Hand
Posts: 8946
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you use MVC it easy to maintain your code. I suggest you to have a FrontController to receive all your requests and then delegate it to some other class for further processiong.
Only only JSP's creates duplication of code and maintenance problems.
You may also like to consider using struts which is based on MVC.
EJB are not required unless you have serious TX, security requirements.
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, forgot to answer your question!
Look up "document view" pattern. Microsoft likes to talk about that instead of MVC. It combines the controller and view as you have done in your JSPs. I've really never looked for literature on it, so can't predict what you'll find. Good luck!
 
SJ Rao
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for all ur replies.
After going thru the knowledge bank of MVC & document/view architecture, looks like my application is page-centric design.
Let me know if my assumption is right.
There is also a feedback in previous queries that page-centric design is not a good way of design, & i totally agree with this.
James :- I found this article about document/view architecture for java
Document/View Architecture[/B]
Java provides a mechanism for setting up a document/view relationship between classes, in which the view classes take full responsibility for controlling the process. The only responsibilities of the document classes are to provide features to support the view classes and to perform a notification operation to signal the view classes when a document object's data has changed in a way that a view object may need to be aware of.
 
Space seems cool in the movies, but once you get out there, it is super boring. Now for a fascinating tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic