"web application design patterns"

ms_cs

ms_cs

@ms-cs-Ab8svl Oct 27, 2024
While studying J2EE course I have learned some design patterns from my lecturer. It will be better if we learn Design patterns from experienced or J2EE experts. I have learned these from one expert. Let me share it here.

What is design pattern?

The design pattern is nothing but the proven solution for the recurring problem. These solutions are very generic. Developers developing the projects successfully using the design patterns.

Note: A careful attention should be taken while developing the projects in J2EE. The performance,reusability are the some of the important considerations.

In simple words the design patterns help us to learn from the success of the other developers.

To save the time and effort the developers keep some proven solutions,to common problem areas.The developer can choose the design pattern from the design pattern catalog. The generic solutions are described in the pattern templates.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • ms_cs

    ms_cs

    @ms-cs-Ab8svl Jun 7, 2009

    Design of an application has following goals

    * Extensibility and maintainability
    * Division of work
    * Scalability
    * Portability
    * Code reusability
  • shalini_goel14

    shalini_goel14

    @shalini-goel14-ASmC2J Jun 7, 2009

    How many types of design patterns are available. Please tell about them also ?

    Thanks !
  • ms_cs

    ms_cs

    @ms-cs-Ab8svl Jun 7, 2009

    J2EE design patterns can be described as

    Presentation tier pattern
    Integration tier pattern
    Business tier pattern
  • ms_cs

    ms_cs

    @ms-cs-Ab8svl Jun 7, 2009

    shalini_goel14
    How many types of design patterns are available. Please tell about them also ?

    Thanks !
    Sure,
    There are lot of design patterns. The J2EE experts, prepare such from his or her experience. I have learned about,
    -Value object,
    -MVC architechture
    -DAO
    -Business Delegate
    I will tell about these things one by one.
  • manusaluja

    manusaluja

    @manusaluja-BMWMnB Jun 7, 2009

    Good Thread...

    Design Patterns began around 1970 and find its existence in civil engg.
    There is a very famous book on design patterns writtened by some four authors commony known as Gang Of Four. (GOF)

    The authors of the DesignPatternsBook came to be known as the "Gang of Four." The name of the book ("Design Patterns: Elements of Reusable Object-Oriented Software") is too long for e-mail, so "book by the gang of four" became a shorthand name for it. After all, it isn't the ONLY book on patterns. That got shortened to "GOF book", which is pretty cryptic the first time you hear it.

    * ErichGamma
    * RichardHelm
    * RalphJohnson
    * JohnVlissides
  • ms_cs

    ms_cs

    @ms-cs-Ab8svl Jun 8, 2009

    Thank you manusaluja.

    Value object design pattern

    It is under the business pattern. It is a solution, when a problem arises in the business object. Entity beans, are multiuser, transactional objects representing persistent data. An entity bean exposes the values of attributes by providing an accessor method (also referred to as a getter or get method) for each attribute it wishes to expose.So the number of remote calls are increased which increases the network overload. To avoid this the value object is used. A single call is made for a value object, then the client can access the required fields or attributes from that object. By this it reduces number of calls made on the network layer.
  • shalini_goel14

    shalini_goel14

    @shalini-goel14-ASmC2J Jun 8, 2009

    Guys,
    One request, can you please give more stress on practical usage of design patterns rather than going into their history and theories. I mean take one by one out of following four and explain them with an example(preferable code)

    -Value object,
    -MVC architechture
    -DAO
    -Business Delegate

    Thanks !
  • ms_cs

    ms_cs

    @ms-cs-Ab8svl Jun 8, 2009

    Design patterns is for those who is very good in j2ee concepts.I concentrate on the theoretical part. If you have any doubts in that post that. If you well understand that, it is well and good post your own examples which could be a realtime examples, along with the code.
  • ms_cs

    ms_cs

    @ms-cs-Ab8svl Jun 9, 2009

    The DAO design pattern

    The DAO stands for 'data access object' design pattern which represents the integration of application with an external resources, such as databases and other utility software used by an application.The DAO encapsulates the data access logic from the business logic of the application.The use of the DAO is, changes in the database , such as change of the database URL, driver, or the rdbms does not affect the components handling business logic.Only the DAO alone needs to be updated.
  • ms_cs

    ms_cs

    @ms-cs-Ab8svl Jun 11, 2009

    MVC Architecture

    MVC stands for Model View Controller,- A presentation tier pattern .
    Application that handles , business code,presentation code,data access code,are difficult to maintain because of their interdependencies.It results in the change in one component , results in considerable amount of changes in other components.In MVC pattern, The Model represents information about domain, which is typically EJB.And View represents presentation logic which is the JSP. And controller represents the business logic to coordinate between view and model parts which is a Servlet.
  • ms_cs

    ms_cs

    @ms-cs-Ab8svl Jun 11, 2009

    Business Delegate

    The business delegate design pattern provides a solution, by introducing a business delegate object.The business delegate object deals with the business logic. It encapsulates the logic to access business objects from the web clients.
  • ms_cs

    ms_cs

    @ms-cs-Ab8svl Jun 13, 2009

    Here is a link for further reference about MVC

    #-Link-Snipped-#