An overview of Web development (for PDL)



Similar documents
ACM Crossroads Student Magazine The ACM's First Electronic Publication

Servlets. Based on Notes by Dave Hollinger & Ethan Cerami Also, the Online Java Tutorial by Sun

Client-server 3-tier N-tier

Building Java Servlets with Oracle JDeveloper

In this chapter, we lay the foundation for all our further discussions. We start

Java EE Introduction, Content. Component Architecture: Why and How Java EE: Enterprise Java

Course Name: Course in JSP Course Code: P5

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

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

Outline. CS 112 Introduction to Programming. Recap: HTML/CSS/Javascript. Admin. Outline

«Shanoir : une solu/on pour la ges/on de données distribuées en imagerie in- vivo» Jus/ne Guillaumont Isabelle Corouge

PRMS.

Creating Java EE Applications and Servlets with IntelliJ IDEA

Solaris 10 Documentation README

Complete Java Web Development

MBARI Deep Sea Guide: Designing a web interface that represents information about the Monterey Bay deep-sea world.

Sun Management Center Change Manager Release Notes

Glassfish, JAVA EE, Servlets, JSP, EJB

Systems Middleware. Agenda. Evènements Annonces majeures. IIB v10 MQ Appliance. Performances IBM Corporation p2

Web Container Components Servlet JSP Tag Libraries

Administrer les solutions Citrix XenApp et XenDesktop 7.6 CXD-203

Web Application Architecture (based J2EE 1.4 Tutorial)

Comparing JavaServer Pages Technology and Microsoft Active Server Pages

Web Application Development

Thursday, February 7, DOM via PHP

Software Architecture

Smart Use of Annotation Processing

Developing Web Applications using JavaServer Pages and Servlets

Principles and Techniques of DBMS 5 Servlet

Rapid Application Development. and Application Generation Tools. Walter Knesel

Specialized Programme on Web Application Development using Open Source Tools

Introduction to J2EE Web Technologies

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

Enterprise Informa/on Modeling: An Integrated Way to Track and Measure Asset Performance

You can choose to install the plugin through Magento Connect or by directly using the archive files.

Web Applications. Originals of Slides and Source Code for Examples:

Exam Prep. Sun Certified Web Component Developer (SCWCD) for J2EE Platform

Oracle WebLogic Server 11g: Administration Essentials

Introduction au BIM. ESEB Seyssinet-Pariset Economie de la construction contact@eseb.fr

Java Servlet Specification Version 2.3

SSC - Web applications and development Introduction and Java Servlet (II)

Design Approaches of Web Application with Efficient Performance in JAVA

Java with Eclipse: Setup & Getting Started

Servlet 3.0. Alexis Moussine-Pouchkine. mercredi 13 avril 2011

MULTICULTURAL CONTENT MANAGEMENT SYSTEM

HelloWorld SOAP Sample:

Enterprise Application Development In Java with AJAX and ORM

A framework for web-based product data management using J2EE

Web Programming II JSP (Java Server Pages) ASP request processing. The Problem. The Problem. Enterprise Application Development using J2EE

N1 Grid Service Provisioning System 5.0 User s Guide for the Linux Plug-In

Getting Started with Web Applications

Modern Web Application Framework Python, SQL Alchemy, Jinja2 & Flask

SUN SEEBEYOND ebam STUDIO RELEASE NOTES. Release 5.1.2

Specialized Programme on Web Application Development using Open Source Tools

Customer Bank Account Management System Technical Specification Document

Building Web Applications, Servlets, JSP and JDBC

CS Developing Web Applications with Java Technologies

Durée 4 jours. Pré-requis

Oracle Hyperion Financial Management Custom Pages Development Guide

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Google Web Toolkit (GWT) Architectural Impact on Enterprise Web Application

Hello World RESTful web service tutorial

Setting up a monitoring and remote control tool

Sun Management Center 3.6 Version 5 Add-On Software Release Notes

Altiris Patch Management Solution for Windows 7.6 from Symantec Third-Party Legal Notices

RedTigerSoftware. WEB DEVELOPERS Introduction & Portfolio

Accessing Data with ADOBE FLEX 4.6

