Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Stefanie Selzer - Pascal Busch - Michael Kropiwoda

Ähnliche Präsentationen


Präsentation zum Thema: "Stefanie Selzer - Pascal Busch - Michael Kropiwoda"—  Präsentation transkript:

1

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

3 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Web Server Applikation request B r o w s e r Dynamische Seite response request Statische Seite response Data Sources Stefanie Selzer - Pascal Busch - Michael Kropiwoda 3

4 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Client Web Server Enterprise Server request Servlet response Data Sources Stefanie Selzer - Pascal Busch - Michael Kropiwoda 4

5 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Web Server Enterprise Server B r o w s e r request JSP Seite response JavaBean Data Sources Stefanie Selzer - Pascal Busch - Michael Kropiwoda 5

6 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Web Server Enterprise Server B r o w s e r request Controller instantiiert JSP Seite JavaBean Data Sources response Stefanie Selzer - Pascal Busch - Michael Kropiwoda 6

7 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 User Model View Stefanie Selzer - Pascal Busch - Michael Kropiwoda 7

8 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Stefanie Selzer - Pascal Busch - Michael Kropiwoda 8

9 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 View JSP Seite Taglibs Properties Model Java Beans ActionForm Stefanie Selzer - Pascal Busch - Michael Kropiwoda 9

10 Controller – Komponenten
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 Stefanie Selzer - Pascal Busch - Michael Kropiwoda 10

11 Controller – ActionServlet
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) Stefanie Selzer - Pascal Busch - Michael Kropiwoda 11

12 Controller – struts-config.xml
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 Struts- config „Controller“ ActionServlet request Stefanie Selzer - Pascal Busch - Michael Kropiwoda 12

13 Controller – struts-config.xml
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> Stefanie Selzer - Pascal Busch - Michael Kropiwoda 13

14 Controller – struts-config.xml
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> Stefanie Selzer - Pascal Busch - Michael Kropiwoda 14

15 Controller – 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 request ActionMapping Stefanie Selzer - Pascal Busch - Michael Kropiwoda 15

16 Controller – 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 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 Stefanie Selzer - Pascal Busch - Michael Kropiwoda 16

17 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 request ActionMapping Action dispatch Stefanie Selzer - Pascal Busch - Michael Kropiwoda 17

18 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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) Stefanie Selzer - Pascal Busch - Michael Kropiwoda 18

19 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 ActionForm JavaBeans Stefanie Selzer - Pascal Busch - Michael Kropiwoda 19

20 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Stefanie Selzer - Pascal Busch - Michael Kropiwoda 20

21 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Stefanie Selzer - Pascal Busch - Michael Kropiwoda 21

22 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 View Taglibs JSP Properties Stefanie Selzer - Pascal Busch - Michael Kropiwoda 22

23 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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äsentation mit Sound </H1> <% tBean.retrieveSession(request); %> <% if(!tBean.hasSound()){ %> <jsp:forward page=„NoSound.jsp"/> <% } %> </BODY> </HTML> Stefanie Selzer - Pascal Busch - Michael Kropiwoda 23

24 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 JSP – Umgebung Standard Action Tags Custom Tag Libraries Stefanie Selzer - Pascal Busch - Michael Kropiwoda 24

25 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Stefanie Selzer - Pascal Busch - Michael Kropiwoda 25

26 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Stefanie Selzer - Pascal Busch - Michael Kropiwoda 26

27 Zusammenspiel der Komponenten
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 Struts- config Controller request „Controller“ ActionServlet ActionMapping forward dispatch Action forward set get/set Modell ActionForm JavaBean get View response Taglib JSP Properties Stefanie Selzer - Pascal Busch - Michael Kropiwoda 27

28 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Stefanie Selzer - Pascal Busch - Michael Kropiwoda 28

29 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Stefanie Selzer - Pascal Busch - Michael Kropiwoda 29

30 Stefanie Selzer - Pascal Busch - Michael Kropiwoda
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 Stefanie Selzer - Pascal Busch - Michael Kropiwoda 30


Herunterladen ppt "Stefanie Selzer - Pascal Busch - Michael Kropiwoda"

Ähnliche Präsentationen


Google-Anzeigen