Web Software Model CS 4640 Programming Languages for Web Applications

Similar documents
JavaScript: Objects, BOM, and DOM CS 4640 Programming Languages for Web Applications

JavaScript and Objects CS 4640 Programming Languages for Web Applications

Developing ASP.Net MVC 4 Web Application

COURSE 20486B: DEVELOPING ASP.NET MVC 4 WEB APPLICATIONS

20486: Developing ASP.NET MVC 4 Web Applications (5 Days)

Developing ASP.NET MVC 4 Web Applications

ASP.NET MVC Training

20486: Developing ASP.NET MVC 4 Web Applications

Course 20486B: Developing ASP.NET MVC 4 Web Applications

Developing ASP.NET MVC 4 Web Applications

Java EE 6: Develop Web Applications with JSF

Developing ASP.NET MVC 5 Web Applications. Course Outline

20486-Developing ASP.NET MVC 4 Web Applications

MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M

PROCE55 Mobile: Web API App. Web API.

welcome to BOILERCAMP HOW TO WEB DEV

Visual Studio Course Developing ASP.NET MVC 5 Web Applications

Developing ASP.NET MVC 4 Web Applications

Developing ASP.NET MVC 5 Web Applications

Dictionaries. Upsorn Praphamontripong. CS 1111 Introduction to Programming Spring 2018

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

20486 Developing ASP.NET MVC 5 Web Applications

Microsoft Developing ASP.NET MVC 4 Web Applications

COURSE 9 DESIGN PATTERNS

CSC 309 The Big Picture

Developing Cross Device Mobile Applications

CS Final Exam Review Suggestions - Spring 2018

20486C: Developing ASP.NET MVC 5 Web Applications

Web Applications. Software Engineering 2017 Alessio Gambi - Saarland University

Etanova Enterprise Solutions

Oracle 10g: Build J2EE Applications

Module 3 Web Component

CS WEB TECHNOLOGY

Oracle Fusion Middleware 11g: Build Applications with ADF I

Alpha College of Engineering and Technology. Question Bank

Jeff Offutt. SWE 432 Design and Implementation of Software for the Web. Web Applications

Web Architecture AN OVERVIEW

JAVASCRIPT JQUERY AJAX FILE UPLOAD STACK OVERFLOW

<Insert Picture Here>

Web development using PHP & MySQL with HTML5, CSS, JavaScript

P a g e 1. Danish Technological Institute. Scripting and Web Languages Online Course k Scripting and Web Languages

CENG 256 Internet Programming Draft

Presentation and content are not always well separated. Most developers are not good at establishing levels of abstraction in JSPs

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

Excel4apps Wands 5 Architecture Excel4apps Inc.

Java SE7 Fundamentals

Front End Programming

Review. Fundamentals of Website Development. Web Extensions Server side & Where is your JOB? The Department of Computer Science 11/30/2015

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

AIM. 10 September

Application Design and Development: October 30

Modern and Responsive Mobile-enabled Web Applications

Chapter 2 FEATURES AND FACILITIES. SYS-ED/ Computer Education Techniques, Inc.

POWER BI BOOTCAMP. COURSE INCLUDES: 4-days of instructor led discussion, Hands-on Office labs and ebook.

March 2007 Oracle Spatial User Conference

Course Overview. SWE 432, Fall Design and Implementation of Software for the Web

Oracle Applications OAF, MSCA, MA and ADF. May 06, 2011

Oracle Fusion Middleware 11g: Build Applications with ADF I

An Overview of. Eric Bollens ebollens AT ucla.edu Mobile Web Framework Architect UCLA Office of Information Technology

Oracle Developer Day

1Z Oracle. Java Enterprise Edition 5 Enterprise Architect Certified Master

Developing Applications with Java EE 6 on WebLogic Server 12c

Modern Web Application Development. Sam Hogarth

Comprehensive AngularJS Programming (5 Days)

Customizing the Blackboard Learn UI & Tag Libraries. George Kroner, Developer Relations Engineer

Static Webpage Development

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

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

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

VINEPILOT. Project Design Specification. v2.0 - The Savvy-gnon Team

Distributed Multitiered Application

JavaScript and Events

20480C: Programming in HTML5 with JavaScript and CSS3. Course Code: 20480C; Duration: 5 days; Instructor-led. JavaScript code.

Microservices. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Networking & The Web. HCID 520 User Interface Software & Technology

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints

Web Development. With PHP. Web Development With PHP

Programming the World Wide Web by Robert W. Sebesta

