1 / 30

Agenda

Agenda. I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen + MVC II Struts + Framework + Komponenten + Controller + Model + View + Zusammenspiel der

Download Presentation

Agenda

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. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen + MVC II Struts + Framework + Komponenten + Controller + Model + View + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen 2 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  2. request request response response Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Dynamische Seiten Applikation Web Server Br o w s e r Dynamische Seite 3 Statische Seite Data Sources Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  3. Enterprise Server request response Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Servlet • serverseitige Java-Komponente • verschiedene Ausgabeformate möglich 4 Web Server Client Servlet Data Sources Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  4. request response Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen JSP Model I Enterprise Server Web Server Br o w s e r JSP Seite 5 JavaBean Data Sources Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  5. request instantiiert response Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen JSP Model II Enterprise Server Web Server Br o w s e r Controller 6 JSP Seite JavaBean Data Sources Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  6. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen MVC Controller 7 User Model View Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  7. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Framework • Vorgefertigte Anwendungskomponenten • Vorgegebene Architektur • Plattformunabhängigkeit • Ziele: Schnellere Entwicklungszeiten • Bessere Abbildung der Prozesse 8 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  8. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Struts – Komponenten Web Server • Controller • Action Servlet • Action Mapping/Action Forward • struts-config.xml • Action 9 • View • JSP Seite • Taglibs • Properties • Model • Java Beans • ActionForm Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  9. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Controller – Komponenten • die Klasse ActionServlet • die Datei struts-config.xml • die Klasse ActionMapping • die Action-Klassen 10 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  10. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Controller – ActionServlet • erbt von ActionServlet • übernimmt Ablaufsteuerung Mapping • Erzeugung weiterer Komponenten Action-Objekte (Ausführung spezifischer Aufgaben) ActionForm-Objekte (Speichern und validieren von Daten aus HTML-Formularen) ActionForward-Objekte (Weiterleitung des Programflusses) 11 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  11. Struts- config request Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Controller – struts-config.xml Controller „Controller“ ActionServlet 12 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  12. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Controller – struts-config.xml Definition und Konfiguration von: • Datenquellen • Form-Bean Definitionen <form-beans> .... </form-beans> • Globale Forward-Definitionen <global-forwards>...</global-fowards> • Action-Mapping <action-mappings> ... </action-mappings> 13 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  13. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Controller – struts-config.xml <struts-config> <form-beans> <form-bean name="logonForm“ type="org.apache.struts.example.LogonForm"/> </form-beans> <global-forwards type="org.apache.struts.action.ActionForward"/> <forward name="logon“ path="/logon.jsp" redirect="false"/> </global-forwards> <action-mappings> <action path="/logon“ type="org.apache.struts.example.LogonAction“ name="logonForm" /> <forward name= “failure“ path="/logon.jsp„ /> <forward name= “success“ path="/main.jsp" /> </action> </action-mappings> </struts-config> 14 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  14. request ActionMapping Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Controller – ActionMapping Controller Struts- config „Controller“ ActionServlet 15 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  15. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Controller – ActionMapping • erbt von ActionMapping • bildet das jeweilige Ereignis auf die zuständige Action-Klasse ab • Attribute: path - Request-URI-Pfad type - Klassenname der Klasse, welche diese Action implementiert name - FormBean, die diese Action verwendet ... • die Erzeugung der Objekte übernimmt Struts 16 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  16. request dispatch Action Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Controller – Action Controller Struts- config „Controller“ ActionServlet 17 ActionMapping Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  17. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Controller – Action • von Action abgeleitet • dient als Wrapper-Klasse (übersetzt den HTTP-Request für die eigentliche Geschäftslogik ) • gibt ein ActionForward Objekt zurück (identifiziert die nächste aufzurufende Seite) 18 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  18. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Model – Komponenten Controller Action Model 19 ActionForm JavaBeans Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  19. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Model – JavaBean • „normale“ Java Klassen • Beinhalten Geschäftslogik • Unabhängig von der Webanwendung 20 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  20. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Model – ActionForm • erbt von ActionForm • Speicherung der Formulardaten in Variablen • get()- und set()-Methoden • keine Geschäftslogik 21 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  21. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen View – Komponenten Controller Model forward get 22 View Taglibs JSP Properties Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  22. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen View – JavaServerPage <HTML> <HEAD> <jsp:useBean id=„tBean" scope="session" class=„ToneBean" /> <jsp:setProperty name=„tBean" property="*" /> <TITLE> Presentation </TITLE> </HEAD> <BODY> <H1> Pr&auml;sentation mit Sound </H1> <% tBean.retrieveSession(request); %> <% if(!tBean.hasSound()){ %> <jsp:forward page=„NoSound.jsp"/> <% } %> </BODY> </HTML> 23 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  23. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen View – JavaServerPage JSP file <HTML> <JSP:Tag> Tag Library JSP :Tag Java Code 24 • JSP – Umgebung • Standard Action Tags • Custom Tag Libraries Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  24. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen View – Taglibs • Struts-Bean Taglib • Struts-HTML Tagblib • Struts-Logic Taglib • Struts-Template Taglib 25 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  25. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen View – Properties • internationalisierte & lokalisierte Anwendungen • Schlüsselkonzepte (Sprache, Formatierung) Beispiel: MyResources[_49].properties Inhalt: Nachrichten in der Standardsprache des Servers Möglicher Eintrag: prompt.Hallo = Hallo 26 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  26. Struts- config request ActionMapping forward dispatch set get/set forward get Taglib response Properties Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Zusammenspiel der Komponenten Controller „Controller“ ActionServlet Action 27 Modell ActionForm JavaBean View JSP Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  27. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Pro – Contra • Pro • Trennung von Ablauf, Business-Logik und Darstellung • Tag Library • Properties • Open Source • vorgegebene Komponenten 28 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  28. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Pro – Contra • Contra • sehr jung • spätere Änderungen im Code nötig • begrenzter Anwendungsbereich • Komplexität • Unterstützung nur über Newsgroups 29 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

  29. Agenda I Einleitung + Dynamische Seiten + Servlets + JSP Architekturen - Model I - Model II + MVC II Struts + Framework + Komponenten + Controller - Action Servlet - struts-config.xml - Action Mapping - Action + Model - JavaBeans - Action Form + View - JSP Seite - Taglibs - Properties + Zusammenspiel der Komponenten III Fazit + Vorteile/Nachteile + Alternativen Alternativen • KDF • Maverick 30 Stefanie Selzer - Pascal Busch - Michael Kropiwoda

More Related