1 / 15

Pertemuan 12 Design Pattern

Matakuliah : T0053/Web Programming Tahun : 2006 Versi : 2. Pertemuan 12 Design Pattern. Learning Outcomes. Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Menjelaskan Konsep Design Pattern Menjelaskan sejarah Object Oriented Design Pattern Menjelaskan Konsep MVC.

snowy
Download Presentation

Pertemuan 12 Design Pattern

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Matakuliah : T0053/Web Programming Tahun : 2006 Versi : 2 Pertemuan 12Design Pattern

  2. Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : • Menjelaskan Konsep Design Pattern • Menjelaskan sejarah Object Oriented Design Pattern • Menjelaskan Konsep MVC

  3. Outline Materi • Design Pattern • MVC • Penerapan Design Pattern

  4. History of Object Oriented Design Pattern • During 1991-1994, Erich Gamma and his friends write the book Design Patterns: Elements of Reusable Object-Oriented Software. • This book describes 23 design patterns. • The book groups design patterns into three categories- creational design patterns, structural design patterns and behavioral design patterns.

  5. Design Pattern • Design patterns allow developers to design specific parts of systems, such as abstracting object instantiations or aggregating classes into larger structures. • Design patterns also promote loose coupling among objects. • We introduce the popular Model View Controller and Layers architectural patterns.

  6. MVC • Model-View-Controller (MVC) architectural pattern, which separates application data (contained in the model) from graphical presentation components (the view) and input-processing logic (the controller). • The controller implements logic for processing user inputs. The model contains application data, and the view presents the data stored in the model.

  7. MVC

  8. Layers

  9. Layers • The Information tiers maintains data for the application, typically storing it in a database. • The middle tier acts as an intermediary between the information tier and the client tier. • The client tier is the application’s user interface, such as a standard web browser. User interact directly with the application through the user interface.

  10. Sample using Struts • Create a JSP form that supporting Struts Framework • Execute the form • Click Struts’s link.

  11. Simple Struts <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %> <html:html locale="true"> <head> <title><bean:message key="welcome.title"/></title> <html:base/> </head> <body bgcolor="white"> <logic:notPresent name="org.apache.struts.action.MESSAGE" scope="application"> <font color="red"> ERROR: Application resources not loaded -- check servlet container logs for error messages. </font> </logic:notPresent> <h3><bean:message key="welcome.heading"/></h3> <p><bean:message key="welcome.message"/></p> </body> </html:html>

  12. Sample Struts

  13. Design Pattern in Java

  14. Other Java Technologies • SAX & DOM • JMS • Java Cryptography Extension • JSF

  15. References Deitel, “Java How to Program”, 5th ed, 2006 Widodo Budiharto, “Panduan Lengkap Pemrograman J2EE”, Andi Offset Yogyakarta, 2006 www.apache.org www.struts.org www.netbeans.org

More Related