Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

J2EE architecture

 
SJ Rao
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • 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
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • 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!
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • 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)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic