DOC PREVIEW
UTD CS 6V81 - Overview of Design Patterns & The MVC Design Pattern

This preview shows page 1-2-16-17-18-33-34 out of 34 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Overview of Design Patterns & The MVC Design PatternDesign PatternsBackgroundCategorizing PatternSun’s J2EE FrameworkJ2EEPowerPoint PresentationJ2EE and Design PatternsDetails of MVC Design PatternMVC continuedMVC Structure for J2EEMVC ArchitectureExample of MVC Design PatternJava Pet Store- MVC Design PatternMulti Tier ArchitectureJ2EE Architecture TiersA. Details of Client TierSlide 18B. Web TierC. EJB TierSlide 21D.Enterprise Information System (EIS) TierMVC supports Modular DesignJava Pet store- MVCMVC Details in Java Pet storeViews:Java Server Page (JSP)JSP ExampleShoppingCart.jspController ServletEJBsAdvantages of MVCAdvantages of MVC design PatternConsequences or BenefitsReferencesOverview of Design Patterns&The MVC Design PatternSapana MehtaSapana Mehta (CS-6V81)Design Patterns•A pattern is a proven solution to a problem in a context.•Christopher Alexander says each pattern is a three-part rule which expresses a relation between a certain context, a problem, and a solution. •Design patterns represent a solutions to problems that arise when developing software within a particular context.i.e Patterns = problems.solution pairs in a contextSapana Mehta (CS-6V81)Background•Started in 1987 by Ward Cunningham and Ken Beck who were working with Smalltalk and designing GUIs. •Popularized by Gamma, Helm, Johnson and Vlissides (The gang of four, Go4)•The three of Go4 were working on frameworks (E++,Unidraw, HotDraw)•Design pattern use a consistent documentation approach•Design pattern are granular and applied at different levels such as frameworks, subsystems and sub-subsystems•Design patterns are often organized as creational, structural or behavioralSapana Mehta (CS-6V81)Categorizing PatternPatterns, then, represent expert solutions torecurring problems in a context and thus havebeen captured at many levels of abstractionand in numerous domains. Numerouscategories are:•Design •Architectural •Analysis •Creational •Structural •BehavioralSapana Mehta (CS-6V81)Sun’s J2EE Framework•Components Containers and Connectors: Hiding Complexity, Enhancing Portability •Components are the key focus of application developers•Containers intercede between clients and components, providing services transparently to both, including transaction support and resource pooling. •Connectors sit beneath the J2EE platform, defining a portable service API to plug into existing enterprise vendor offerings.Sapana Mehta (CS-6V81)J2EE •Components–Enterprise Java Beans (EJB)–Java Server Pages (JSP)–Servlets•Containers (service providers)–Web container–Bean Container•Connectors (connection service providers)Sapana Mehta (CS-6V81)Sapana Mehta (CS-6V81)J2EE and Design Patterns•J2EE: AN OPERATING SYSTEM FOR THE WEB Enterprise web applications, which live on networks and are accessible through browsers, are redefining Enterprise Web Software. This is the next wave of computing. •The J2EE architecture is built to enable component developers to use a Model View Controller (MVC) Design Pattern.Sapana Mehta (CS-6V81)Details of MVC Design Pattern •Name (essence of the pattern)–Model View Controller MVC•Context (where does this problem occur)–MVC is an architectural pattern that is used when developing interactive application such as a shopping cart on the Internet.•Problem (definition of the reoccurring difficulty)–User interfaces change often, especially on the internet where look-and-feel is a competitive issue. Also, the same information is presented in different ways. The core business logic and data is stable.Sapana Mehta (CS-6V81)MVC continued•Solution (how do you solve the problem)–Use the software engineering principle of “separation of concerns” to divide the application into three areas: •Model encapsulates the core data and functionality•View encapsulates the presentation of the data there can be many views of the common data•Controller accepts input from the user and makes request from the model for the data to produce a new view.Sapana Mehta (CS-6V81)MVC Structure for J2EESapana Mehta (CS-6V81)MVC Architecture•The Model represents the structure of the data in the application, as well as application-specific operations on those data.•A View (of which there may be many) presents data in some form to a user, in the context of some application function. •A Controller translates user actions (mouse motions, keystrokes, words spoken, etc.) and user input into application function calls on the model, and selects the appropriate View based on user preferences and Model state.Sapana Mehta (CS-6V81)Example of MVC Design Pattern•Let’s investigate this statement by looking at a small application that demonstrates MVC on J2EESapana Mehta (CS-6V81)Java Pet Store- MVC Design PatternThe Java Pet Store is a reference application that demonstrates J2EE technologies. It demonstrates interaction between Java Server Pages (JSP's), custom Tag Libraries, JavaBeans, and Enterprise Java Beans. It demonstrates a real-world approach to application development, where the presentation of data is separated from the process of obtaining data from objects which interact with the enterprise or database tier. The Pet Store application implements MVC (Model-View-Controller) design, and demonstrates one way to design an application that should scale well.Sapana Mehta (CS-6V81)Multi Tier ArchitectureThe Java Pet Store design is divided into multiple tiers:A. Client tierB. Web tierC. Enterprise JavaBeans tierD. Enterprise Information System tier. These tiers are not necessarily arranged hierarchically. Each tier may communicate directly with other tiers, or indirectly by way of intermediate tiers.Sapana Mehta (CS-6V81)J2EE Architecture TiersSapana Mehta (CS-6V81)A. Details of Client Tier•The Client tier is responsible for presenting data to the user, interacting with the user, and communicating with the other tiers of the application. •The Client tier is the only part the application the user ever sees. •The Client tier communicates with other tiers by way of well-defined interfaces. •A separate Client tier in the design provides flexibility and extensibility.Sapana Mehta (CS-6V81)A. Details of Client Tier•In The Java Pet Store Client tier consists mainly of a browser displaying Web pages generated from server-side JSP pages in the Web tier.•Future new clients can be written using technologies or languages that do


View Full Document

UTD CS 6V81 - Overview of Design Patterns & The MVC Design Pattern

Documents in this Course
Botnets

Botnets

33 pages

Privacy

Privacy

27 pages

Privacy

Privacy

27 pages

Load more
Download Overview of Design Patterns & The MVC Design Pattern
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Overview of Design Patterns & The MVC Design Pattern and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Overview of Design Patterns & The MVC Design Pattern 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?