What s new in Spring Web Flow 2.0

P a g e 1. Danish Tecnological Institute. Developer Collection Online Course k Developer Collection

Spring Web Services Tutorial With Example In

August, HPE Propel Microservices & Jumpstart

HTML5 Evolution and Development. Matt Spencer UI & Browser Marketing Manager

Templates and Databinding. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Standard 1 The student will author web pages using the HyperText Markup Language (HTML)

Edge Side Includes (ESI) Overview

SmartList Senior Project Paper

CPET 581 E-Commerce & Business Technologies. Topics

React & Redux in Hulu. (Morgan Cheng)

Oracle Service Cloud Integration for Developers Ed 1

Networking & The Web. HCID 520 User Interface Software & Technology

Tutorial Point On Html5 Pdf

Oracle Forms and Oracle APEX The Odd Couple

Building modern enterprise applications from scratch: lessons learned DOAG 2014 Dr. Clemens Wrzodek

CSCI 1320 Creating Modern Web Applications. Content Management Systems

Design concepts for data-intensive applications

Enterprise Java Unit 1-Chapter 2 Prof. Sujata Rizal Java EE 6 Architecture, Server and Containers

JavaServer Faces Technology, AJAX, and Portlets: It s Easy if You Know How!

Model-View-Controller Patterns and Frameworks. MVC Context

Java Training Center, Noida - Java Expert Program

Transcription:

Web Software Model CS 4640 Programming Languages for Web Applications [Robert W. Sebesta, Programming the World Wide Web Upsorn Praphamontripong, Web Mutation Testing ] 1

Web Applications User interactive software programs, deployed on a web server, accessed via a web browser Use enabling technologies to Make web site contents dynamic Allow users of the system to implement business logic on the server Let users affect state on the server Constructed from diverse, distributed, and dynamically generated web components Web components are software modules that implement different parts of the application s functionality An enabling technology makes web pages interactive and responsive to user input 2

How do Web Apps fit in with the World Around Them? Object type: Hotel Object type: Car Object type: Car Object type: Car 3

Objects and Properties Object type: Hotel Properties Name: Awesome Rating: 5 Rooms: 70 Bookings: 56 Pool: true Gym: true Object type: Car Properties Make: UVA1 currentspeed: 30mph Color: yellow Fuel: gasoline Object type: Car Properties Make: UVA2 currentspeed: 20mph Color: red Fuel: gasoline Object type: Car Properties Make: UVA2 currentspeed: 35mph Color: blue Fuel: gasoline 4

Objects and Events Event Reserve Cancel Object type: Hotel Happens when reservation is made reservation is cancelled Event Object type: Car Happens when Break: driver slows down Accelerate: driver speeds up Event Object type: Car Happens when Break: driver slows down Accelerate: driver speeds up Event Object type: Car Happens when Break: driver slows down Accelerate: driver speeds up 5

Method Objects and Methods Object type: Hotel What it does makereservation() increases value of bookings property cancelreservation() decreases value of bookings property checkavailability() subtracts value of bookings property from value of rooms property and returns number of rooms available Method Object type: Car What it does changespeed() increases or decreases value of currentspeed property Method Object type: Car What it does changespeed() increases or decreases value of currentspeed property Method Object type: Car What it does changespeed() increases or decreases value of currentspeed property 6

All Together Object type: Hotel Event Happens when Method called Reserve reservation is made makereservation() Cancel reservation is cancelled cancelreservation() Method makereservation() cancelreservation() checkavailability() What it does increases value of bookings property decreases value of bookings property subtracts value of bookings property from value of rooms property and returns number of rooms available Object type: Car Event Happens when Method called Break driver slows down changespeed() Accelerate driver speeds up changespeed() Method changespeed() What it does increases or decreases value of currentspeed property Properties Name: Awesome Rating: Rooms: 5 70 Bookings: 56 Pool: true Gym: true Properties Make: UVA1 currentspeed: 30 Color: yellow Fuel: gasoline 7

Web Browsers and Objects Object type: Window Properties Location: http://www.cs.virginia.edu/~up3f/cs4640/syllabus.html Properties Object type: Document URL: http://www.cs.virginia.edu/~up3f/cs4640/syllabus.html lastmodified: 01/14/201910:19:23 Title: CS4640: WebPL 8

BOM: Browser Object Model BOM collection of objects that the browser makes available to us for use with JavaScript window Object location Object history Object document Object navigator Object screen Object DOM form Object link Object image Object 9

