SlideShare a Scribd company logo
1 of 35
Download to read offline
Web Information Systems
Web Application Frameworks
Prof. Beat Signer
Department of Computer Science
Vrije Universiteit Brussel

http://www.beatsigner.com
2 December 2005
Web Application Frameworks
A web application framework is a software framework that
is designed to support the development of dynamic websites, web applications and web services and web
resoucres. The framework aims to alleviate the overhead
associated with common activities performed in web
development. For example, many frameworks provide
libraries for database access, template frameworks and
session management, and they often promote code reuse.
[http://en.wikipedia.org/wiki/Web_application_framework]

 There exist dozens of web application frameworks!
October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

2
Web Application Frameworks ...
 A web application framework offers libraries and
tools to deal with web application issues


template libraries, session management, database access
libraries etc.

 Some frameworks also offer an abstraction from the
underlying enabling technologies


e.g. automatic creation of Java Servlets

 Many frameworks follow the Model-View-Controller
(MVC) design pattern



no mix of application logic and view (e.g. not like in JSP)
increases modularity and reusability

 Leads to a faster and more robust development process
October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

3
Model-View-Controller (MVC)
 Model




data (state) and business logic
multiple views can be defined for a single model
when the state of a model changes, its views are notified

 View



renders the data of the model
notifies the controller about changes



October 25, 2013

View

selects view

 Controller


notifies

Controller

processes interactions with the view
transforms view interactions into
operations on the model (state
modification)

modifies
state

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

gets
state

notifies

Model

4
Apache Struts 2
 Free open source framework for creating enterpriseready Java-based web applications

 Action-based MVC 2 (Pull MVC) framework combining
Java Servlets and JSP technology


model
- action (basic building blocks) takes role of the model instead of the controller
(MVC 2) and the view can pull information from the action
- action represented by POJO (Plain Old Java Object) following the JavaBean
paradigm and optional helper classes



view
- template-based approach often based on JavaServer Pages (JSP) in
combination with tag libraries (collection of custom tags)



controller
- based on Java Servlet filter in combination with interceptors

October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

5
MVC Model 2 (MVC 2) in Struts 2
View
6

1
Browser

e.g. JSP

Controller

4

Servlet
3

2

5

Model
POJOs
Database

October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

6
Apache Struts 2 Architecture
 Servlet request


standard filter chain
- interception of requests and
responses
- reusable modular units
- e.g. XSLT transformation



FilterDispatcher consults
controller (ActionMapper)

 ActionProxy is called if
action has to be executed


consult Configuration-

Manager
 create ActionInvocation
[http://struts.apache.org/2.1.6/docs/big-picture.html]

October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

7
Apache Struts 2 Architecture ...



invoke any interceptors
(controller) before Action
Action class updates the
model

 ActionInvocation does
a lookup for the Result



based on Action result code
mappings in struts.xml

 Result execution (view)



often based on JSP template
interceptors in reverse order

 Send response
[http://struts.apache.org/2.1.6/docs/big-picture.html]

October 25, 2013



filter chain

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

8
Apache Struts 2
 ValueStack



temporary objects, Action objects, ...
access from JSP via Object Graph Navigational Language (OGNL)

 Multiple view alternatives


JSP, XSLT, Velocity, ...

 Simplifies web development






convention over configuration
intelligent default values reduce the size of configuration files
fosters modularity and loose coupling (dependency injection)
standard development process for Struts 2 web applications

 Requires no changes to the servlet container

October 25, 2013

regular servlet application
Beat Signer - Department of Computer Science - bsigner@vub.ac.be

9
Apache Struts 2 web.xml
<web-app id="WebApp1" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>be.ac.vub.wise</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
...
</web-app>

October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

10
Tag Libraries
 Introduced to encapsulate reusable Java objects in JSP


provide access to methods on objects

 Apache Struts 2 offers four different libraries


HTML
- e.g. buttons, form fields, ...



Template
- tags that are useful for creating dynamic JSP templates



Bean
- e.g. definitions, parameters, ...



Logic
- e.g. comparisons, ...

October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

11
Apache Struts 2 Hello World Example
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1><s:property value="message"/></h1>
<p>Time: <b><s:property value="currentTime" /></b></p>
</body>
</html>

October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

HelloWorld.jsp

12
Apache Struts 2 Hello World Example ...
package be.ac.vub.wise;
import com.opensymphony.xwork2.ActionSupport;
import java.util.Date;
public class HelloWorldImpl extends ActionSupport {
public static final String MESSAGE = "Hello World!";
public static final String SUCCESS = "success";
private String message;
public String execute() throws Exception {
setMessage(MESSAGE);
return SUCCESS;
}

public void setMessage(String message){
this.message = message;
}
public String getMessage() {
return message;
}
public String getCurrentTime(){
return new Date().toString();
}
}

October 25, 2013

HelloWorldImpl.java
Beat Signer - Department of Computer Science - bsigner@vub.ac.be

13
Apache Struts 2 Hello World Example ...
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<constant name="struts.devMode" value="true"/>
<package name="be.ac.vub.wise" namespace="/wise" extends="struts-default">
<action name="HelloWorld" class="be.ac.vub.wise.HelloWorldImpl">
<result>/pages/HelloWorld.jsp</result>
</action>
...
</package>
...
</struts>

struts.xml

 Execute the Hello World example by sending request to


October 25, 2013

http://localhost:8080/wise/HelloWorld.action

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

14
Spring Framework
 Java application framework
 Various extensions for web applications
 Modules










October 25, 2013

model-view-controller
data access
inversion of control container
convention-over-configuration
remote access framework
transaction management
authentication and authorisation
…

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

15
Apache Flex
 Software development kit for cross-platform
Rich Internet Applications (RIAs) based on Adobe Flash

 Main components



Adobe Flash Player runtime environment
Flex SDK (free)
- compiler and debugger, the Flex framework and user interface components



Adobe Flash Builder (commercial)
- Eclipse plug-in with MXML compiler and debugger

 Separation of user interface and data


user interface described in MXML markup language in
combination with ActionScript
- compiled into flash executable (SWF flash movie)

- better cross-browser compatibility than AJAX
October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

16
Apache Flex ...
 Flex framework offers various actions


e.g. HTTPRequest component

 Flex applications can also be deployed as desktop
applications via Adobe AIR (Adobe Integrated Runtime)
<?xml version="1.0" encoding="UTF-8" ?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function sayHello():void {
Alert.show("Hello " + user.text);
}
]]>
</mx:Script>
<mx:Label fontSize="12" text="Name: " />
<mx:TextInput id="user" />
<mx:Button label="Go" click="sayHello()" />
</mx:Application>

October 25, 2013

HelloWorld.mxml

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

17
Microsoft Silverlight
 Microsoft's platform for Rich Internet Applications


competitor to Adobe Flash

 Runtime requires a browser plug-in



Internet Explorer, Firefox, Safari and Google Chrome
Silverlight Core Common Language Runtime (CoreCLR)

 A Silverlight application consists of


CreateSilverlight.js and Silverlight.js
- initialise the browser plug-in



user interface described in the Extensible Application Markup
Language (XAML)
- XAML files are not compiled  indexable by search engines



October 25, 2013

code-behind file containing the program logic
Beat Signer - Department of Computer Science - bsigner@vub.ac.be

18
Microsoft Silverlight ...
 Programming based on a subset of the .NET Framework
 Silverlight introduces a set of features including


LocalConnection API
- asynchronous messaging between multiple applications on the same machine



out-of-browser experiences
- locally installed application that runs out-of-the-browser (OOB apps)
- cross-platform with Windows/Mac



microphone and Web cam support

 Two types of Silverlight web requests


WebClient class
- OpenReadAsync (for streaming), DownloadStringAsync as well as uploads



WebRequest
- register an asynchronous callback handler (based on HttpWebRequest)

October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

19
Moonlight
 Moonlight is an open source implementation of
Silverlight (mainly for Linux) that is developed as
part of the Mono project


October 25, 2013

development was abandoned in December 2011

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

20
OpenLaszlo
 Open source RIA platform
 Two main components


LZX programming language
- XML and JavaScript
- similar to MXML and XAML



OpenLaszlo Server

 The Open Laszlo Server compiles LZX applications into
different possible runtime components




October 25, 2013

Java Servlets
binary SWF files
DHTML (HTML, DOM, JavaScript and CSS)

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

21
Ruby on Rails (RoR)
 Open source web application framework
 Combination of


dynamic, reflective, object-oriented programming language Ruby
- combination of Perl-inspired syntax with "Smalltalk features"



web application framework Rails

 Based on MVC architectural pattern


structure of a webpage separated from its functionality via the
unobtrusive JavaScript technique

 The scaffolding feature offered by Rails can
automatically generate some of the models and views
that are required for a website

October 25, 2013

developer has to run an external command to generate the code
Beat Signer - Department of Computer Science - bsigner@vub.ac.be

22
Ruby on Rails (RoR) ...
 Ruby on Rails Philosophy


Don't Repeat Yourself (DRY)
- information should not be stored redundantly (e.g. do not store information in
configuration files if the data can be automatically derived by the system)



Convention over Configuration (CoC)
- programmer only has to specify unconventional application settings
- naming conventions to automatically map classes to database tables (e.g. by
default a 'Sale' model class is mapped to the 'sales' database table)

October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

23
Video: Ruby on Rails

http://media.rubyonrails.org/video/rails_blog_2.mov
October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

24
Yii Framework
 PHP framework for the development of Web 2.0
applications that offers a rich set of features











October 25, 2013

AJAX-enabled widgets
web service integration
authentication and authorisation
flexible presentation via skins and themes
Data Access Objects (DAO) interface to transparently access
different database management systems
integration with the jQuery JavaScript library
layered caching
...

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

25
Zend
 Open source PHP framework offering various features









October 25, 2013

MVC architectural pattern
loosely coupled components
object orientation
flexible caching
Simple Cloud API
features to deal with emails (POP3, IMAP4, …)
…

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

26
CakePHP
 Open source PHP web application framework










October 25, 2013

MVC architectural pattern
rapid prototyping via scaffolding
authentication
localisation
session management
caching
validation
…

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

27
Node.js
 Server-side JavaScript


handling post/get requests, database, sessions, …

 Write your entire app in one language
 Built-in web server (no need for Apache, Tomcat, etc.)
 High modularity


plug-ins can be added for desired server-side functionality

 Other more powerful frameworks such as Express.js
build on top of Node.js

October 25, 2013

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

28
Django
 Open source Python web application framework









October 25, 2013

MVC architectural pattern
don't repeat yourself (DRY)
object-relational mapper
integrated lightweight web server
localisation
caching
...

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

29
Web Content Management Systems
 Content management systems that focus on web content
 Main functionality


data storage and publishing, user management (including access
rights), versioning, workflows

 Offline (create static webpages), online (create
webpages on the fly) and hybrid systems

 Often some kind of server-side caching
 Suited for non-technical users since the underlying
technology is normally completely hidden

 Web CMS Examples

October 25, 2013

Joomla, Drupal, ...
Beat Signer - Department of Computer Science - bsigner@vub.ac.be

30
Exercise 5
 Web Application Frameworks


October 25, 2013

implementation of a Struts 2 application

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

31
References
 Struts 2 Quick Guide


http://www.tutorialspoint.com/struts_2/struts_quick_g
uide.htm

 Apache Struts 2


http://struts.apache.org/2.x/

 Ian Roughley, Struts 2


http://refcardz.dzone.com/refcardz/struts2

 Spring Framework


http://www.springsource.org

 Apache Flex


October 25, 2013

http://flex.org

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

32
References ...
 Microsoft Silverlight
http://www.microsoft.com/silverlight/
 http://silverlight.net/learn/videos/silverlightvideos/net-ria-services-intro/


 Open Laszlo


http://www.openlaszlo.org

 Ruby on Rails Video: Creating a Weblog in 15 Minutes


http://www.youtube.com/watch?v=tUH1hewXnC0

 Yii Framework


http://www.yiiframework.com

 Zend Framework

October 25, 2013

http://framework.zend.com
Beat Signer - Department of Computer Science - bsigner@vub.ac.be

33
References ...
 CakePHP


http://cakephp.org

 Node.js


http://nodejs.org

 Django


https://www.djangoproject.com

 Comparision of Web Application Frameworks


October 25, 2013

http://en.wikipedia.org/wiki/Comparison_of_web_
application_frameworks

Beat Signer - Department of Computer Science - bsigner@vub.ac.be

34
Next Lecture
Web 2.0 Basics

2 December 2005

More Related Content

What's hot

Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworksMukesh Kumar
 
Spring Basics
Spring BasicsSpring Basics
Spring BasicsEmprovise
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts frameworks4al_com
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVCJohn Lewis
 
Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Naresh Chintalcheru
 
Step by Step Guide for building a simple Struts Application
Step by Step Guide for building a simple Struts ApplicationStep by Step Guide for building a simple Struts Application
Step by Step Guide for building a simple Struts Applicationelliando dias
 
JSF basics
JSF basicsJSF basics
JSF basicsairbo
 
Spring 3 MVC CodeMash 2009
Spring 3 MVC   CodeMash 2009Spring 3 MVC   CodeMash 2009
Spring 3 MVC CodeMash 2009kensipe
 
Untrusted JS Detection with Chrome Dev Tools and static code analysis
Untrusted JS Detection with Chrome Dev Tools and static code analysisUntrusted JS Detection with Chrome Dev Tools and static code analysis
Untrusted JS Detection with Chrome Dev Tools and static code analysisEnrico Micco
 
Spring intro classes-in-mumbai
Spring intro classes-in-mumbaiSpring intro classes-in-mumbai
Spring intro classes-in-mumbaivibrantuser
 
Spring MVC framework
Spring MVC frameworkSpring MVC framework
Spring MVC frameworkMohit Gupta
 

What's hot (18)

Struts introduction
Struts introductionStruts introduction
Struts introduction
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworks
 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Struts Basics
Struts BasicsStruts Basics
Struts Basics
 
Struts 1
Struts 1Struts 1
Struts 1
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
 
Jsp with mvc
Jsp with mvcJsp with mvc
Jsp with mvc
 
Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC
 
Step by Step Guide for building a simple Struts Application
Step by Step Guide for building a simple Struts ApplicationStep by Step Guide for building a simple Struts Application
Step by Step Guide for building a simple Struts Application
 
Rich Assad Resume
Rich Assad ResumeRich Assad Resume
Rich Assad Resume
 
JSF basics
JSF basicsJSF basics
JSF basics
 
Next stop: Spring 4
Next stop: Spring 4Next stop: Spring 4
Next stop: Spring 4
 
Spring 3 MVC CodeMash 2009
Spring 3 MVC   CodeMash 2009Spring 3 MVC   CodeMash 2009
Spring 3 MVC CodeMash 2009
 
Untrusted JS Detection with Chrome Dev Tools and static code analysis
Untrusted JS Detection with Chrome Dev Tools and static code analysisUntrusted JS Detection with Chrome Dev Tools and static code analysis
Untrusted JS Detection with Chrome Dev Tools and static code analysis
 
Spring intro classes-in-mumbai
Spring intro classes-in-mumbaiSpring intro classes-in-mumbai
Spring intro classes-in-mumbai
 
Spring MVC framework
Spring MVC frameworkSpring MVC framework
Spring MVC framework
 
Session 1
Session 1Session 1
Session 1
 

Viewers also liked

Zebus - Pitfalls of a P2P service bus
Zebus - Pitfalls of a P2P service busZebus - Pitfalls of a P2P service bus
Zebus - Pitfalls of a P2P service busKévin LOVATO
 
Build your own Service Bus V2
Build your own Service Bus V2Build your own Service Bus V2
Build your own Service Bus V2Kévin LOVATO
 
5 faktor yang mempengaruhi strategi pembelajaran bahasa
5 faktor yang mempengaruhi strategi pembelajaran bahasa5 faktor yang mempengaruhi strategi pembelajaran bahasa
5 faktor yang mempengaruhi strategi pembelajaran bahasaNajihah Nazarudin
 
Big Mike's Photo Voice Project
Big Mike's Photo Voice ProjectBig Mike's Photo Voice Project
Big Mike's Photo Voice Projectmurphy7059
 
Big Mike's Photo Voice Project
Big Mike's Photo Voice ProjectBig Mike's Photo Voice Project
Big Mike's Photo Voice Projectmurphy7059
 
QI MARIA HERRAMIENTAS
QI MARIA HERRAMIENTASQI MARIA HERRAMIENTAS
QI MARIA HERRAMIENTASMariaChanPat
 
5 faktor yang mempengaruhi strategi pembelajaran bahasa
5 faktor yang mempengaruhi strategi pembelajaran bahasa5 faktor yang mempengaruhi strategi pembelajaran bahasa
5 faktor yang mempengaruhi strategi pembelajaran bahasaNajihah Nazarudin
 
Pengumuman tkb cpns_2014
Pengumuman tkb cpns_2014Pengumuman tkb cpns_2014
Pengumuman tkb cpns_2014Warnet Akai
 
Observer, a "real life" time series application
Observer, a "real life" time series applicationObserver, a "real life" time series application
Observer, a "real life" time series applicationKévin LOVATO
 
Building your own Distributed System The easy way - Cassandra Summit EU 2014
Building your own Distributed System The easy way - Cassandra Summit EU 2014Building your own Distributed System The easy way - Cassandra Summit EU 2014
Building your own Distributed System The easy way - Cassandra Summit EU 2014Kévin LOVATO
 
Doughnut Radio Presentation
Doughnut Radio Presentation Doughnut Radio Presentation
Doughnut Radio Presentation Zacbowenmedia
 
Ben keynote 5
Ben keynote 5Ben keynote 5
Ben keynote 5Ben Golub
 

Viewers also liked (15)

Zebus - Pitfalls of a P2P service bus
Zebus - Pitfalls of a P2P service busZebus - Pitfalls of a P2P service bus
Zebus - Pitfalls of a P2P service bus
 
Frasesss
FrasesssFrasesss
Frasesss
 
Build your own Service Bus V2
Build your own Service Bus V2Build your own Service Bus V2
Build your own Service Bus V2
 
5 faktor yang mempengaruhi strategi pembelajaran bahasa
5 faktor yang mempengaruhi strategi pembelajaran bahasa5 faktor yang mempengaruhi strategi pembelajaran bahasa
5 faktor yang mempengaruhi strategi pembelajaran bahasa
 
Big Mike's Photo Voice Project
Big Mike's Photo Voice ProjectBig Mike's Photo Voice Project
Big Mike's Photo Voice Project
 
Big Mike's Photo Voice Project
Big Mike's Photo Voice ProjectBig Mike's Photo Voice Project
Big Mike's Photo Voice Project
 
Ketiga2013
Ketiga2013Ketiga2013
Ketiga2013
 
QI MARIA HERRAMIENTAS
QI MARIA HERRAMIENTASQI MARIA HERRAMIENTAS
QI MARIA HERRAMIENTAS
 
5 faktor yang mempengaruhi strategi pembelajaran bahasa
5 faktor yang mempengaruhi strategi pembelajaran bahasa5 faktor yang mempengaruhi strategi pembelajaran bahasa
5 faktor yang mempengaruhi strategi pembelajaran bahasa
 
上課練習
上課練習上課練習
上課練習
 
Pengumuman tkb cpns_2014
Pengumuman tkb cpns_2014Pengumuman tkb cpns_2014
Pengumuman tkb cpns_2014
 
Observer, a "real life" time series application
Observer, a "real life" time series applicationObserver, a "real life" time series application
Observer, a "real life" time series application
 
Building your own Distributed System The easy way - Cassandra Summit EU 2014
Building your own Distributed System The easy way - Cassandra Summit EU 2014Building your own Distributed System The easy way - Cassandra Summit EU 2014
Building your own Distributed System The easy way - Cassandra Summit EU 2014
 
Doughnut Radio Presentation
Doughnut Radio Presentation Doughnut Radio Presentation
Doughnut Radio Presentation
 
Ben keynote 5
Ben keynote 5Ben keynote 5
Ben keynote 5
 

Similar to Lecture 05 web_applicationframeworks

Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)Beat Signer
 