Web Programming Languages Overview

Veritas Storage Foundation 5.0 Software for SPARC

OXAGILE RESUMES SUMMARY OF QUALIFICATIONS TECHNICAL SKILLS SENIOR JAVA SOFTWARE ENGINEER

Lecture 10 Fundamentals of GAE Development. Cloud Application Development (SE808, School of Software, Sun Yat-Sen University) Yabo (Arber) Xu

Hudson configuration manual

Model-View-Controller. and. Struts 2

Application Security

The Google Web Toolkit (GWT): The Model-View-Presenter (MVP) Architecture Official MVP Framework

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

Intégrez SharePoint Avec Lotus Notes

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

Budget Event Management Design Document

MarkLogic Server. Reference Application Architecture Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

Monitoring Applications on Pramati Server

Server Setup and Configuration

A Java Framework for Multi-Tier Web-Centric Applications Development

Altiris Patch Management Solution for Windows 7.5 SP1 from Symantec Third-Party Legal Notices

JReport Server Deployment Scenarios

Course Number: IAC-SOFT-WDAD Web Design and Application Development

A Model of the Operation of The Model-View- Controller Pattern in a Rails-Based Web Server

AD-HOC QUERY BUILDER

WEB APPLICATION DEVELOPMENT. UNIT I J2EE Platform 9

Transcription:

An overview of Web development (for PDL) Master 1 - MIAGE Mathieu Acher Maître de Conférences mathieu.acher@irisa.fr

Material h@p://mathieuacher.com/teaching/ipdl- MIAGE1/ 2

Fournisseurs GesGonnaire Clients Système de ges<on de catalogue web de produits Plateforme d échange Ges<on des produits configurateur

A rendre Livrable d'analyse (A1) Livrable de concep<on (D1) Livrable de valida<on (V1) Code (C1) Livrable qualité (Q1)

Code (C1) Contenu Code source de l applica<on Incluant jeu de tests Instruc<ons sur comment installer, exécuter et tester l applica<on «Le code sera à rendre de façon électronique et non sur papier» Soit via une archive mail Soit en pointant la forge, le github ou googlecode En s assurant que j ai bien les droits

Code (C1) Code source de l applica<on Java (ou PHP) Liberté totale pour les frameworks JEE, Play!, GWT, Symfony, etc. Bonnes propriétés Code documenté, respectant une certaine conven<on Design paaerns Maven ou ANT- like pour générer la documenta<on, exécuter les tests, et déployer l applica<on

Code (C1) & Soutenance Date limite de rendu du code 15 janvier 23:59:59 ~ 1 jour avant la soutenance Soutenance 16 janvier 15 de présenta<on 5 de ques<ons Individuelles ou au groupe Défense de votre travail Retour d expérience A1, D1, V1, C1

A rendre Livrable d'analyse (A1) Livrable de concep<on (D1) Livrable de valida<on (V1) Code (C1) ApplicaGon Web Livrable qualité (Q1)

Web browser request HTTP server response

Web browser HTTP server request response

Web browser HTTP server request response

request Web browser HTTP server response

Web browser request response HTTP server Java program (or PHP or Ruby or Scala or ) ~ treat requests and user inputs (e.g., input forms) ~ generate HTML/JS/CSS stuff accordingly Can be highly complex and require a combina<on of technology (user session, data storage, business logic, user interface concerns, performance, reliability, etc.)

Web browser request response HTTP server Java program (or PHP or Ruby or Scala or ) JEE (Servlets+JSP) Play! framework

Web browser request response HTTP server Java program (or PHP or Ruby or Scala or ) Disclaimer: this is just an overview with a quick focus on two technologies #1 You can consider other technologies as well (the principles are likely to be the same) #2 You will have to learn and prac<ce more by yourself (available for any ques<ons)

Web browser request response HTTP server Java servlet (and Java ecosystem actually)

Java Servlet Java program rely on Java ecosystem Receive and treat HTTP requests inputs (e.g., input forms) resources (e.g., images) Generate web pages on the fly Response to clients (browser) HTML code + (JavaScript + CSS)

