Home arrow JavaScript arrow Page 2 - J2EE Design Patterns: Getting Started
JAVASCRIPT

J2EE Design Patterns: Getting Started


If you have been looking for a good overview of Design Patterns in J2EE, look no further. In this article you will learn about Design Patterns and how they interact with J2EE's tier-based development. It covers three of the most common Design Patterns, and provides a real-world example of Design Patterns in action.

Author Info:
By: A.P.Rajshekhar
Rating: 4 stars4 stars4 stars4 stars4 stars / 16
September 11, 2006
TABLE OF CONTENTS:
  1. · J2EE Design Patterns: Getting Started
  2. · Common Design Patterns at a Glance
  3. · J2EE Design Patterns in the Real World
  4. · View component and DTO

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
J2EE Design Patterns: Getting Started - Common Design Patterns at a Glance
(Page 2 of 4 )

Each of the tiers has its own set of Design Patterns. However, there are certain patterns that stand out and are used the most. Following are three of them:

  1. Model-View-Controller Pattern (MVC)
  2. Data Access Object Pattern (DAO)
  3. Data Transfer Pattern (DTO)

The first pattern is applicable to the client and server-side presentation tier. The last two apply to the server-side domain model; the last one is also the pattern that provides the conduit for data between the layers.

Model-View-Controller Pattern (MVC)

MVC can be defined as “a software architecture that separates an application's data model, user interface, and control logic into three distinct components so that modifications to one component can be made with minimal impact to the others.” An application, regardless of whether it is a desktop or web application, has three major parts: the data model, presentation logic and flow logic. In the MVC pattern, the Model does the data model, the View handles the presentation logic and the Controller does the flow/application logic.

Data Access Object Pattern (DAO)

A Data Access Object abstracts and encapsulates the access to the data source. A class that implements the DAO pattern manages the connection with the data source to obtain and store data. In short, all the data access related operations can be implemented using the DAO pattern.

Data Transfer Object Pattern (DTO)  

The Data Transfer Object (DTO) pattern is simple: rather than make multiple calls to retrieve a set of related data, a single call can be made, retrieving a custom object that includes all the required data for the current transaction. The data is encapsulated in the form of an object. Many times, the DTO is a reflection (in the literary sense) of the data model and hence can be used to do data operations without tightly coupling the business model with the data model.

That was a bird’s eye view of the most common design patterns. In the next section, I will be implementing MVC, DAO and DTO patterns in a real world example.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



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