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

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

Index LICENSED PRODUCT NOT FOR RESALE

Delivery Options: Attend face-to-face in the classroom or remote-live attendance.

Delivery Options: Attend face-to-face in the classroom or via remote-live attendance.

Etanova Enterprise Solutions

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

Fundamentals of Website Development

Web Client Architecture Guide

WebSphere Puts Business In Motion. Put People In Motion With Mobile Apps

Working with Javascript Building Responsive Library apps

Basics of Web Technologies

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

Graphics Design and Applied Arts บทท 6 การออกแบบเว บเบ องต น

Software Design COSC 4353/6353 DR. RAJ SINGH

Full Stack Web Developer

Developing Applications with Java EE 6 on WebLogic Server 12c

02267: Software Development of Web Services

STARCOUNTER. Technical Overview

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

Java SE7 Fundamentals

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

Webspeed. I am back. Enhanced WebSpeed

Overview of Web Application Development

Cleveland State University Department of Electrical and Computer Engineering. CIS 408: Internet Computing

AIM. 10 September

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

CSCI 6312 Advanced Internet Programming

Developing Ajax Web Apps with GWT. Session I

REST AND AJAX. Introduction. Module 13

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

Web Application Architectures

Web Applications. Software Engineering 2017 Alessio Gambi - Saarland University

Services Web Nabil Abdennadher

HTML, XHTML, and CSS. Sixth Edition. Chapter 1. Introduction to HTML, XHTML, and

Discussion #4 CSS VS XSLT. Multiple stylesheet types with cascading priorities. One stylesheet type

JavaScript CS 4640 Programming Languages for Web Applications

ASP.NET MVC Training

Oracle Service Cloud Integration for Developers Ed 1

Lesson 12: JavaScript and AJAX

Introduction Haim Michael. All Rights Reserved.

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

Part of this connection identifies how the response can / should be provided to the client code via the use of a callback routine.

CGS 3066: Spring 2015 JavaScript Reference

JavaScript CS 4640 Programming Languages for Web Applications

Chapter 9. Web Applications The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Visual HTML5. Human Information Interaction for Knowledge Extraction, Interaction, Utilization, Decision making HI-I-KEIUD

AJAX Programming Overview. Introduction. Overview

welcome to BOILERCAMP HOW TO WEB DEV

Professional Course in Web Designing & Development 5-6 Months

Patterns Architectural Styles Archetypes

ipokr System: Leveraging JAX-RPC Assignment: Life Long Learning Research Paper Class: CS&E 762 Date: May 4, 2006

Financial. AngularJS. AngularJS.

MarkLogic Server. Reference Application Architecture Guide. MarkLogic 9 May, Copyright 2017 MarkLogic Corporation. All rights reserved.

Integration Test Plan

Full Stack Web Developer

Financial. AngularJS. AngularJS. Download Full Version :

Web Software Model CS 4640 Programming Languages for Web Applications

PROFESSIONAL TRAINING

Web Programming Pre-01A Web Programming Technologies. Aryo Pinandito, ST, M.MT

A Closer Look at XPages in IBM Lotus Domino Designer 8.5 Ray Chan Advisory I/T Specialist Lotus, IBM Software Group

Uniform Resource Locators (URL)

2 Background: Service Oriented Network Architectures

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) Helper Applications & Plug-Ins

Firefox for Android. Reviewer s Guide. Contact us:

Oracle Service Cloud Integration for Developers Ed 1

READSPEAKER ENTERPRISE HIGHLIGHTING 2.5

20486-Developing ASP.NET MVC 4 Web Applications

WWW, REST, and Web Services

Distribution and Integration Technologies

J2EE Interview Questions

On XML-driven Rich Web Clients 1

Assignment 2. Start: 15 October 2010 End: 29 October 2010 VSWOT. Server. Spot1 Spot2 Spot3 Spot4. WS-* Spots

Developing Web Applications for Smartphones with IBM WebSphere Portlet Factory 7.0

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

Developing ASP.NET MVC Web Applications (486)