Web browser HTTP server request response Java servlet Treat input forms Iden<fy/Retrieve User (if everything goes fine) Find associated Followers/tweets/ads Generate HTML stuff

The server responds according to the URL of the request («context») Different applica<ons/processings according to different contexts HTTP server Java servlets

Client, Server and Java Servlet

Java Servlet (Hello World)

Java Servlet (zoom on doget )

Servlet Container HTTP server does not know how to execute the Java code of a servlet (obvious) HTTP requests, that s it A servlet container is needed and manages a set of servlets Management of servlet names (class names) Crea<on and ini<aliza<on of servlets Dele<on of servlets HTTP server delegates the requests to the container HTTP server Java servlets

URL Client (browser) won t specify a direct reference to a Servlet but rather an URL The web applica<on should establish a correspondence between an URL and a servlet Mapping URL- Servlet The corresponding container of the servlet will execute the servlet

Mapping URL- Servlet Two solu<ons Java annota<ons web.xml (configura<on file)

Mapping URL- Servlet Java annotagons (since Servlet 3.0)

Mapping URL- Servlet web.xml (configura<on file, since the beginning) Included in the WAR archive that packages all code and resources of the applica<ons

Mapping URL- Servlet web.xml (configura<on file, since the beginning) Joker can be used <url- paaern>/users/*</url- paaern>

H@pServlet (1)

H@pServlet (2) service() method of HapServlet delegates the treatment to another method, depending on the kinf of HTTP request sent by the client doget(), dopost(), doput(), dodelete(), dohead(), doop<ons(), dotrace()

Boil down to WriGng a Servlet Wri<ng a class that inherits from HapServlet Override at least one method (doget, dopost, etc.) Eventually override init or destroy if the servlet manages a set of resources that need to be ini<alized or removed

Boil down to WriGng a Servlet Wri<ng a class that inherits from HapServlet Override at least one method (doget, dopost, etc.) Eventually override init or destroy if the servlet manages a set of resources that need to be ini<alized or removed

HTTP recalls TreaGng input forms (1) Servlet in acgon With GET (within the URL): hap://www.truc.com/abonnement? id=23378&nom=toto&op=d&v=56 With POST Parameters are directly in the HTTP request Methods to get the parameters are independent of the kind of request (POST or GET) As a result doget can call dopost (or the other way)

TreaGng input forms (2) Servlet in acgon H@pServletRequest Interface, represents a request of the client Several methods are provided String getparameter (String nomparam) String[] getparametervalues() e.g. mul<values Enumera<on<String> getparameternames() hap://www.truc.com/abonnement? id=23378&nom=toto&op=d&v=56

JSP (Java Servlet Page)

JSP + Javabean

First, let us talk about REST architecture (revisigng HTTP)

(revisigng) Web browser HTTP server request response

Performance? Scalability?

REST

(basic)

HTTP request (basics)

Play! REST principles

Play! framework offers an integrated solugon controller faciliges for treagng HTTP requests (controllers) template language/engine (views) specificagon/serializagon of domain model (models)

OrganizaGon of a Play! Project (main excerpt) Model View Controller ~ mapping URL controller acgon

Example: routes definigon routes (file) mapping URL controller acgon controller hap://localhost:9000/hello?name=world

Example: routes definigon mapping URL controller acgon

Controller acgon and result

Model Persistance and Querying for free AnnotaGons define the constraints on the model data Models can be serialized in a database (eg SQL)

Model and Controller code that can be used in the controller acgons

Template Language/Engine Mix of HTML (+ Javascript + CSS) and ApplicaGon code (models)

Much more here: hap://www.playframework.org/documenta<on/ If you choose Play! start with a simple tutorial don t try to master everything about the framework get simple results ASAP

Advices for the PDL Models Rely on your previous work («livrable de concep<on») Facili<es are offered/integrated by Play! but be careful The learning curve is high Views «Magics» can be a nightware You may prefer control the way models are serialized Simple HTML pages as a client, I don t care about the usability and look and feel Templates (JSP or Play! template engines) Controllers HTTPServlet (Servlet) or Controller in Play!

Fournisseurs GesGonnaire Clients Système de ges<on de catalogue web de produits Plateforme d échange Ges<on des produits configurateur

?