Web Application Frameworks - Web Technologies (1019888BNR)
Web Application Frameworks - Web Technologies (1019888BNR)Web Application Frameworks - Web Technologies (1019888BNR)
Web Application Frameworks - Web Technologies (1019888BNR)Beat Signer
 
Apachecon 2002 Struts
Apachecon 2002 StrutsApachecon 2002 Struts
Apachecon 2002 Strutsyesprakash
 
Web Application Frameworks - Web Technologies (1019888BNR)
Web Application Frameworks - Web Technologies (1019888BNR)Web Application Frameworks - Web Technologies (1019888BNR)
Web Application Frameworks - Web Technologies (1019888BNR)Beat Signer
 
Struts Interview Questions
Struts Interview QuestionsStruts Interview Questions
Struts Interview Questionsjbashask
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
Introduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and SilverlightIntroduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and SilverlightPeter Gfader
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET Journal
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksSunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworksSunil Patil
 

Similar to Lecture 05 web_applicationframeworks (20)

Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
 
Web Application Frameworks - Web Technologies (1019888BNR)
Web Application Frameworks - Web Technologies (1019888BNR)Web Application Frameworks - Web Technologies (1019888BNR)
Web Application Frameworks - Web Technologies (1019888BNR)
 
Struts
StrutsStruts
Struts
 
