Home arrow Java arrow Web Development in J2EE Using the MVC Design Pattern
JAVA

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
TABLE OF CONTENTS:
  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
SEARCH DEVARTICLES

Web Development in J2EE Using the MVC Design Pattern
(Page 1 of 5 )

What is a Web service? The question is perhaps best answered by first describing what a Web service is not. It is not a subscription service but rather represents Web server business logic processing. Web service fundamentals always require immutability, whereas flexibility lies in the approach used to develop the Web service. Typically, in the Java world, a Web server resides in a container such as IBM’s WebSphere Application Server and provides low-level services such as automatic memory management, garbage collection, and connection pooling. WebSphere’s “Studio Application Development” tools support many Apache open-source tools, including the Jakarta Struts framework. The overall WebSphere Application Server (WAS/WSAD) architecture is component-based and layered in multi-tiers. Let’s examine the infrastructure as demonstrated in the following illustration:

J2EE Component Containers

This illustration demonstrates how the WSAD infrastructure is layered in five tiers. The presentation layer contains the Java application, HTML, JSP pages, and XML technologies to return responses to the client. Notice how the Web services component is also part of this tier. The Controller/Mediator tier encapsulates Java Servlet, Struts Framework, JavaBeans, and MSG Driven Bean technologies. The Domain layer contains the business logic whereas the mapping layer utilizes container managed EJBs and Bean Managed Persisted EJBs to implement business rule-driven tasks. Persistence to a relational database such as SQL Server 2000 uses JDBC drivers to achieve cross-platform interoperability. 

The Web keyword indicates how service provider functionality is exposed to the client and occurs on a server residing somewhere on the Internet. The event is typically a response to client requests. To be more specific, the event requires a handler to forward requests to a Web server where a mediator object (a servlet functioning as a MVC controller) intercepts client requests, interprets the messages, and forwards them to an appropriate object (EJBs or JavaBeans) for processing. Ultimately, a response is returned to the client via a Web-compliant browser, an ASP.NET page, or a Java Server Page (JSP).


blog comments powered by Disqus
JAVA ARTICLES

- 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 
Support 

Developer Shed Affiliates

 




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