From 8fbf8be423160e7dc91c7bf47f99cc67c5cd3311 Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 2 Mar 2019 14:40:25 +0100 Subject: [PATCH] Added a bissl a Zeig --- .DS_Store | Bin 6148 -> 6148 bytes doc/~$pse.docx | Bin 162 -> 0 bytes parts/01_layered-arc.tex | 230 +++++++++++++++++++++------------------ 3 files changed, 125 insertions(+), 105 deletions(-) delete mode 100644 doc/~$pse.docx diff --git a/.DS_Store b/.DS_Store index 03b4af5b3ec577f707c21f1f9c9378c56ffaa954..79b096044624fcf5dbe5ecf7ad9b2424bc39b0d7 100644 GIT binary patch delta 309 zcmZoMXfc=|#>B)qu~2NHo}wrV0|Nsi1A_oVaY0f}eiD#(GO1wW#pR6kAQ@(c6o!0; zL?glnAGYhRGXU{=qQ*No7L8Ga)_%M+IlABR#sKl)Yi=ex*rG_fxZI+ sekcv2W^L?|VcpEm!OsBCJ*u~2NHo}w@_0|Nsi1A_oVQC?1dUOI?3u~3tddGl)~8P?4X%<)W{ f**W+*fEqR%GJj{D%r9cd$S~Q4M|yLN$O>iv&l(bb diff --git a/doc/~$pse.docx b/doc/~$pse.docx deleted file mode 100644 index e3c229c8e31f7822a020ad849181e2e688f4a2f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcma)!O%6aX6okJMID;Elxqv+zCun$!ingMaIKClb?JeH?Wv1#=w!Q8wE-v`UzpLm; uWQ?7fP8eBm1iTnu)-WhLDNL+#4`v!h>6>}|@Msg7_R721%H6c>)Vly?V;Kqn diff --git a/parts/01_layered-arc.tex b/parts/01_layered-arc.tex index 9e7f5d3..be9c61a 100644 --- a/parts/01_layered-arc.tex +++ b/parts/01_layered-arc.tex @@ -256,110 +256,22 @@ MVC unterteilt eine interaktive Applikation in drei Teile: Model, View und Contr \subsection{Beschreibe ein konkretes Anwendungsbeispiel} \begin{itemize} \item Java Server Faces (bei Java Server Faces enthält das File zwar keinen Java Code, interagiert aber direkt mit Java Code einer Backing Bean) - \item Im Projekt wurde der Front Controller in Form eines Servlet realisiert. Dieses ist im + \item Im Projekt wurde der Front Controller in Form eines Servlet realisiert, dessen Einbindung in der Konfigurationsdatei "`web.xml"' erfolgt: \end{itemize} \begin{minted}[linenos,breaklines=true]{xml} - + ... - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - Faces Servlet - *.xhtml - - - - - administrators - ADMIN - - - portal administrators - PORTALADMIN - - - standard user - USER - - - - - - admin area - /admin/* - - - ADMIN - - - - - - community area - /community/* - - - USER - PORTALADMIN - ADMIN - - - - - - user administration area - /userAdministration/* - - - USER - PORTALADMIN - ADMIN - - - - - - - user functionalities - /user.xhtml - /userlist.xhtml - /notImplemented.xhtml - - - USER - PORTALADMIN - ADMIN - - - - - - other functionalities - /notImplemented.xhtml - - - USER - PORTALADMIN - ADMIN - - - - - FORM - pse - - /login.xhtml - /login.xhtml - - - - + +Faces Servlet +javax.faces.webapp.FacesServlet +1 + + +Faces Servlet +*.xhtml + \end{minted} - \subsection{Anwendung im Projekt} JavaServer Faces: mächtiges Framework, wo das MVC Pattern verwendet wird. Auf der einen Seite stehen die reinen Views (XHTML Seiten) und auf der anderen Seite Java Beans (Java Klassen), die als @@ -427,16 +339,13 @@ mode="advanced" label="Add document (.pdf .jpg .docx)"> \subsection{Erkläre die Funktion + Skizze} \begin{figure}[h!] \centering - \includegraphics[width=0.5\textwidth]{pics/view-helper_pat1.jpg} + \includegraphics[width=0.8\textwidth]{pics/view-helper_pat1.jpg} \end{figure} \begin{itemize} - \item View delegiert Aufgaben an Helper (Helper adaptieren View zu Model) + \item View (xhtml-Dateien im Ordner webapp) delegiert Aufgaben an Helper (*Controller-Klassen - z.B. DocumentController im Ordner web) + \item Helper adaptieren View zu Model (Klassen in den Ordnern service und data) \item in View befindet sich HTML Code im ViewHelper Java Code zur Aufbereitung der Daten (+ wenig HTML) \end{itemize} -\subsection{Beschreibe ein konkretes Anwendungsbeispiel} -\begin{itemize} - \item bei Verwendung von JSP (Java Server Pages enthalten neben HTML auch Java Code) -\end{itemize} \subsection{Nenne die Konsequenzen der Anwendung} \begin{itemize} \item kapselt Design-Code in View und View-Processing-Code Logik in Helper @@ -695,6 +604,117 @@ NamedBean, TypedBean etc. DTO +\section{Die CONFIG-Files} +\subsection{web.xml} +\begin{itemize} + \item konfiguriert den Java Webserver (Wildfly - JBOSS) + \item befindet sich im Ordner \textbf{src/main/webapp/WEB-INF/web.xml} +\end{itemize} + +\begin{minted}[linenos,breaklines=true]{xml} + + +... + +Faces Servlet +javax.faces.webapp.FacesServlet +1 + + +Faces Servlet +*.xhtml + + + + +administrators +ADMIN + + +portal administrators +PORTALADMIN + + +standard user +USER + + + + + +admin area +/admin/* + + +ADMIN + + + + + +community area +/community/* + + +USER +PORTALADMIN +ADMIN + + + + + +user administration area +/userAdministration/* + + +USER +PORTALADMIN +ADMIN + + + + + + +user functionalities +/user.xhtml +/userlist.xhtml +/notImplemented.xhtml + + +USER +PORTALADMIN +ADMIN + + + + + +other functionalities +/notImplemented.xhtml + + +USER +PORTALADMIN +ADMIN + + + + +FORM +pse + +/login.xhtml +/login.xhtml + + + + +\end{minted} + + +