DOM: Document Object Model Properties Event Load Click Keypress Method write() getelementbyid() Object type: Document URL: http://www.cs.virginia.edu/~up3f/cs4640/syllabus.html lastmodified: 01/14/201910:19:23 Title: CS4640: WebPL Happens when page and content have finished loading user clicks the mouse over the page user presses down on a key What it does adds content to the document accesses an element of a given id attribute 10

How A Browser See A Web Page document <html> The browser receives an HTML page <head> <meta> <title> <link> http-equiv contenttype Content text/html... CS4640: WebPL rel stylesheet href styles/cs4640 -style.css... <a> name top class navbar... <header> <nav> <button> <div> <body> <div> <div> It creates a model of the page <div> and stores it in memory class container bottom... class <h3> href #top main class btn... role button... class <ul> sidebar... id Contact contact Information <a> It shows the page on screen using a rendering engine Top 11

Server Side Processing HTTP Request data XAMPP UI implemented in a browser Web server Container engine Program components Client Server HTML HTTP Response 12

Architectural Styles How to partition a system How components identify and communicate with each other How information is communicated How elements of a system can evolve Web architectural styles constantly change The goal is to separate logic from presentation and to separate as many concerns in the logic as possible 13

Page-centric Design Server Web client Web client Web client Main component (Client requests are intercepted here) Uses or instantiates Component (data) Database Requests are made to a main component and the main component response to clients 14

Web client Dispatcher (N-tier) Design Server Web client Web client Usually use forward Dispatcher Component presentation Component presentation Component presentation Data Data Business processing Database Requests are sent to a dispatcher that then forward the requests to another component (using forward or redirect control connection) 15

Model View Controller An abstraction frequently used in web app design Provide a way to divide the responsibilities of objects Decreases coupling between objects and layers (supports easier maintenance) Help divide the work (supports development expertise areas) 16

Model View Controller (2) method calls Model data structures events state query View Renders the model Requests updates from the model Sends user inputs to controller Allows controller to select view Encapsulates application state Responds to state queries Exposes application functionality Notifies views of changes change notification HTML / JSP / frontend view select user input state change Components Controller Defines application behavior Maps user actions to model updates Selects a view for response One view for each function [Graphic from Designing Enterprise Applications with the Java 2 Platform, Enterprise Edition, Nicholas Kassem et al., October 2000] 17

Server-Side Scripting Generate HTML on the server through scripts JSP Early approaches emphasized embedding server code inside HTML pages Examples: PHP, JSP PHP 18

Server-Side Scripting Site Browser HTML HTTP request HTTP response Web server HTML templates, server logic, load and store state to database Database Advantages Server-side processing, browser independent, search optimization improvement, increased security Disadvantages Poor modularity, hard to understand, difficult to maintain 19

Server-Side Framework Structure server into tiers, organizes logic into classes Execution on the server Can be single-page or multiple pages with page-centric design, dispatcher design, model-view-control design, or combination of any architectures Example: JSP (with separation of concerns) Presentation Logic Data Data content Data representation Data storage HTML and JSP Java classes (non-servlet) Servlets and beans Data structure, beans, Java classes Database and files, Oracle, SQL 20

Server-Side Framework Site Browser HTML HTTP request HTTP response Web server Presentation Logic Data Database Advantages Separation of concerns, maintain and reuse Disadvantages Need to load an entire page to get new data 21

Front End Frameworks Client is organized into separate components, capturing model of web application data Components separate logic from presentation Components dynamically generate corresponding code based on component state Example: Angular 22

Front End Framework Site Presentation Presentation Presentation Browser Logic Logic Logic Front end framework HTTP request HTTP response Web server Presentation Logic Data Database Advantages Code organization, reuse, quick and easy to develop Disadvantages Duplicate logic in client and server 23

Single Page Application (SPA) Client-side logic sends messages to server, receives response Logic is associated with a single HTML page, written in JavaScript HTML elements dynamically added and removed through DOM manipulation Enabling technologies AJAX DOM Manipulation JSON Jquery Angular (include and routing are useful) Example: Gmail 24

Single Page Application Site event Browser HTML HTML elements JavaScript HTTP request HTTP response Web server Presentation Logic Data Database Advantages Fast (load most resources once; only data are transmitted) Disadvantages Hard to maintain and reuse, cross-site scripting, memory leak 25

Summary: Web Apps Deploy across the Web Other (software) deployment methods include bundling, shrinkwrapping, embedding, and contracting New technologies New conceptual language constructs for programming Integration Data management Control connections Browser features These differences affect every aspect of how to engineer high quality software 26