Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 20th, 2003, 04:25 AM
Registered User
 
Join Date: Sep 2003
Location: Bangalore, Karnataka, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default MVC Design Issue

Hi
  I am new to designing, I am not able to confirm whether my design explained below is a valid or proper one, should I improve in any other place.

M - Stateless session bean having methods for insert, update, delete, view,

V - Jsps, html, js, images

C - A single servlet for a single JSP

Sample
   addUserGroup.jsp on submit it redirects to UGACtrler populates javabean UsrGrp and instantiates UserGroupBean ejb and calls the corresponding method for inserting or updating.

   updateUserGroup.jsp on submit it redirects to UGUCtrler populates javabean UsrGrp and instantiates UserGroupBean ejb and calls the corresponding method for inserting or updating.
and it goes for all database operations.

    Please suggest me whether this is a proper way of doing it.

regards
Reply With Quote
  #2 (permalink)  
Old September 20th, 2003, 03:43 PM
Authorized User
 
Join Date: Jul 2003
Location: Ahmedabad, gujarat, India.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Indian Ocean Send a message via Yahoo to Indian Ocean
Default

Yes dear that is right design pattern what you understand.
actually model contains mainly entity beans for what you have written staateless session beans. it will better to use entity beans.

Indian Ocean
"Rago Me Daudate Firne Ke Hum Nahi Kayal;
Jo Aankh Hi Se Na Tapka To Fir Lahoo Kya!"
Reply With Quote
  #3 (permalink)  
Old September 21st, 2003, 03:00 AM
Registered User
 
Join Date: Sep 2003
Location: Abu Dhabi, Abu Dhabi, United Arab Emirates.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to yasir_lahham
Default

Yes, that's right,
MVC Divides interactive applications into three distinct components:
– Model: Contains core functionality and data.
– View: Displays information to user.
– Controller: Handles user input.
also it Includes a change-propagation mechanism to Ensures consistency between user interface
and model.

Model:
-Encapsulates data.
-Exports procedures that perform specific application processing (used by Controller on behalf of user).
-Provides functions to access Model’s data(Used by View, maybe Controller too).
-Manages change-propagation mechanism.
  Maintains registry of components dependent on the model.
  Views and controllers register their need to be informed about changes.
  Changes in state of model trigger notifications.
• Responsibilities include:
 – Providing functional core.
 – Register dependent views and controllers.
 – Notify dependent components about changes.

View
-Presents information to user(Different Views present information in different ways).
-Defines an update procedure that is activated by change-propagation mechanism in Model.
-Retrieves current data values to be displayed from Model.
-During initialization, associates itself with Model and registers for change notification.
-Corresponds to a single Controller.
-Offers functionality that allows Controller to manipulate display(E.g. scrolling).

Conroller:
-Accepts user inputs as events.
-Translates events into requests for the associated Model or View.
-Registers itself with Model if it depends on state of the Model in any way(E.g. A certain change in the Model results in a menu item being enabled or disabled).

from a document by:
Dr. Roger T. Alexander
rta@cs.colostate.edu

MHD Yasir Al-lahham
Reply With Quote
  #4 (permalink)  
Old September 21st, 2003, 11:15 PM
Registered User
 
Join Date: Sep 2003
Location: Bangalore, Karnataka, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
  Thanks for all, I got a clear picture now, I will try to implement with Entity Beans. Thankz once again.

regards

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Design issue davetx C# 2005 3 February 16th, 2008 12:30 PM
Design issue DeborahP Access 1 March 24th, 2007 08:57 AM
Design issue debuajm Reporting Services 0 April 24th, 2006 08:11 AM
Java Design issue with UML and Design Patterns the_logical_way Apache Tomcat 0 May 31st, 2004 04:02 AM
design issue(clarification) eyan C# 0 February 19th, 2004 11:42 AM



All times are GMT -4. The time now is 06:29 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.