SlideShare a Scribd company logo
2 December 2005
Web Technologies
Web Application Frameworks
Prof. Beat Signer
Department of Computer Science
Vrije Universiteit Brussel
http://www.beatsigner.com
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 2October 21, 2016
Web Application Frameworks
 There exist dozens of web application frameworks!
A web application framework is a software framework that
is designed to support the development of dynamic web-
sites, web applications, web services and web resources.
The framework aims to alleviate the overhead associated
with common activities performed in web development.
For example, many frameworks provide libraries for
database access, templating frameworks and session
management, and they often promote code reuse.
[http://en.wikipedia.org/wiki/Web_application_framework]
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 3October 21, 2016
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
 Lead to a faster and more robust development process
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 4October 21, 2016
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
 Controller
 processes interactions with the view
 transforms view interactions into
operations on the model (state
modification)
Model
Controller
View
notifies
modifies
state
selects view
notifies
gets
state
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 5October 21, 2016
All-Inclusive MVC Frameworks
 Java
 Apache Struts 2
 Spring
 PHP
 Yii
 Zend
 CakePHP
 Ruby
 Ruby on Rails
 Python
 Django
 JavaScript
 Node.js + Express.js
 .NET (C#, Visual Basic)
 ASP.NET MVC
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 6October 21, 2016
Apache Struts 2
 Free open source framework for creating enterprise-
ready Java-based web applications
 Action-based MVC Model 2 (Pull MVC) framework
combining Java Servlets and JSP technology
 model
- action (basic building blocks) from which the view can pull information via the
ValueStack
- 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
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 7October 21, 2016
MVC Model 2 (MVC 2) in Struts 2
Model
POJOs
Database
Controller
Servlet
View
e.g. JSP
Browser
1
2
3
4
5
6
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 8October 21, 2016
Apache Struts 2 Architecture
 Receive request
 filter chain
- interception of requests and
responses, e.g. XSLT
transformation
 Execute relevant Action
 invoke interceptors
 read/update data (model)
 Build response (view)
 often based on JSP template
 interceptors in reverse order
 Send response
 again through filter chain
[http://struts.apache.org/2.1.6/docs/big-picture.html]
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 9October 21, 2016
DEMO: Struts 2 Form Validation
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 10October 21, 2016
Spring Framework
 Java application framework
 Various extensions for web applications
 Modules
 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 11October 21, 2016
Yii Framework
 PHP framework for the development of Web 2.0
applications that offers a rich set of features
 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 12October 21, 2016
Zend
 Open source PHP framework offering various features
 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 13October 21, 2016
CakePHP
 Open source PHP web application framework
 MVC architectural pattern
 rapid prototyping via scaffolding
 authentication
 localisation
 session management
 caching
 validation
 …
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 14October 21, 2016
DEMO: CakePHP
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 15October 21, 2016
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
 developer has to run an external command to generate the code
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 16October 21, 2016
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)
 High modularity
 plug-ins can be added for desired server-side functionality
 use RubyGems package manager to easily add plug-ins (“gems”)
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 17October 21, 2016
DEMO: Ruby on Rails
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 18October 21, 2016
Django
 Open source Python web application framework
 MVC architectural pattern
 don't repeat yourself (DRY)
 object-relational mapper
- mapping between model (Python classes) and a relational database
 integrated lightweight web server
 localisation
 caching
 ...
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 19October 21, 2016
Node.js
 Server-side JavaScript
 low-level, comparable to functionality offered by Servlets
 handling post/get requests, database, sessions, …
 Write your entire app in one language
 however, server-side and client-side code still separated
 Built-in web server (no need for Apache, Tomcat, etc.)
 High modularity
 packages can be added for additional functionality (via npm)
 Other more powerful frameworks such as Express.js build
on top of Node.js
 HTTP utility methods (routing, sessions, ...)
 template engines (Jade or EJS)
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 20October 21, 2016
ASP.NET MVC
 Web framework for .NET languages (C#, VB)
 MVC architectural pattern
 inversion of control container
 extensible and pluggable framework
- can use any existing .NET libraries in the form of DLL files
- core components such as view engine or URL routing modules can be
replaced
 can generate some of the client-side JavaScript for you
- form validation
- dynamic updates using Ajax
 localisation
 session management
 caching
 …
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 21October 21, 2016
Specialised Frameworks and Toolkits
 Client-side web frameworks
 Backbone.js
 Ember.js
 Angular.js
 Creating browser-based RIAs
 Microsoft Silverlight
 Creating cross-platform RIAs
 Apache Flex
 Creating desktop applications
 NW.js
 Electron
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 22October 21, 2016
Backbone.js
 Cleanly separate data (Model) and user interface (View)
 you provide server-side interface to read/write models
 Backbone.js does the rest on the client side
 Model
 load and save models from server
 emit events when data changes
 View
 display models, capture user input and interactions
 listens for changes and update view if needed
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 23October 21, 2016
Ember.js
 Client-side MVC
 Built for single-page web applications
 information is refreshed dynamically on demand
 no page refreshes required
 Comes with Ember Data, a data persistence library
 provides facilities for object-relational mapping (ORM)
 maps client-side models to server-side data
 usage is optional, you can also provide your own interface to the
server-side data
 Users can create custom HTML tags ("components")
 can also include logic relevant to the new tag’s function
- e.g. handle user input or deal with child elements placed in between the
custom tags
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 24October 21, 2016
Angular.js
 Client-side "MVC"
 Two-way data binding between models and views
 Plain HTML as templates
 HTML is extended (e.g. via attributes) to map models to the
template, remains valid HTML
 Users can create custom HTML tags ("directives")
 can also include logic relevant to the new tag’s function
<div ng-controller="AlbumCtrl">
<ul>
<li ng-repeat="image in images">
<img ng-src="{{image.thumbnail}}" alt="{{image.description}}">
</li>
</ul>
</div>
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 25October 21, 2016
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
 code-behind file containing the program logic
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 26October 21, 2016
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
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 27October 21, 2016
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)
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 28October 21, 2016
Apache Flex ...
 Flex applications can also be deployed as mobile and
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>
HelloWorld.mxml
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 29October 21, 2016
NW.js
 Formerly node-webkit project
 Bundles your app for usage as desktop application
 Webkit + Node.js + Application Files (HTML, JS, CSS, …)
 Lets you call Node.js modules directly from DOM
 e.g. use filesystem module to read and write files
 Included API provides access to native UI features
 right-click context menu
 system tray icon
 notifications
 …
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 30October 21, 2016
DEMO: NW.js
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 31October 21, 2016
Electron
 Similar to NW.js
 Developed for GitHub's Atom editor, now widely used
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 32October 21, 2016
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
 Graphical interface for creating and managing content
 Suited for non-technical users since the underlying
technology is normally completely hidden
 Web CMS Examples
 Joomla, Drupal, Wordpress, ...
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 33October 21, 2016
Exercise 4
 Java Servlets and Modern Web Application
Frameworks
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 34October 21, 2016
References
 Struts 2 Quick Guide
 http://www.tutorialspoint.com/struts_2/struts_quick_guide.htm
 Apache Struts 2
 http://struts.apache.org
 Ian Roughley, Struts 2
 http://refcardz.dzone.com/refcardz/struts2
 Spring Framework
 http://www.springsource.org
 Yii Framework
 http://www.yiiframework.com
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 35October 21, 2016
References ...
 Zend Framework
 http://framework.zend.com
 CakePHP
 http://cakephp.org
 Ruby on Rails
 http://rubyonrails.org
 Django
 https://www.djangoproject.com
 Node.js
 http://nodejs.org
 http://expressjs.com
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 36October 21, 2016
References ...
 ASP.NET MVC
 http://www.asp.net/mvc
 Backbone.js
 http://backbonejs.org
 Ember.js
 http://emberjs.com
 Angular.js
 https://angularjs.org
 Microsoft Silverlight
 http://www.microsoft.com/silverlight/
 http://silverlight.net/learn/videos/silverlight-videos/net-ria-services-intro/
Beat Signer - Department of Computer Science - bsigner@vub.ac.be 37October 21, 2016
References ...
 Apache Flex
 http://flex.apache.org
 NW.js
 http://nwjs.io
 Electron
 http://electron.atom.io
 Comparision of Web Application Frameworks
 http://en.wikipedia.org/wiki/Comparison_of_web_
application_frameworks
2 December 2005
Next Lecture
CSS3 and Responsive Web Design

More Related Content

PPT
ASP.NET MVC Presentation
PPSX
Spring - Part 1 - IoC, Di and Beans
PPTX
Introduction to mvc architecture
PDF
Quick flask an intro to flask
PPTX
Basics of the Web Platform
PPTX
Visual studio
PDF
Introduction To Single Page Application
PPTX
Laravel ppt
ASP.NET MVC Presentation
Spring - Part 1 - IoC, Di and Beans
Introduction to mvc architecture
Quick flask an intro to flask
Basics of the Web Platform
Visual studio
Introduction To Single Page Application
Laravel ppt

What's hot (20)

PPT
Web server
PDF
Asp.Net Core MVC , Razor page , Entity Framework Core
PPT
Php with MYSQL Database
PPTX
Laravel Tutorial PPT
PDF
Flask Introduction - Python Meetup
PDF
Introduction to Web Frameworks
PPT
MYSQL - PHP Database Connectivity
PDF
Django Introduction & Tutorial
PPTX
Soap vs rest
PDF
Model View Controller (MVC)
ODP
Introduction to ReactJS
PDF
Introduce Bootstrap 3 to Develop Responsive Design Application
PPTX
Web application framework
PPTX
Spring Framework
PPTX
An Introduction To REST API
PPTX
Cross-Site Scripting (XSS)
PPTX
File Uploading in PHP
PPT
Spring mvc
PDF
REST APIs with Spring
PPTX
Cross Site Scripting Defense Presentation
Web server
Asp.Net Core MVC , Razor page , Entity Framework Core
Php with MYSQL Database
Laravel Tutorial PPT
Flask Introduction - Python Meetup
Introduction to Web Frameworks
MYSQL - PHP Database Connectivity
Django Introduction & Tutorial
Soap vs rest
Model View Controller (MVC)
Introduction to ReactJS
Introduce Bootstrap 3 to Develop Responsive Design Application
Web application framework
Spring Framework
An Introduction To REST API
Cross-Site Scripting (XSS)
File Uploading in PHP
Spring mvc
REST APIs with Spring
Cross Site Scripting Defense Presentation
Ad

Viewers also liked (20)

PDF
Front-End Frameworks: a quick overview
PDF
Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
PPT
Top 10 web application development frameworks 2016
PPTX
Architecture & Workflow of Modern Web Apps
PDF
Web Development Presentation
PPTX
Tech Interview Job Prep
PDF
Modern web technologies
PPTX
Introduction to JS frameworks
PDF
Comparing Java Web Frameworks
PPT
DoubleClick
PDF
Introduction - Web Technologies (1019888BNR)
PPTX
Delivering HTML5 and Modern Apps
PPT
Top 10 HTML5 frameworks for effective development in 2016
PDF
Building modern web apps with html5, javascript, and java
PDF
Modern Web App Architectures
PDF
Web app architecture
PDF
Introduction to Google's Cloud Technologies
PPTX
Comparison of Java Web Application Frameworks
PPTX
Web Development Technologies
PPTX
Web Application Development Process presented by @Cygnismedia
Front-End Frameworks: a quick overview
Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
Top 10 web application development frameworks 2016
Architecture & Workflow of Modern Web Apps
Web Development Presentation
Tech Interview Job Prep
Modern web technologies
Introduction to JS frameworks
Comparing Java Web Frameworks
DoubleClick
Introduction - Web Technologies (1019888BNR)
Delivering HTML5 and Modern Apps
Top 10 HTML5 frameworks for effective development in 2016
Building modern web apps with html5, javascript, and java
Modern Web App Architectures
Web app architecture
Introduction to Google's Cloud Technologies
Comparison of Java Web Application Frameworks
Web Development Technologies
Web Application Development Process presented by @Cygnismedia
Ad

Similar to Web Application Frameworks - Web Technologies (1019888BNR) (20)

PDF
Web Application Frameworks - Web Technologies (1019888BNR)
PDF
Lecture 05 web_applicationframeworks
PPTX
Frameworks Galore: A Pragmatic Review
PDF
Angular JS Basics
PPTX
Introduction Java Web Framework and Web Server.
PDF
Web frameworks
PPTX
Latest Web development technologies 2021
PDF
Frameworks
PDF
Web Application Development – Top 8 Frameworks in 2025.pdf
PPT
December 4 SDForum Java Sig Presentation
PPTX
Modern Java Web Development
PDF
Topic_Popular Web Development Frameworks.pdf
PDF
Php framework
PPTX
Php Framework
PPT
Intro to SPA using JavaScript & ASP.NET
PPTX
Php Web Frameworks
PDF
Popular Web Frameworks for web Development
PDF
Best PHP Frameworks
PDF
CG_CS25010_Lecture
PPT
Developing Java Web Applications
Web Application Frameworks - Web Technologies (1019888BNR)
Lecture 05 web_applicationframeworks
Frameworks Galore: A Pragmatic Review
Angular JS Basics
Introduction Java Web Framework and Web Server.
Web frameworks
Latest Web development technologies 2021
Frameworks
Web Application Development – Top 8 Frameworks in 2025.pdf
December 4 SDForum Java Sig Presentation
Modern Java Web Development
Topic_Popular Web Development Frameworks.pdf
Php framework
Php Framework
Intro to SPA using JavaScript & ASP.NET
Php Web Frameworks
Popular Web Frameworks for web Development
Best PHP Frameworks
CG_CS25010_Lecture
Developing Java Web Applications

More from Beat Signer (20)

PDF
Use Cases and Course Review - Lecture 8 - Human-Computer Interaction (1023841...
PDF
HCI Research Methods - Lecture 7 - Human-Computer Interaction (1023841ANR)
PDF
Evaluation Methods - Lecture 6 - Human-Computer Interaction (1023841ANR)
PDF
Design Guidelines and Models - Lecture 5 - Human-Computer Interaction (102384...
PDF
Human Perception and Cognition - Lecture 4 - Human-Computer Interaction (1023...
PDF
Requirements Analysis and Prototyping - Lecture 3 - Human-Computer Interactio...
PDF
HCI and Interaction Design - Lecture 2 - Human-Computer Interaction (1023841ANR)
PDF
Introduction - Lecture 1 - Human-Computer Interaction (1023841ANR)
PDF
Indoor Positioning Using the OpenHPS Framework
PDF
Personalised Learning Environments Based on Knowledge Graphs and the Zone of ...
PDF
Cross-Media Technologies and Applications - Future Directions for Personal In...
PDF
Bridging the Gap: Managing and Interacting with Information Across Media Boun...
PDF
Codeschool in a Box: A Low-Barrier Approach to Packaging Programming Curricula
PDF
The RSL Hypermedia Metamodel and Its Application in Cross-Media Solutions
PDF
Case Studies and Course Review - Lecture 12 - Information Visualisation (4019...
PDF
Dashboards - Lecture 11 - Information Visualisation (4019538FNR)
PDF
Interaction - Lecture 10 - Information Visualisation (4019538FNR)
PDF
View Manipulation and Reduction - Lecture 9 - Information Visualisation (4019...
PDF
Visualisation Techniques - Lecture 8 - Information Visualisation (4019538FNR)
PDF
Design Guidelines and Principles - Lecture 7 - Information Visualisation (401...
Use Cases and Course Review - Lecture 8 - Human-Computer Interaction (1023841...
HCI Research Methods - Lecture 7 - Human-Computer Interaction (1023841ANR)
Evaluation Methods - Lecture 6 - Human-Computer Interaction (1023841ANR)
Design Guidelines and Models - Lecture 5 - Human-Computer Interaction (102384...
Human Perception and Cognition - Lecture 4 - Human-Computer Interaction (1023...
Requirements Analysis and Prototyping - Lecture 3 - Human-Computer Interactio...
HCI and Interaction Design - Lecture 2 - Human-Computer Interaction (1023841ANR)
Introduction - Lecture 1 - Human-Computer Interaction (1023841ANR)
Indoor Positioning Using the OpenHPS Framework
Personalised Learning Environments Based on Knowledge Graphs and the Zone of ...
Cross-Media Technologies and Applications - Future Directions for Personal In...
Bridging the Gap: Managing and Interacting with Information Across Media Boun...
Codeschool in a Box: A Low-Barrier Approach to Packaging Programming Curricula
The RSL Hypermedia Metamodel and Its Application in Cross-Media Solutions
Case Studies and Course Review - Lecture 12 - Information Visualisation (4019...
Dashboards - Lecture 11 - Information Visualisation (4019538FNR)
Interaction - Lecture 10 - Information Visualisation (4019538FNR)
View Manipulation and Reduction - Lecture 9 - Information Visualisation (4019...
Visualisation Techniques - Lecture 8 - Information Visualisation (4019538FNR)
Design Guidelines and Principles - Lecture 7 - Information Visualisation (401...

Recently uploaded (20)

PPTX
master seminar digital applications in india
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
Yogi Goddess Pres Conference Studio Updates
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
Trump Administration's workforce development strategy
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Cell Structure & Organelles in detailed.
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
master seminar digital applications in india
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Anesthesia in Laparoscopic Surgery in India
A systematic review of self-coping strategies used by university students to ...
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Yogi Goddess Pres Conference Studio Updates
GDM (1) (1).pptx small presentation for students
Orientation - ARALprogram of Deped to the Parents.pptx
Trump Administration's workforce development strategy
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Microbial disease of the cardiovascular and lymphatic systems
Cell Structure & Organelles in detailed.
2.FourierTransform-ShortQuestionswithAnswers.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
VCE English Exam - Section C Student Revision Booklet
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Abdominal Access Techniques with Prof. Dr. R K Mishra
Chinmaya Tiranga quiz Grand Finale.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf

Web Application Frameworks - Web Technologies (1019888BNR)

  • 1. 2 December 2005 Web Technologies Web Application Frameworks Prof. Beat Signer Department of Computer Science Vrije Universiteit Brussel http://www.beatsigner.com
  • 2. Beat Signer - Department of Computer Science - [email protected] 2October 21, 2016 Web Application Frameworks  There exist dozens of web application frameworks! A web application framework is a software framework that is designed to support the development of dynamic web- sites, web applications, web services and web resources. The framework aims to alleviate the overhead associated with common activities performed in web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and they often promote code reuse. [http://en.wikipedia.org/wiki/Web_application_framework]
  • 3. Beat Signer - Department of Computer Science - [email protected] 3October 21, 2016 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  Lead to a faster and more robust development process
  • 4. Beat Signer - Department of Computer Science - [email protected] 4October 21, 2016 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  Controller  processes interactions with the view  transforms view interactions into operations on the model (state modification) Model Controller View notifies modifies state selects view notifies gets state
  • 5. Beat Signer - Department of Computer Science - [email protected] 5October 21, 2016 All-Inclusive MVC Frameworks  Java  Apache Struts 2  Spring  PHP  Yii  Zend  CakePHP  Ruby  Ruby on Rails  Python  Django  JavaScript  Node.js + Express.js  .NET (C#, Visual Basic)  ASP.NET MVC
  • 6. Beat Signer - Department of Computer Science - [email protected] 6October 21, 2016 Apache Struts 2  Free open source framework for creating enterprise- ready Java-based web applications  Action-based MVC Model 2 (Pull MVC) framework combining Java Servlets and JSP technology  model - action (basic building blocks) from which the view can pull information via the ValueStack - 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
  • 7. Beat Signer - Department of Computer Science - [email protected] 7October 21, 2016 MVC Model 2 (MVC 2) in Struts 2 Model POJOs Database Controller Servlet View e.g. JSP Browser 1 2 3 4 5 6
  • 8. Beat Signer - Department of Computer Science - [email protected] 8October 21, 2016 Apache Struts 2 Architecture  Receive request  filter chain - interception of requests and responses, e.g. XSLT transformation  Execute relevant Action  invoke interceptors  read/update data (model)  Build response (view)  often based on JSP template  interceptors in reverse order  Send response  again through filter chain [http://struts.apache.org/2.1.6/docs/big-picture.html]
  • 9. Beat Signer - Department of Computer Science - [email protected] 9October 21, 2016 DEMO: Struts 2 Form Validation
  • 10. Beat Signer - Department of Computer Science - [email protected] 10October 21, 2016 Spring Framework  Java application framework  Various extensions for web applications  Modules  model-view-controller  data access  inversion of control container  convention-over-configuration  remote access framework  transaction management  authentication and authorisation  …
  • 11. Beat Signer - Department of Computer Science - [email protected] 11October 21, 2016 Yii Framework  PHP framework for the development of Web 2.0 applications that offers a rich set of features  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  ...
  • 12. Beat Signer - Department of Computer Science - [email protected] 12October 21, 2016 Zend  Open source PHP framework offering various features  MVC architectural pattern  loosely coupled components  object orientation  flexible caching  Simple Cloud API  features to deal with emails (POP3, IMAP4, …)  …
  • 13. Beat Signer - Department of Computer Science - [email protected] 13October 21, 2016 CakePHP  Open source PHP web application framework  MVC architectural pattern  rapid prototyping via scaffolding  authentication  localisation  session management  caching  validation  …
  • 14. Beat Signer - Department of Computer Science - [email protected] 14October 21, 2016 DEMO: CakePHP
  • 15. Beat Signer - Department of Computer Science - [email protected] 15October 21, 2016 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  developer has to run an external command to generate the code
  • 16. Beat Signer - Department of Computer Science - [email protected] 16October 21, 2016 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)  High modularity  plug-ins can be added for desired server-side functionality  use RubyGems package manager to easily add plug-ins (“gems”)
  • 17. Beat Signer - Department of Computer Science - [email protected] 17October 21, 2016 DEMO: Ruby on Rails
  • 18. Beat Signer - Department of Computer Science - [email protected] 18October 21, 2016 Django  Open source Python web application framework  MVC architectural pattern  don't repeat yourself (DRY)  object-relational mapper - mapping between model (Python classes) and a relational database  integrated lightweight web server  localisation  caching  ...
  • 19. Beat Signer - Department of Computer Science - [email protected] 19October 21, 2016 Node.js  Server-side JavaScript  low-level, comparable to functionality offered by Servlets  handling post/get requests, database, sessions, …  Write your entire app in one language  however, server-side and client-side code still separated  Built-in web server (no need for Apache, Tomcat, etc.)  High modularity  packages can be added for additional functionality (via npm)  Other more powerful frameworks such as Express.js build on top of Node.js  HTTP utility methods (routing, sessions, ...)  template engines (Jade or EJS)
  • 20. Beat Signer - Department of Computer Science - [email protected] 20October 21, 2016 ASP.NET MVC  Web framework for .NET languages (C#, VB)  MVC architectural pattern  inversion of control container  extensible and pluggable framework - can use any existing .NET libraries in the form of DLL files - core components such as view engine or URL routing modules can be replaced  can generate some of the client-side JavaScript for you - form validation - dynamic updates using Ajax  localisation  session management  caching  …
  • 21. Beat Signer - Department of Computer Science - [email protected] 21October 21, 2016 Specialised Frameworks and Toolkits  Client-side web frameworks  Backbone.js  Ember.js  Angular.js  Creating browser-based RIAs  Microsoft Silverlight  Creating cross-platform RIAs  Apache Flex  Creating desktop applications  NW.js  Electron
  • 22. Beat Signer - Department of Computer Science - [email protected] 22October 21, 2016 Backbone.js  Cleanly separate data (Model) and user interface (View)  you provide server-side interface to read/write models  Backbone.js does the rest on the client side  Model  load and save models from server  emit events when data changes  View  display models, capture user input and interactions  listens for changes and update view if needed
  • 23. Beat Signer - Department of Computer Science - [email protected] 23October 21, 2016 Ember.js  Client-side MVC  Built for single-page web applications  information is refreshed dynamically on demand  no page refreshes required  Comes with Ember Data, a data persistence library  provides facilities for object-relational mapping (ORM)  maps client-side models to server-side data  usage is optional, you can also provide your own interface to the server-side data  Users can create custom HTML tags ("components")  can also include logic relevant to the new tag’s function - e.g. handle user input or deal with child elements placed in between the custom tags
  • 24. Beat Signer - Department of Computer Science - [email protected] 24October 21, 2016 Angular.js  Client-side "MVC"  Two-way data binding between models and views  Plain HTML as templates  HTML is extended (e.g. via attributes) to map models to the template, remains valid HTML  Users can create custom HTML tags ("directives")  can also include logic relevant to the new tag’s function <div ng-controller="AlbumCtrl"> <ul> <li ng-repeat="image in images"> <img ng-src="{{image.thumbnail}}" alt="{{image.description}}"> </li> </ul> </div>
  • 25. Beat Signer - Department of Computer Science - [email protected] 25October 21, 2016 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  code-behind file containing the program logic
  • 26. Beat Signer - Department of Computer Science - [email protected] 26October 21, 2016 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
  • 27. Beat Signer - Department of Computer Science - [email protected] 27October 21, 2016 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)
  • 28. Beat Signer - Department of Computer Science - [email protected] 28October 21, 2016 Apache Flex ...  Flex applications can also be deployed as mobile and 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> HelloWorld.mxml
  • 29. Beat Signer - Department of Computer Science - [email protected] 29October 21, 2016 NW.js  Formerly node-webkit project  Bundles your app for usage as desktop application  Webkit + Node.js + Application Files (HTML, JS, CSS, …)  Lets you call Node.js modules directly from DOM  e.g. use filesystem module to read and write files  Included API provides access to native UI features  right-click context menu  system tray icon  notifications  …
  • 30. Beat Signer - Department of Computer Science - [email protected] 30October 21, 2016 DEMO: NW.js
  • 31. Beat Signer - Department of Computer Science - [email protected] 31October 21, 2016 Electron  Similar to NW.js  Developed for GitHub's Atom editor, now widely used
  • 32. Beat Signer - Department of Computer Science - [email protected] 32October 21, 2016 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  Graphical interface for creating and managing content  Suited for non-technical users since the underlying technology is normally completely hidden  Web CMS Examples  Joomla, Drupal, Wordpress, ...
  • 33. Beat Signer - Department of Computer Science - [email protected] 33October 21, 2016 Exercise 4  Java Servlets and Modern Web Application Frameworks
  • 34. Beat Signer - Department of Computer Science - [email protected] 34October 21, 2016 References  Struts 2 Quick Guide  http://www.tutorialspoint.com/struts_2/struts_quick_guide.htm  Apache Struts 2  http://struts.apache.org  Ian Roughley, Struts 2  http://refcardz.dzone.com/refcardz/struts2  Spring Framework  http://www.springsource.org  Yii Framework  http://www.yiiframework.com
  • 35. Beat Signer - Department of Computer Science - [email protected] 35October 21, 2016 References ...  Zend Framework  http://framework.zend.com  CakePHP  http://cakephp.org  Ruby on Rails  http://rubyonrails.org  Django  https://www.djangoproject.com  Node.js  http://nodejs.org  http://expressjs.com
  • 36. Beat Signer - Department of Computer Science - [email protected] 36October 21, 2016 References ...  ASP.NET MVC  http://www.asp.net/mvc  Backbone.js  http://backbonejs.org  Ember.js  http://emberjs.com  Angular.js  https://angularjs.org  Microsoft Silverlight  http://www.microsoft.com/silverlight/  http://silverlight.net/learn/videos/silverlight-videos/net-ria-services-intro/
  • 37. Beat Signer - Department of Computer Science - [email protected] 37October 21, 2016 References ...  Apache Flex  http://flex.apache.org  NW.js  http://nwjs.io  Electron  http://electron.atom.io  Comparision of Web Application Frameworks  http://en.wikipedia.org/wiki/Comparison_of_web_ application_frameworks
  • 38. 2 December 2005 Next Lecture CSS3 and Responsive Web Design