• No results found

Making the Most of Existing Public Web Development Frameworks WEB04

N/A
N/A
Protected

Academic year: 2021

Share "Making the Most of Existing Public Web Development Frameworks WEB04"

Copied!
41
0
0

Loading.... (view fulltext now)

Full text

(1)

Making the Most of Existing Public

Web Development Frameworks

(2)

jQuery Mobile

(3)

The jQuery Suite

UI Overhaul

 Look and Feel  Transitions

Interactions

 Touch, Mouse, Keyboard

Don’t Break The Web

AJAX Navigation

Cross Platform

(4)

10+ Billion Web Enabled

(5)

Graded Browser Support

A-grade

Full jQuery Mobile Support

 BlackBerry 10, BlackBerry® 6+, iOS 3.2+, Android 2.1+, Windows Phone 7+

B-grade

Almost full support, no AJAX navigation

 BlackBerry 5, Opera Mini 5.0 – 6.5, Nokia Symbian

C-grade

Non-enhanced HTML experience

 BlackBerry 4.x, Windows Mobile

A browser that does not support media queries (with the exception of Internet Explorer 7+) will automatically be demoted to C grade.

(6)

Progressive Enhancement

You provide:

 Clean, semantic HTML

 HTML5 data- attributes for configuration

jQuery Mobile provides:

 Automatic initialization

 Appropriate functionality based on browser support  Automatic enhancement of form elements

(7)

Customize Your Themes

7

(8)

Inspiration

(9)

Including jQuery Mobile

<head>

<title>Welcome!</title>

<meta name="viewport” content="width=device-width, initial-scale=1">

<link rel="stylesheet“ href="jquery.mobile.min.css"> <script src="jquery.min.js"></script>

<script src="jquery.mobile.min.js"></script>

</head>

(10)

Listen, Intercept, Handle w/ AJAX

1. User taps on a link

2. Link is intercepted

3. Loading indicator is shown

4. Original link is loaded via AJAX

5. New page is enhanced by jQuery Mobile

6. Loading indicator is hidden

(11)

Auto Enhanced UI

(12)

<body>

<div data-role="page">

<div data-role="header"></div> <div data-role="content"></div> <div data-role="footer"></div> </div>

</body>

(13)

Web to Native

13

BlackBerry

WebWorks

(14)

Resources

(15)

Books

(16)
(17)

Sencha Touch

HTML5 mobile framework

(18)

Sencha Touch

HTML5 mobile framework

 Cross-browser normalization

Offline storage proxy

Rich animation, styles & themes

(19)

Touch Charts

Available in Sencha Touch

 Built with HTML5 & CSS3

Cross browser compatible

Hardware accelerated

 Optimized for performance

(20)

Sencha Touch 2.0

Performance improvements

 Events  Layout  Scrolling

 Theming

Easier to use

(21)

Sencha Touch 2.0

Touch event handling

Layouts

 Improved layout system  Faster tablet rendering

Themes

 Automatic image-based themes

Scrolling

(22)

Dojo

(23)

Dojo Toolkit

Build sophisticated Web apps

 http://dojotoolkit.org/

 Supports multiple browsers  Enables rapid development

Philosophy:

 Push the limits (SVG, WebGL, HTML5)  Define & adopt defacto standards

 Developer productivity & tools  Open, free & liberally licensed

(24)

Dojo Toolkit : Project Goals

Unified JavaScript toolkit

 Superior web & mobile apps

Be awesome

 Fast, powerful, efficient, modular, extensible

Business friendly

(25)

Zepto

A minimalist JavaScript library

(26)

Zepto.js

A minimalist JavaScript library

 Looks and feels like jQuery

 Designed to be more lightweight and faster  http://zeptojs.com/

“If you use jQuery, you already know how to use Zepto”

<script src="zepto.min.js"></script> <script>

$('ul').append('<li>new item</li>') </script>

(27)

Zepto.js

Smaller and faster than jQuery

 Zepto is only 8.4 Kb (jQuery is 100+ Kb)

 Doesn’t have all jQuery capabilities – just the basics

Scalable

 Uses mobile WebKit features as much as possible

(28)

Modernizr

(29)

Polyfills

Its not just a buzz word!

 Code that fills in missing native browser features (e.g. HTML5 APIs)  Also known as a “shim”

 Flattens API landscape

Example libraries:

 Modernizr.js  Yepnope.js  Webshims Lib

(30)

Modernizr

A JavaScript library for browser feature detection

 HTML5

 CSS3

 http://modernizr.com/

Purpose

 Write content for all browsers

 Avoid lowest-common denominator

“Make websites that work exactly right no matter what browser or

(31)

Modernizr

Example:

 Check for geolocation API support

 Fall back to alternative code (polyfill) if geolocation is not available

Open source

 https://github.com/Modernizr/Modernizr Modernizr.load({

test: Modernizr.geolocation, yep : 'geo.js',

nope: 'geo-polyfill.js' });

(32)

three.js

(33)

three.js

JavaScript 3D library

http://mrdoob.github.com/three.js/

Choose rendering surface: Canvas, WebGL or SVG

Create cameras, objects, lights, materials & more

Getting started

http://learningthreejs.com/

(34)

Drawing a rectangle

Using WebGL

var square = gl.createBuffer(); var square_vertices = [

1.0, 1.0, 0.0, -1.0, 1.0, 0.0, 1.0, -1.0, 0.0, -1.0, -1.0, 0.0 ];

gl.bindBuffer(gl.ARRAY_BUFFER, square); gl.bufferData(gl.ARRAY_BUFFER, new

(35)

Drawing a rectangle

Using three.js

Designed to make 3D graphics development

easier

var rect = new THREE.Rectangle(); rect.set(0, 0, 100, 100);

(36)

Three.js

Open Source project

 https://github.com/mrdoob/three.js

BlackBerry contributions

(37)

CreateJS

Enable rich interactive HTML5 content

(38)

createJS

Suite of modular JavaScript libraries & tools

 Uses open web technologies (HTML5)  Enables rich interactive content

Includes:

 EasleJS  TweenJS  SoundJS  PreloadJS  Zoe

(39)

createJS

EasleJS

 Simplifies using HTML5 canvas

 JavaScript API familiar to Flash developers

SoundJS

 Cross-browser JavaScript API

 Makes working with HTML5 audio a breeze

PreloadJS

 Manage & coordinate asset loading  Images, sounds, JavaScript, data, etc.

(40)

createJS Example

(41)

THANK YOU

References

Related documents

In the context of initiatives to develop the scholarship of teaching and learning in a large research-intensive university in Australia, this paper discusses the relationship

Egipatska odjeća za žene je najčešće bila omotana oko tijela te završavala čvorom ispod grudi.. Omatanjem plahte su se dešavali nabori tkanine

whether MSEs in the region suffer from access to formal working capital finance due to lack of assets to collateralize, respondents were asked whether their enterprise

Frontal facade: Soft PVC Vnyl Silver Cedar vertical O. Frontal Facade: Hard PVC Grey Wood ISO20 horizontal

Based on the learning from textbook, they firstly collect and organize relevant film critiques, which provide strong reasons of the award.. After that, the summarized points shall

8 Postgraduate Institute of Medical Education and Research, Chandigarh PGIMER http://pgimer.nic.in/ 9 Indian Institute of Science, Bangalore IISC www.iisc.ernet.in 10

Not surprisingly, film festival research is conducted in the humanities as well as social sciences, most notably by film and media scholars but also as part

This business is being formed in New Hampshire and the registration document states that any sale or offer for sale of ownership interests in the business will comply with