Frameworks .

25
Frameworks http://jakarta.apache.org/jet speed/ http://jakarta.apache.org/str uts/ http://www.enhydra.org www.openuss.org

Transcript of Frameworks .

Page 2: Frameworks    .

Framework

Page 3: Frameworks    .

Jetspeed

Konfigurierbare Portale

Technologie: Servlet, JSP

Installation: Kopieren von jetspeed.war in Servlet,JSP - Container

Page 4: Frameworks    .

http://qld.ieaust.org.au/jetspeed/

Page 5: Frameworks    .
Page 6: Frameworks    .

Hello World Portletpackage com.bluesunrise.portal.portlets; import org.apache.jetspeed.portal.portlets.AbstractPortlet;import org.apache.turbine.util.RunData;import org.apache.ecs.ConcreteElement;import org.apache.ecs.StringElement; public class HelloWorldPortlet extends AbstractPortlet{ public ConcreteElement getContent (RunData runData) { return (new StringElement ("Hello World!")); }}

Page 7: Frameworks    .

WEB-INF\conf

<?xml version="1.0" encoding="UTF-8"?><registry> <portlet-entry name="HelloWorld" hidden="false" type="instance"

application="false"> <meta-info> <title>HelloWorld</title> <description>Portlet How To Example 1 – Hello World</description> </meta-info> <classname>com.bluesunrise.portal.portlets.HelloWorldPortlet

</classname> <media-type ref="html"/> </portlet-entry></registry>

Page 8: Frameworks    .

Struts

dynamische Webanwendungen nach Model-Controller-Viewer Paradigma

Technologie: Servlet, JSP

Installation: Kopieren von jetspeed.war in Servlet,JSP - Container

Page 9: Frameworks    .

MVC Pattern

Page 10: Frameworks    .

Struts-Umfang

Ein Controller-Servlet, das die REQUESTS an zuständige Action-Klassen weiterleitet.

JSP-TagLibs & Hilfsklassen

Utility-Klassen für XML, Internationalisierung,automatische Erzeugung von Properties.

Page 11: Frameworks    .

Action Object (Controller)

Funktionen: Antworten, Request weiterleitenoder Bean initialisieren und z.B. ein

Gegenstand einfügen.

Page 12: Frameworks    .

Formular Bean

- Speicherung der Daten- Validierung- Wiederherstellung des Formulars

Page 13: Frameworks    .

Use Case

Page 14: Frameworks    .

Tag Bibliotheken

Custom tagsThere are four JSP tag libraries that Struts includes:

1. The HTML tag library, which includes tags for describing dynamic pages, especially forms.

2. The beans tag library, which provides additional tags for providing improved access to Java beans and additional support for internationalization.

3. The logic tag library, which provides tags that support conditional execution and looping.

4. The template tag library for producing and using common JSP templates in multiple pages.

Page 15: Frameworks    .

TagLib Bsp: Formular

JSP:<input type="text" name="amount" value="<

%= bean.getFirstName() %>">

Struts html TagLib<html:text property="amount"/>

Page 16: Frameworks    .

http://www.enhydra.org

Page 17: Frameworks    .

Architektur

Page 18: Frameworks    .

Architektur II

Page 19: Frameworks    .
Page 20: Frameworks    .

Admin Interface

Page 21: Frameworks    .

XMLCWelcome.html<CENTER>The current time is <span id="Time">1/1/00 00:00:00 Oh no!</span>.</CENTER>

XMLC JavaClass WelcomeHTML mit setTextTime.class

Welcome.javaString now = new Date().toString();WelcomeHTML welcome =(WelcomeHTML)comms.xmlcFactory.create(welcomeHTML.class);welcome.setTextTime(now);comms.response.writeHTML(welcome);

Page 22: Frameworks    .

http://openuss.sourceforge.net

Page 23: Frameworks    .
Page 24: Frameworks    .

Installation

Page 25: Frameworks    .

Praktikum1. Cocoon Übung beenden2. hello-world portlet in Jetspeed Portal