JavaScript
  Home arrow JavaScript arrow Page 2 - J2EE Design Patterns: Getting Started
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

J2EE Design Patterns: Getting Started
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2006-09-11

    Table of Contents:
  • J2EE Design Patterns: Getting Started
  • Common Design Patterns at a Glance
  • J2EE Design Patterns in the Real World
  • View component and DTO

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    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.

    More JavaScript Articles
    More By A.P.Rajshekhar


       · Design Patterns are standard answers to recurring problems. In this discussion I...
     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek