Home arrow Java arrow Page 4 - Web Development in J2EE Using the MVC Design Pattern

Web Development in J2EE Using the MVC Design Pattern

Web services application development is a huge topic covering a broad range of technologies and topics. In this article we will discuss Web services development in J2EE and examine the Model/View/Controller design pattern, thereby explaining how it separates business logic implementation and persistence from presentation. We shall briefly introduce the Struts Framework, one that facilitates web services development within the IBM WebSphere Studio Application Developer edition. (This article was originally published in the June 2004 issue of Plug-In).

Author Info:
By: Dwight Peltzer
Rating: 4 stars4 stars4 stars4 stars4 stars / 34
January 17, 2005
  1. · Web Development in J2EE Using the MVC Design Pattern
  2. · Examining Servlets and Java Server Pages
  3. · Java Server Pages (JSPs) Resolve Servlet Issues
  4. · Applying the Model/View/Controller Design Pattern
  5. · Applying the Mediator Design Pattern

print this article

Web Development in J2EE Using the MVC Design Pattern - Applying the Model/View/Controller Design Pattern
(Page 4 of 5 )

IBM’s WebSphere Application Server has adopted the “Model, View, Controller (MVC)” design pattern created by Xerox PARC for Smalltalk-80 in the 1980s. This model is becoming increasingly popular with the programming community. Significantly, MVC was selected by Sun Microsystems as the recommended model for its J2EE specifications. MVC can be used by any programming language or platform and enforces the separation between (1) the view, (2) the model, and (3) the controller. It separates data input and processing from data output.

The view interface presents us with a wide range of options such as making a selection from a series of radio buttons or a drop down list. For example, the user can select the type of delivery service, i.e. UPS, FedEx, USPS, or DHL from the list. Traditionally, the view is presented in HTML format. However, an interface may be also presented as XHTML or XML/ XSLT templates. Because the view is display-neutral, it can present many diverse views of the same data. A view always reflects any event changes occurring in the “model” layer.

The model contains business objects which interact directly with JavaBeans or Enterprise JavaBeans (EJBs). They implement transactional business rules such as data persistence or retrieval.

The Controller serves as interpreter by intercepting client requests and calling a servlet’s service() function to fulfill the client’s request. The controller applies no formatting nor does it output anything. It serves only as a notification service both to the view and model to respond accordingly.

blog comments powered by Disqus

- Java Too Insecure, Says Microsoft Researcher
- Google Beats Oracle in Java Ruling
- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials