Univ.-Lektor Dipl.-Ing. Dr. Markus Schranz staatlich befugter und beeideter Ingenieurkonsulent für Informatik Web Application Engineering & Content Management Übungsteil zu VU 2.0 Übungsergänzungen zur Vorlesung an der Technischen Universität Wien Wintersemester 2006/2007
ZT Schranz Informationstechnologie KEG 2 Web Applikationsmanagement Application Server – [Forrester Research:] An application server is a software server product that supports thin clients with an integrated suite of distributed computing capabilities. Application servers manage client sessions, host business logic, and connect to back-end computing resources, including data, transaction, and content Web Application Server: – Wenn die Server-Komponente (ausschließlich) per Web-Server aufgerufen wird. Java Application Servers, z.B.: Servlet Engines Perl Application Servers, z.B.: Mason Web Application Server
ZT Schranz Informationstechnologie KEG 3 Mason: ein PERL-basierter Web Application Server Mason Web Application Server – moderne Konzepte zum technischen Web Service Management – Lösungen für typische Site Development und Management Probleme Wartbarkeit, Performance, Zuverlässigkeit caching, debugging, templating, staging,... über CGI, stand-alone, aber am besten mit Apache::mod_perl Web Applikationsmanagement
ZT Schranz Informationstechnologie KEG 4 Zugänge verteilen Web Server Konfiguration Mason Konfiguration Aufgabe und Werkzeuge – Session handling – Persistente Datenbankanbindung – WYSIWYG Editor Keine Laufgarantie an Wochenenden (Wartungsfenster) Agenda
ZT Schranz Informationstechnologie KEG 5 Praktisches Beispiel: Mason Praktisches Beispiel: Mason Perl-basierter Web Application Server Definition der individuellen Beispiele – mason/perl scripts, simple Beispiele, proof of concept – Simple Shop bzw. Simple CMS Template für Design Komponente für Formular Komponente für DB-Auslese, DB-Eintrag Tipps für DB und Aufgabe unter
ZT Schranz Informationstechnologie KEG 6 Hello World my $text = dieser Text wird nie angezeigt; Statische Mason-Komponente Mason Handling
ZT Schranz Informationstechnologie KEG 7 Hello World, this page is for users that are at least years old. $name => undef $age => 18 my $text = test; Argumente in Mason-Komponenten Mason Handling
ZT Schranz Informationstechnologie KEG 8 call_next() &> my $self = $m->request_comp; my $mytitle = $m->attr(title); Template hierarchie: autohandler Mason Handling
ZT Schranz Informationstechnologie KEG 9 $m->call_next() my $self = $m->request_comp; My $mytitle = $m->call_method(title,%ARGS); Template hierarchie: autohandler Mason Handling
ZT Schranz Informationstechnologie KEG 10 Hello World title => Hello World Title return Hello World Title; Component attributes and methods Mason Handling
ZT Schranz Informationstechnologie KEG 11 Hello World my $dbresults = ; $dbx{´test´}->select({fields=>´name,...´,...}); While (my $tmp = $dbx{´test´}->fetchrow_hashref()) { $dbresults.= $tmp->{´name´}; } Mehr dazu bei der Angabe, bei DBIx::Abstract und Persistent Database connetion Mason Handling