Topics. From UI prototype... About user interfaces. ... via design to implementation. Pearson Education 2005 Chapter 7 (Maciaszek - RASD 2/e) 6

REST Easy with Infrared360

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

a Very Short Introduction to AngularJS

Modern Web Application Development. Sam Hogarth

20486: Developing ASP.NET MVC 4 Web Applications

Pearson Education 2005 Chapter 7 (Maciaszek - RASD 2/e) 2

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Live Guide Co-browsing

SUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version :

Case Study: Dodging the Pitfalls of Enterprise Ajax Applications

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition

Enterprise Software Architecture & Design

CAS 703 Software Design

PHP & PHP++ Curriculum

By Chung Yeung Pang. The Cases to Tackle:

JavaScript Context. INFO/CSE 100, Spring 2005 Fluency in Information Technology.

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

Oracle Service Cloud Integration for Develope

Tooling for Ajax-Based Development. Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc.

S1 Informatic Engineering

16. HTML5, HTML Graphics, & HTML Media 웹프로그래밍 2016 년 1 학기 충남대학교컴퓨터공학과

CodeValue. C ollege. Prerequisites: Basic knowledge of web development and especially JavaScript.

Pro JavaScript. Development. Coding, Capabilities, and Tooling. Den Odell. Apress"

Transcription:

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

1. Design Principles 2. Architectural Patterns 3. Building for Degradation

Desktop browsing is page hops searches large blocks The mobile experience is an integrated experience short and directed content rich interaction and movement

Markup should be simple and compatible XHTML MP 1.0 WCSS Mobile users want information fast Minimize scrolling Avoid excess decoration Short text and icons Do not clutter the screen

Get the user quickly to where they want Minimize the number of pages to complete a task Keep the user focused on the current task Don t create a mini version of a desktop site Reconsider movement around the site

Small screen Tightened focus over less real estate Touch interface Multi-touch and gestures Different sort of interactive experience Mobility Locational awareness Different goals

Layers Encapsulation Reusability Business logic integrity Interface consistency

Shared Libraries Model-view-controller (MVC) Service-oriented architecture (SOA)

Concept Libraries of functions and/or objects Separate desktop, tablet and mobile apps Properties Reuses objects to accomplish the same task Consistency if the library is used and maintained Requires homogeneous environment

Good use cases Decorators Session and state management Data setters and getters Desktop Site Library Mobile Site

Object that encapsulates some element Methods permute the content of the element Render method generates the actual output Use case: Instantiate the decorator Modify element attributes Add contained entities Render to produce actual HTML output

MWF provides two decorator sets HTML Decorators Site Decorators Site decorators create MWF entities. MWF entities are semantic HTML. Can style them in a desktop manner as well. Can simply define different CSS for desktop.

Using the.menu-full decorator directly $decorator = Site_Decorator::menu_full(array(), array('class'=>'main-menu')); $decorator->set_title('menu') $decorator->add_item('item 1', '#1') $decorator->add_item('item 2', '#2') $decorator ->add_item('item 3', '#3') $decorator->add_item('item 4', '#4') $decorator->add_item('item 5', '#5') $decorator->render();

Encapsulate the.menu-full decorator class Front_Page_Menu_Full_Site_Decorator extends Menu_Full_Site_Decorator { public function construct($title = false, $params = array()) { parent:: construct($title, $params); $this->set_param('class', 'main-menu menu-full'); $this->set_title('menu'); $this->add_item('item 1', '#1'); $this->add_item('item 2', '#2'); $this->add_item('item 3', '#3'); $this->add_item('item 4', '#4'); $this->add_item('item 5', '#5'); } }

Using the shared library $menu = new Front_Page_Menu_Full_Site_Decorator(); echo $menu->render(); Mobile and desktop sites both define CSS CSS handler covers the mobile site Different CSS file for the desktop site Can consolidate to one invoking script: Redirect script or User_Agent call

A decorator may use multiple decorators Many site decorators are tag composites A page decorator could also be a composite UC San Diego has a Java-based page decorator Multi-element decorators are views Pass a set of data into an encapsulating object Object renders output based on data

