Web Frameworks. web development done right. Course of Web Technologies A.A. 2010/2011 Valerio Maggio, PhD Student Prof.



Similar documents
Web Cloud Architecture

Ruby on Rails. a high-productivity web application framework. blog.curthibbs.us/ Curt Hibbs <curt@hibbs.com>

Web Application Frameworks. Robert M. Dondero, Ph.D. Princeton University

How To Build A Web App

Choosing a Content Management System (CMS)

BEST WEB PROGRAMMING LANGUAGES TO LEARN ON YOUR OWN TIME

Rapid Application Development. and Application Generation Tools. Walter Knesel

A Comparison of Open Source Application Development Frameworks for the Enterprise

Java in Web 2.0. Alexis Roos Principal Field Technologist, CTO Office OEM SW Sales Sun Microsystems, Inc.

A review and analysis of technologies for developing web applications

Web Application Development and Frameworks

Web Development Frameworks

Enterprise Application Development In Java with AJAX and ORM

Oracle Application Express MS Access on Steroids

Customer Bank Account Management System Technical Specification Document

CrownPeak Java Web Hosting. Version 0.20

Pentesting Web Frameworks (preview of next year's SEC642 update)

Building Web Applications, Servlets, JSP and JDBC

Outline. Lecture 18: Ruby on Rails MVC. Introduction to Rails

Ruby on Rails. Object Oriented Analysis & Design CSCI-5448 University of Colorado, Boulder. -Dheeraj Potlapally

Portals, Portlets & Liferay Platform

GUI and Web Programming

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Syllabus INFO-UB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

UNIVERSITY OF ILLINOIS AT CHICAGO University of Illinois Ready

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Ruby on Rails is a web application framework written in Ruby, a dynamically typed programming language The amazing productivity claims of Rails is

CSE 510 Web Data Engineering

What s really under the hood? How I learned to stop worrying and love Magento

Web Pages. Static Web Pages SHTML

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

Server-Side Scripting and Web Development. By Susan L. Miertschin

Dynamic website development using the Grails Platform. Joshua Davis Senior Architect Cognizant Technology Solutions

The Learn-Verified Full Stack Web Development Program

Standards, Tools and Web 2.0

How To Use An Informix System With A Computer System (For A Dba)

DTWMS Required Software Engineers. 1. Senior Java Programmer (3 Positions) Responsibilities:

Ruby On Rails. CSCI 5449 Submitted by: Bhaskar Vaish

Trollhättan, Sweden

Web Application Development

2012 LABVANTAGE Solutions, Inc. All Rights Reserved.

JAVA/J2EE DEVELOPER RESUME

Software Development Interactief Centrum voor gerichte Training en Studie Edisonweg 14c, 1821 BN Alkmaar T:

Requirements Design Implementation. Software Architectures. Components Software Component Architecture. DSSA: Domain-Specific Software Architectures

Developing ASP.NET MVC 4 Web Applications MOC 20486

Client-server 3-tier N-tier

MVC pattern in java web programming

WEB APPLICATION DEVELOPMENT. UNIT I J2EE Platform 9

JEE Web Applications Jeff Zhuk

Developing ASP.NET MVC 4 Web Applications

Web 2.0 Technology Overview. Lecture 8 GSL Peru 2014

THE ROAD TO CODE. ANDROID DEVELOPMENT IMMERSIVE May 31. WEB DEVELOPMENT IMMERSIVE May 31 GENERAL ASSEMBLY

Oracle Application Development Framework Overview

Web Design Technology

B. WEB APPLICATION ARCHITECTURE MODELS

A benchmark approach to analyse the security of web frameworks

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

Credits: Some of the slides are based on material adapted from

An introduction to creating JSF applications in Rational Application Developer Version 8.0

Service Oriented Architectures

ORM IN WEB PROGRAMMING. Course project report for 6WW Erik Wang

Enterprise Application Integration

Chapter 13 Computer Programs and Programming Languages. Discovering Computers Your Interactive Guide to the Digital World

Integration the Web 2.0 way. Florian Daniel April 28, 2009

Web Programming Languages Overview

Web Hosting Prep Lab Homework #2 This week: Setup free web hosting for your project Pick domain name and check whether it is available Lots of free

Design Approaches of Web Application with Efficient Performance in JAVA

alchemy webapp framework Introduction What is alchemy?

SwiftScale: Technical Approach Document

Using Ruby on Rails for Web Development. Introduction Guide to Ruby on Rails: An extensive roundup of 100 Ultimate Resources

SOA, case Google. Faculty of technology management Information Technology Service Oriented Communications CT30A8901.

Django Web Framework. Zhaojie Zhang CSCI5828 Class Presenta=on 03/20/2012

The Oracle Fusion Development Platform

Framework Adoption for Java Enterprise Application Development

Course Name: Course in JSP Course Code: P5

Java/J2EE or Web Developer. Formal Education. Technical knowledge. Spoken Languages

This document gives an outline of Tim Ward s work on mobile phone systems

Developing ASP.NET MVC 4 Web Applications Course 20486A; 5 Days, Instructor-led

Glassfish, JAVA EE, Servlets, JSP, EJB

Web Application Development

Complete Java Web Development

What Is the Java TM 2 Platform, Enterprise Edition?

Logicify Fact Sheet. We bring logic to the software systems and development processes. We call this process to logicify.

A COMPONENT BASED METHODOLOGY FOR WEB APPLICATION DEVELOPMENT USING RUBY ON RAILS. Presentation 1 13 th July 2009 by Brett Nisbett

A Comparative Study of Web Development Technologies Using Open Source and Proprietary Software

Specialized Programme on Web Application Development using Open Source Tools

Open Source Technologies on Microsoft Azure

Project Plan Dealer Improvement Recommender System

APP DEVELOPMENT ON THE CLOUD MADE EASY WITH PAAS

Web Development News, Tips and Tutorials

PRINCIPAL JAVA ARCHITECT JOB ID: WD001087

tibbr Now, the Information Finds You.

Grails: Accelerating J2EE Application Development

Source code provided vs Open Source vs Free software Open Source comprises:

Executive Summary. Within IT Services, Cosmic Creation spotlights on the following:-

Experiences on a Design Approach for Interactive Web Applications

Net-WMS FP Net-WMS SPECIFIC TARGETED RESEARCH OR INNOVATION PROJECT. Networked Businesses. D.8.1 Networked architecture J2EE compliant

Proposal for DSpace Web MVC

Building native mobile apps for Digital Factory

Transcription:

Web Frameworks web development done right Course of Web Technologies A.A. 2010/2011 Valerio Maggio, PhD Student Prof.ssa Anna Corazza

Outline 2 Web technologies evolution Web frameworks Design Principles Case Study Django and GAE (Google App Engine) Working Example

Intruduction 3 Nowadays frameworks has become a buzzword Software framework Web framework Development framework So, what do you expect a web framework is?

1. Web Technologies Evolution 4

Web: Evolution Roadmap 1 5 HTML Pages HTML Pages: Web developers wrote every page by hand Update a web site means editing HTML redesign involved redoing every page One at a time Solution not scalable

Web: Evolution Roadmap HTML Pages 2 6 CGI Scripting CGI Common Gateway Interface (+) Pages intended as resources Pages are generated dynamically on demand Raise of (so called) server side technologies (-) Code reuse difficult Lot of boilerplate code (-) High learning curve

CGI Perl Example 7 What are pros and cons of these two CGI examples?

Web: Evolution Roadmap CGI Scripting 3 8 HTML Pages PHP like solutions PHP like languages (+) Learning curve extremely shallow Code directly embedded into HTML (-) No security and/or protection mechanism provided (?) Bunch of HTML, (Business Logic) Code, (Data) SQL code all together

JSP Example: Pros and Cons? 9

Web: Evolution Roadmap PHP, ASP, JSP,... 4 10 HTML Pages CGI Scripting RIA and Integrated solutions RIA and Integrated Solutions RIA: Rich Internet Applications Q: Do you know what RIA means? A: Desktop-like web applications (Ajax and javascript intensive web apps) A.k.a. Solutions battery included CMS and Web Frameworks

CMS: Content Management System 11 Aim to manage work-flows and contents in a collaborative environment Designed to simplify the publication of contents to web sites and mobile devices Examples: Joomla, Drupal, Wordpress,.

Web frameworks 12 Aim to alleviate the overhead associated with common Web development Databases, templates, sessions, Designed to support the development of dynamic websites, web applications and web services Examples: Struts, Spring, Ruby on Rails, Django, Google App Engine,...

So, What is a Web Framework? 13 What does this code do? What happens when multiple pages need to connect to database? Should a developer really have to worry about printing the Content-type? Is this code reusable in multiple environments with different DB connection parameters? What happens when a web designer have to redesign the page?

Web Frameworks in a nutshell 14 These problems are exactly what a web frameworks tries to solve Web frameworks provides a programming infrastructure for applications Focus on developing code without having to reinvent the wheel

2. Web Frameworks Design Principles 15

CGI Architecture Model 16 Presentation and Visualization Business Logic Data and Models

CGI Architecture Model 17 Task centric architecture (a.k.a. Model 1) Difficult reusability and maintenance of code Requires different skill-sets High coupling among: Presentation (View) How to show data Processing (Controller) What information to show Data Acquisition (Model) What information to extract (from DB)

Model 1 Architecture (Java) 18 Processing delegates as JSP and Servlets Is there any difference between CGI and Servlet?

MVC Architecture Model 19 Model: Manages domain and data acquisition View: Manages the visualization of data Controller: Manages domain and data processing Q: Do you think this model is feasible to be used on the web as is?

Web-MVC Architecture Model 20 Model: Manages domain and data acquisition View: Manages the visualization of data Controller: Manages domain and data processing A: No (direct) relationship between the view and the model

Model 2 Architecture (Java) 21 Model: EJB and Javabeans View: JSP and JFaces Controller: Servlets

Fulll-stack web frameworks 22 From Python.org wiki: [..] frameworks provide support for a number of activities such as interpreting requests, producing responses, storing data persistently, and so on. [..] those frameworks [..] are often known as fullstack frameworks in that they attempt to supply components for each layer in the stack. So, what are such components?

Web Frameworks Capabilities 23 View JavaScript Library Template Engine and View Composition Development Server Controller URL Routing Controller-view Association Model Database Abstraction ORM (Object Relational Mapping)

Database Access 24 Distributed Access Logic (JSP, Servlets) Centralized Access Logic Q: How easy is modify the db schema?

Active Record pattern 25 An object encapsulates both data and behavior Put data access logic in the domain object http://martinfowler.com/eaacatalog/activerecord.html

Heavy-weight vs Light-weight Frameworks 26 Heavy-weight frameworks: (Mostly) Java Based Based on Model 2 Architecture High learning curve Bunch of (XML) Configuration Files Light-weight frameworks: Convention over Configuration and DRY Principles Shallow learning curve Use of Dynamic Languages Python, Ruby, Groovy, Scala

H-W Java frameworks: Struts 27

H-W Java frameworks: Hibernate 28

Design Principles 29 Convention over configuration Convention over Configuration is a programming design that favors following a certain set of programming conventions instead of configuring an application framework. [...] DRY (Don't repeat yourself) DRY is a principle that focuses on reducing information duplication by keeping any piece of knowledge in a system in only one place.

3. Case Study: Django and Google App Engine 30

Frameworks and Languages 31

Python Programming Language 32 Speed and flexibility of development are critical. Dynamic languages let you get more done with less lines of code (which means less bugs) Object oriented languages Clean and simple syntax Strong Typed Dynamic Typed

Python Programming Language 33 Is there someone that uses python in professional projects? IBM, Google, Sun, HP, Industrial Light and Magic, NASA, Microsoft Goggle it: site:microsoft.com python You'll get more than 9 thousands results

Python: Language of the year 2010 34 Programming language Python has become programming language of 2010. This award is given to the programming language that gained most market share in 2010. Python grew 1.81% since January 2010. This is a bit more than runner up Objective-C (+1.63%). Objective-C was favorite for the title for a long time thanks to the popularity of Apple's iphone and ipad platforms. However, it lost too much popularity the last couples of months. Python has become the "de facto" standard in system scripting (being a successor of Perl in this), but it is used for much more different types of application areas nowadays. Python is for instance very popular among web developers, especially in combination with the Django framework. Since Python is easy to learn, more and more universities are using Python to teach programming languages. Source: tiobe.com

TIOBE: Programming Languages ranking 35 http://www.tiobe.com

Python Dynamic Typing 36 Duck Typing Walks like a duck? Quacks like a duck? def half (n): return n/2.0 Q: What is the type of variable n? It's a duck!

Django web framework 37 Design characteristics Model-View-Controller for the Web Written in Python Explicit instead of implicit Loose Coupling Don't repeat yourself

Django Architecture Model 38 Django is based on a slightly different version of MVC a.k.a. MVT: Model View Template Model: Domain Objects Python Classes View: contains business logic for the pages Callback as python functions Templates: describes the design of the page Template Language HTML based

Django Stack 39 Database wrapper (ORM) URL dispatcher Template system Admin Framework I18n & l10n Authentication RSS...

Projects and Applications 40 Projects: Composed by different applications Glued together by unique configuration file Applications: Set of portable functionalities Code is more reusable Django Plugables (djangoplugables.com)

URL Dispatcher 41 Loose coupling principle between URLs and Views Based on regular expressions

Template Language 42 Very restrictive specific-language Allows only presentation operations No logic and/or processing allowed Less Pythonic Oriented to web designers HTML based Templates Inheritance Mechanism Code Reuse

Template Language (2) Template Inheritance Templates are composed by Blocks 43

Template Language (3) 44 Variables: {{ variable_name }} Tags: {% template_tag %} Board definition: Tags tell the framework to do something Filters: {{ variable filter }} Alters the formatting of variables

Django Admin Framework 45 So called Killer-application Compliant with Active record Pattern

Django Included Apps 46 django.contrib.auth An authentication system. django.contrib.contenttypes A framework for content types. django.contrib.sessions A session framework. django.contrib.sites A framework for managing multiple sites with one Django installation. django.contrib.messages A messaging framework.

Google App Engine 47 dynamic web serving (built on top of Django) e.g. supports Django Templating Language persistent storage automatic scaling and load balancing APIs for authenticating using Google Accounts a fully featured local development environment scheduled tasks for triggering events at specified times and regular intervals

References: Google App Engine 48 http://code.google.com/appengine/

References: Django 49 http://www.djangoproject.com/ Sito del Progetto https://groups.google.com/forum/#!forum/django-it Google group Italiano di Django

References: Python 50 http://www.python.org Sito ufficiale di Python http://www.python.it Sito ufficiale Python Italia https://groups.google.com/forum/#!forum/it.comp.lang.python Google group Italiano di Python http://forum.python-it.org Forum (~)official Python Italia http://www.pycon.it/ Python Italian Conference EuroPython 2011 Florence, IT across spring

References: Titles 51 The definitive guide to Django A. Holovaty and J.K. Moss, Apress

References: Titles 52 Sviluppare applicazioni web con Django, Marco Beri,APOGEO

References: Titles 53 Python, Marco Beri, APOGEO Serie Pocket

References: Titles 54 Programming Google App Engine, D. Sanderson,O'Reilly

And last... 55 Want to get some actions? Let's do together a working example