Apachecon 2002 Struts
Apachecon 2002 StrutsApachecon 2002 Struts
Apachecon 2002 Struts
 
Web Application Frameworks - Web Technologies (1019888BNR)
Web Application Frameworks - Web Technologies (1019888BNR)Web Application Frameworks - Web Technologies (1019888BNR)
Web Application Frameworks - Web Technologies (1019888BNR)
 
Struts Ppt 1
Struts Ppt 1Struts Ppt 1
Struts Ppt 1
 
Struts Interview Questions
Struts Interview QuestionsStruts Interview Questions
Struts Interview Questions
 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
Struts
StrutsStruts
Struts
 
Skillwise Struts.x
Skillwise Struts.xSkillwise Struts.x
Skillwise Struts.x
 
Introduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and SilverlightIntroduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and Silverlight
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
Ria Mvc
Ria MvcRia Mvc
Ria Mvc
 
MVC 6 Introduction
MVC 6 IntroductionMVC 6 Introduction
MVC 6 Introduction
 
MVC
MVCMVC
MVC
 
Struts
StrutsStruts
Struts
 
Struts2.x
Struts2.xStruts2.x
Struts2.x
 

Recently uploaded

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Recently uploaded (20)

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Lecture 05 web_applicationframeworks

  • 1. Web Information Systems Web Application Frameworks Prof. Beat Signer Department of Computer Science Vrije Universiteit Brussel http://www.beatsigner.com 2 December 2005
  • 2. Web Application Frameworks A web application framework is a software framework that is designed to support the development of dynamic websites, web applications and web services and web resoucres. The framework aims to alleviate the overhead associated with common activities performed in web development. For example, many frameworks provide libraries for database access, template frameworks and session management, and they often promote code reuse. [http://en.wikipedia.org/wiki/Web_application_framework]  There exist dozens of web application frameworks! October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 2
  • 3. Web Application Frameworks ...  A web application framework offers libraries and tools to deal with web application issues  template libraries, session management, database access libraries etc.  Some frameworks also offer an abstraction from the underlying enabling technologies  e.g. automatic creation of Java Servlets  Many frameworks follow the Model-View-Controller (MVC) design pattern   no mix of application logic and view (e.g. not like in JSP) increases modularity and reusability  Leads to a faster and more robust development process October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 3
  • 4. Model-View-Controller (MVC)  Model    data (state) and business logic multiple views can be defined for a single model when the state of a model changes, its views are notified  View   renders the data of the model notifies the controller about changes  October 25, 2013 View selects view  Controller  notifies Controller processes interactions with the view transforms view interactions into operations on the model (state modification) modifies state Beat Signer - Department of Computer Science - bsigner@vub.ac.be gets state notifies Model 4
  • 5. Apache Struts 2  Free open source framework for creating enterpriseready Java-based web applications  Action-based MVC 2 (Pull MVC) framework combining Java Servlets and JSP technology  model - action (basic building blocks) takes role of the model instead of the controller (MVC 2) and the view can pull information from the action - action represented by POJO (Plain Old Java Object) following the JavaBean paradigm and optional helper classes  view - template-based approach often based on JavaServer Pages (JSP) in combination with tag libraries (collection of custom tags)  controller - based on Java Servlet filter in combination with interceptors October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 5
  • 6. MVC Model 2 (MVC 2) in Struts 2 View 6 1 Browser e.g. JSP Controller 4 Servlet 3 2 5 Model POJOs Database October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 6
  • 7. Apache Struts 2 Architecture  Servlet request  standard filter chain - interception of requests and responses - reusable modular units - e.g. XSLT transformation  FilterDispatcher consults controller (ActionMapper)  ActionProxy is called if action has to be executed  consult Configuration- Manager  create ActionInvocation [http://struts.apache.org/2.1.6/docs/big-picture.html] October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 7
  • 8. Apache Struts 2 Architecture ...   invoke any interceptors (controller) before Action Action class updates the model  ActionInvocation does a lookup for the Result   based on Action result code mappings in struts.xml  Result execution (view)   often based on JSP template interceptors in reverse order  Send response [http://struts.apache.org/2.1.6/docs/big-picture.html] October 25, 2013  filter chain Beat Signer - Department of Computer Science - bsigner@vub.ac.be 8
  • 9. Apache Struts 2  ValueStack   temporary objects, Action objects, ... access from JSP via Object Graph Navigational Language (OGNL)  Multiple view alternatives  JSP, XSLT, Velocity, ...  Simplifies web development     convention over configuration intelligent default values reduce the size of configuration files fosters modularity and loose coupling (dependency injection) standard development process for Struts 2 web applications  Requires no changes to the servlet container  October 25, 2013 regular servlet application Beat Signer - Department of Computer Science - bsigner@vub.ac.be 9
  • 10. Apache Struts 2 web.xml <web-app id="WebApp1" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <filter> <filter-name>struts</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> <init-param> <param-name>actionPackages</param-name> <param-value>be.ac.vub.wise</param-value> </init-param> </filter> <filter-mapping> <filter-name>struts</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <taglib> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> ... </web-app> October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 10
  • 11. Tag Libraries  Introduced to encapsulate reusable Java objects in JSP  provide access to methods on objects  Apache Struts 2 offers four different libraries  HTML - e.g. buttons, form fields, ...  Template - tags that are useful for creating dynamic JSP templates  Bean - e.g. definitions, parameters, ...  Logic - e.g. comparisons, ... October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 11
  • 12. Apache Struts 2 Hello World Example <%@ taglib prefix="s" uri="/struts-tags" %> <html> <head> <title>Hello World</title> </head> <body> <h1><s:property value="message"/></h1> <p>Time: <b><s:property value="currentTime" /></b></p> </body> </html> October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be HelloWorld.jsp 12
  • 13. Apache Struts 2 Hello World Example ... package be.ac.vub.wise; import com.opensymphony.xwork2.ActionSupport; import java.util.Date; public class HelloWorldImpl extends ActionSupport { public static final String MESSAGE = "Hello World!"; public static final String SUCCESS = "success"; private String message; public String execute() throws Exception { setMessage(MESSAGE); return SUCCESS; } public void setMessage(String message){ this.message = message; } public String getMessage() { return message; } public String getCurrentTime(){ return new Date().toString(); } } October 25, 2013 HelloWorldImpl.java Beat Signer - Department of Computer Science - bsigner@vub.ac.be 13
  • 14. Apache Struts 2 Hello World Example ... <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <constant name="struts.enable.DynamicMethodInvocation" value="false"/> <constant name="struts.devMode" value="true"/> <package name="be.ac.vub.wise" namespace="/wise" extends="struts-default"> <action name="HelloWorld" class="be.ac.vub.wise.HelloWorldImpl"> <result>/pages/HelloWorld.jsp</result> </action> ... </package> ... </struts> struts.xml  Execute the Hello World example by sending request to  October 25, 2013 http://localhost:8080/wise/HelloWorld.action Beat Signer - Department of Computer Science - bsigner@vub.ac.be 14
  • 15. Spring Framework  Java application framework  Various extensions for web applications  Modules         October 25, 2013 model-view-controller data access inversion of control container convention-over-configuration remote access framework transaction management authentication and authorisation … Beat Signer - Department of Computer Science - bsigner@vub.ac.be 15
  • 16. Apache Flex  Software development kit for cross-platform Rich Internet Applications (RIAs) based on Adobe Flash  Main components   Adobe Flash Player runtime environment Flex SDK (free) - compiler and debugger, the Flex framework and user interface components  Adobe Flash Builder (commercial) - Eclipse plug-in with MXML compiler and debugger  Separation of user interface and data  user interface described in MXML markup language in combination with ActionScript - compiled into flash executable (SWF flash movie) - better cross-browser compatibility than AJAX October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 16
  • 17. Apache Flex ...  Flex framework offers various actions  e.g. HTTPRequest component  Flex applications can also be deployed as desktop applications via Adobe AIR (Adobe Integrated Runtime) <?xml version="1.0" encoding="UTF-8" ?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal"> <mx:Script> <![CDATA[ import mx.controls.Alert; private function sayHello():void { Alert.show("Hello " + user.text); } ]]> </mx:Script> <mx:Label fontSize="12" text="Name: " /> <mx:TextInput id="user" /> <mx:Button label="Go" click="sayHello()" /> </mx:Application> October 25, 2013 HelloWorld.mxml Beat Signer - Department of Computer Science - bsigner@vub.ac.be 17
  • 18. Microsoft Silverlight  Microsoft's platform for Rich Internet Applications  competitor to Adobe Flash  Runtime requires a browser plug-in   Internet Explorer, Firefox, Safari and Google Chrome Silverlight Core Common Language Runtime (CoreCLR)  A Silverlight application consists of  CreateSilverlight.js and Silverlight.js - initialise the browser plug-in  user interface described in the Extensible Application Markup Language (XAML) - XAML files are not compiled  indexable by search engines  October 25, 2013 code-behind file containing the program logic Beat Signer - Department of Computer Science - bsigner@vub.ac.be 18
  • 19. Microsoft Silverlight ...  Programming based on a subset of the .NET Framework  Silverlight introduces a set of features including  LocalConnection API - asynchronous messaging between multiple applications on the same machine  out-of-browser experiences - locally installed application that runs out-of-the-browser (OOB apps) - cross-platform with Windows/Mac  microphone and Web cam support  Two types of Silverlight web requests  WebClient class - OpenReadAsync (for streaming), DownloadStringAsync as well as uploads  WebRequest - register an asynchronous callback handler (based on HttpWebRequest) October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 19
  • 20. Moonlight  Moonlight is an open source implementation of Silverlight (mainly for Linux) that is developed as part of the Mono project  October 25, 2013 development was abandoned in December 2011 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 20
  • 21. OpenLaszlo  Open source RIA platform  Two main components  LZX programming language - XML and JavaScript - similar to MXML and XAML  OpenLaszlo Server  The Open Laszlo Server compiles LZX applications into different possible runtime components    October 25, 2013 Java Servlets binary SWF files DHTML (HTML, DOM, JavaScript and CSS) Beat Signer - Department of Computer Science - bsigner@vub.ac.be 21
  • 22. Ruby on Rails (RoR)  Open source web application framework  Combination of  dynamic, reflective, object-oriented programming language Ruby - combination of Perl-inspired syntax with "Smalltalk features"  web application framework Rails  Based on MVC architectural pattern  structure of a webpage separated from its functionality via the unobtrusive JavaScript technique  The scaffolding feature offered by Rails can automatically generate some of the models and views that are required for a website  October 25, 2013 developer has to run an external command to generate the code Beat Signer - Department of Computer Science - bsigner@vub.ac.be 22
  • 23. Ruby on Rails (RoR) ...  Ruby on Rails Philosophy  Don't Repeat Yourself (DRY) - information should not be stored redundantly (e.g. do not store information in configuration files if the data can be automatically derived by the system)  Convention over Configuration (CoC) - programmer only has to specify unconventional application settings - naming conventions to automatically map classes to database tables (e.g. by default a 'Sale' model class is mapped to the 'sales' database table) October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 23
  • 24. Video: Ruby on Rails http://media.rubyonrails.org/video/rails_blog_2.mov October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 24
  • 25. Yii Framework  PHP framework for the development of Web 2.0 applications that offers a rich set of features         October 25, 2013 AJAX-enabled widgets web service integration authentication and authorisation flexible presentation via skins and themes Data Access Objects (DAO) interface to transparently access different database management systems integration with the jQuery JavaScript library layered caching ... Beat Signer - Department of Computer Science - bsigner@vub.ac.be 25
  • 26. Zend  Open source PHP framework offering various features        October 25, 2013 MVC architectural pattern loosely coupled components object orientation flexible caching Simple Cloud API features to deal with emails (POP3, IMAP4, …) … Beat Signer - Department of Computer Science - bsigner@vub.ac.be 26
  • 27. CakePHP  Open source PHP web application framework         October 25, 2013 MVC architectural pattern rapid prototyping via scaffolding authentication localisation session management caching validation … Beat Signer - Department of Computer Science - bsigner@vub.ac.be 27
  • 28. Node.js  Server-side JavaScript  handling post/get requests, database, sessions, …  Write your entire app in one language  Built-in web server (no need for Apache, Tomcat, etc.)  High modularity  plug-ins can be added for desired server-side functionality  Other more powerful frameworks such as Express.js build on top of Node.js October 25, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 28
  • 29. Django  Open source Python web application framework        October 25, 2013 MVC architectural pattern don't repeat yourself (DRY) object-relational mapper integrated lightweight web server localisation caching ... Beat Signer - Department of Computer Science - bsigner@vub.ac.be 29
  • 30. Web Content Management Systems  Content management systems that focus on web content  Main functionality  data storage and publishing, user management (including access rights), versioning, workflows  Offline (create static webpages), online (create webpages on the fly) and hybrid systems  Often some kind of server-side caching  Suited for non-technical users since the underlying technology is normally completely hidden  Web CMS Examples  October 25, 2013 Joomla, Drupal, ... Beat Signer - Department of Computer Science - bsigner@vub.ac.be 30
  • 31. Exercise 5  Web Application Frameworks  October 25, 2013 implementation of a Struts 2 application Beat Signer - Department of Computer Science - bsigner@vub.ac.be 31
  • 32. References  Struts 2 Quick Guide  http://www.tutorialspoint.com/struts_2/struts_quick_g uide.htm  Apache Struts 2  http://struts.apache.org/2.x/  Ian Roughley, Struts 2  http://refcardz.dzone.com/refcardz/struts2  Spring Framework  http://www.springsource.org  Apache Flex  October 25, 2013 http://flex.org Beat Signer - Department of Computer Science - bsigner@vub.ac.be 32
  • 33. References ...  Microsoft Silverlight http://www.microsoft.com/silverlight/  http://silverlight.net/learn/videos/silverlightvideos/net-ria-services-intro/   Open Laszlo  http://www.openlaszlo.org  Ruby on Rails Video: Creating a Weblog in 15 Minutes  http://www.youtube.com/watch?v=tUH1hewXnC0  Yii Framework  http://www.yiiframework.com  Zend Framework  October 25, 2013 http://framework.zend.com Beat Signer - Department of Computer Science - bsigner@vub.ac.be 33
  • 34. References ...  CakePHP  http://cakephp.org  Node.js  http://nodejs.org  Django  https://www.djangoproject.com  Comparision of Web Application Frameworks  October 25, 2013 http://en.wikipedia.org/wiki/Comparison_of_web_ application_frameworks Beat Signer - Department of Computer Science - bsigner@vub.ac.be 34
  • 35. Next Lecture Web 2.0 Basics 2 December 2005