Model Manages, mediates and manipulates data View Encapsulates the user interface Controller Bridges model and view with business logic

User View Controller Model Data

User View Controller Model Data

User View Controller Model Data

User View Controller Model Data

User View Controller Model Data

User View View Controller Model Data

User View Composite View Subview Subview Controller Model Model Data

Can build one app that supports: Desktop Tablet Mobile MVC approach: One set of controllers and models Different composite views for mobile & desktop Reuse subviews in different composite views

Views separate rendition from Business logic Data models Going a step further: One entity handles business logic & data models Another entity handles rendition Basis of service-oriented architecture

Service provider Exposes business logic through service interfaces Mediates & manipulates data based on services Service consumer Invokes services provided by the service provider Service definition Contract between provider & consumer

Service Provider Service Contract Service Provider

User Service Provider Service Contract Service Provider

User Service Provider Service Contract Service Request Service Provider

User Service Provider Service Contract Service Request Service Provider Data

User Service Provider Service Contract Service Request Service Response Service Provider Data

Service contract Loose coupling Abstraction Reusability Autonomy Granularity Statelessness

Often implemented through web services Two common modern protocols: SOAP REST

SOAP Transport neutral Message-driven XML Complex definition Verbose semantics Larger payload Must parse for AJAX REST HTTP Transport HTTP Request-driven XML, JSON, HTML, etc. Simple definition Limited semantics Minimized payload Can avoid parsing for AJAX

Web services encapsulate business logic Client calls web services to perform actions Rough analogy back to MVC: Client ~ View Service ~ Controller + Models

Design decisions: REST or SOAP? XML, JSON or HTML? Thick or thin client? Server or browser rendering?

Design decisions: REST or SOAP? XML, JSON or HTML? Thick or thin client? Server or browser rendering?

REST Simple and easy to implement Uses HTTP requests and responses Allows XML, JSON, HTML, etc. JSON Smaller payload than XML No parsing required for Javascript

Thin Client Reusability Business logic integrity Focus client on presentation Server Rendering Not all user agents allow Javascript or AJAX Supplement with AJAX where possible

Not all phones have the same features provide access to the same features provide the same access to the same features The goal: Use top-end features when available Still remain usable for low end devices Avoid writing two applications

CSS 3 Gradients, border radii, etc. Transitions, key frames, etc. HTML 5 Semantic Entities Forms and Input Types Javascript DOM Writing AJAX Device APIs Audio Video Geolocation Compass Accelerometer Storage Camera Web Sockets

Handlers load styles/scripts in three tiers: Basic Standard Full Degradation further prevalent in: Geolocation Transitions Images

Cascading definitions Build up from WCSS definitions to CSS 3 definitions If CSS 3 definitions aren t accepted, falls back A few simple degradations: Rounded corners can degrade to square Gradient can degrade to mean value Transitioning areas can degrade to blocks

Only load where it is allowed: WCSS: Basic CSS 2.1: Standard CSS 3: Full This reduces: payload size validation issues

HTML 5 introduces new semantics Rather than use new entities directly: Use classes on XHTML MP 1.0 elements Transform to HTML 5 elements where supported MWF Forms API includes this approach: https://github.com/ucla/mwf/wiki/roadmap %3A-Framework-v1.2%3A-Forms

Live DOM writes not supported universally Degrade by showing what is visible on load Use DOM write to change state of elements AJAX not universally supported AJAX should be a plus, not a necessity Define <a href > to a new page Override default with AJAX request Web service can serve to AJAX and new pages

Audio/Video Pre-HTML 5 semantics don t include tags Degrade to other viable players Least common denominator is error message MWF will eventually have an Audio/Video API Geolocation MWF has abstraction layer for HTML 5 & Gears GPS failure is treated similarly to no GPS

Compass & Accelerometer Degradation similar to Geolocation API will be added to MWF Storage Specifications shifting rapidly so use caution Abstraction layer to handle shifting support State-saving can be offloaded via AJAX API will be added to MWF