html5 & touch

33
HTML5 & Touch Torbjörn Sjögren 10 January 2012 12-04-20 Torbjörn Sjögren 1

Upload: mannetroll

Post on 05-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 1/33

HTML5 & TouchTorbjörn Sjögren

10 January 2012

12-04-20 Torbjörn Sjögren1

Page 2: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 2/33

The Internet

12-04-20 Torbjörn Sjögren2

I Refuse to Join Facebook!

Page 3: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 3/33

The Brain

12-04-20 Torbjörn Sjögren3

I Refuse to be a Neuron!

Page 4: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 4/33

The journey of the technology

4

1998

PL/SQL2005

Java/C#

2010

Cloud2012

Browser 

Page 5: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 5/33

HTML5 - ROCKS

12-04-20 Torbjörn Sjögren5

Page 6: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 6/33

HTML 4.01

<!DOCTYPE html PUBLIC “-//W3C//DTD

XHTML 1.0 Strict//EN”

“http://www.w3.org/TR/xhtml1/DTD/ xhtml1-

strict.dtd”>

<html xmlns="http://www.w3.org/1999/xhtml"><head>

<meta http-equiv=”Content-Type”

content=”text/ html; charset=utf-8”>

<meta http-equiv="Content-Language"

content="en-GB" />

</head>

<body>

</body>

</html>

The start

12-04-20 Torbjörn Sjögren6

HTML 5

<!DOCTYPE html>

<html lang=”en”>

<head>

<meta charset=”utf-8”>

</head>

<body>

<p contenteditable=true>Lorem ipsum… </p>

</body>

</html>

Page 7: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 7/33

@Deprecated

<center>

<frame>, <frameset> and <noframes>

<acrynom>, <applet>, <basefont>, <big>, <blink>, <dir>,

<font>, <isindex> , <strike>, <tt> and <u>

align, bgcolor, border, cellpadding, cellspacing, height, nowrap,rules, valign and width

Mantra: Use CSS instead!

Differences HTML 4 and HTML5

12-04-20 Torbjörn Sjögren7

Page 8: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 8/33

<article>, <aside>, <figcaption>, <figure>,

<footer>, <header>, <hgroup>, <nav>,

<section>, and <summary>

<wbr>, <bdi>, <bdo>, <ruby>, <rp>, <rt>

New tags: Structure and text

12-04-20 Torbjörn Sjögren8

• HTML4: http://www.w3schools.com/tags

• HTML5: http://www.w3schools.com/html5

Page 9: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 9/33

<video controls width=”640” height=”480” poster=”sample.jpg”>

<source src=”sample.mp4” type=’video/mp4; codecs=”avc1.42E01E, mp4a.40.2”’>

<source src=”sample.webm” type=’video/webm; codecs=”vp8, vorbis”’>

<source src=”sample.ogv” type=’video/ogg; codecs=”theora, vorbis”’>

<object width=”640” height=”480” type=”application/x-shockwave-flash”data=”flowplayer-3.2.1.swf”>

<param name=”movie” value=”flowplayer- 3.2.1.swf”>

<param name=”allowfullscreen” value=”true”>

<param name=”flashvars” value=’config={“clip”: {“url”: “http://yourdomain.

com/videos/sample.mp4”, “autoPlay”:false, “autoBuffering”:true}}’>

<p>If you can read this, you’re using a pre- HTML5 browser without Flash.</p>

</object>

</video>

Video

12-04-20 Torbjörn Sjögren9

Page 10: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 10/33

Audio

12-04-20 Torbjörn Sjögren10

Attributes

• accesskey - this specifies a keyboard shortcut for a given element• class - this specifies a classname for a given element, to be used in

conjunction with a style sheet

• contenteditable - specifies whether a user is allowed to edit the content

• contextmenu - specifies the context menu for a given element

• dir - specifies the direction of the text for content in a given element

• draggable - specifies if a user is allowed to drag a given element

• dropzone - specifies the event that occurs when an item or data is dragged

and dropped into a given element

• hidden - specifies if a given element is hidden or not• id - specifies a unique identificationfor a given element

• lang - specifies a language code for the content in a given element

• spellcheck - specifies if a specific element will need to be subjected to a

spelling and grammar check

• style - defines an inline style for a specific element tabindex - specifies the tab

order of a specific element

• autoplay - if this attribute is included, the audio will begin to play once it is

ready

• controls - if this one is included, controls for the audio file will be included onthe page (which is a great idea--it is very annoying to not have a way to stop

the audio from playing)

• loop - if this one is included, the audio will loop and play again once it has

finished

• preload - this one has three parameters: auto, which plays once it has loaded,

metadata, which only displays the data associated with the audio file, and

none, which means it will not preload

• src - this one’s value is simply the URL of the audio file you wish to play

Page 11: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 11/33

Canvas

12-04-20 Torbjörn Sjögren11

Page 12: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 12/33

HTML5 data– Attributes

12-04-20 Torbjörn Sjögren12

<li data-tmp1=“A” data-tmp2=“B” >

<b>…</b></li>

Page 13: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 13/33

Local database within browser 

12-04-20 Torbjörn Sjögren13

Page 14: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 14/33

How JavaScript & HTML5 AreRemaking the Web

12-04-20 Torbjörn Sjögren14

Page 15: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 15/33

WebGL and Canvas

12-04-20 Torbjörn Sjögren15

http://code.google.com/p/quake2-gwt-port/

www.3dtin.com

http://www.pirateslovedaisies.com/

https://github.com/mrdoob/three.js/blob/master/src/renderers/WebGLRenderer.js

Page 16: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 16/33

A JavaScript Online App

12-04-20 Torbjörn Sjögren16

Safari (Nitro)

http://drtobbe.com/pendulum.html

Safari (Nitro)

Page 17: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 17/33

A JavaScript Offline App

12-04-20 Torbjörn Sjögren17

UIWebViewSafari (Nitro)

iPhone 3: 20iPhone 3GS: 55

iPhone 4: 30

iPad: 85

HTC Desire: 70

http://drtobbe.com/phonegap/

Page 18: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 18/33

PhoneGap / build“Package in the Cloud”

12-04-20 Torbjörn Sjögren18

http://build.phonegap.comhttp://build.phonegap.com

Page 19: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 19/33

Build Native Apps

12-04-20 Torbjörn Sjögren19

$ git add .

$ git commit -m "initial commit”

$ git remote add phonegap [email protected]:drtobbe/5999_JavaScriptPendulum.git$ git push phonegap master

Page 20: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 20/33

PhoneGap (JavaScript) Apps

Page 21: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 21/33

Cross Platform

12-04-20 Torbjörn Sjögren21

JSConf – 25 April 2009

http://www.slideshare.net/brianleroux/phonegap-at-jsconf 

Page 22: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 22/33

Mobile Cross Platform JavaScriptFrameworks (6 and counting…)

12-04-20 Torbjörn Sjögren22

Page 23: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 23/33

Search JavaScript 360M -> 1620M

12-04-20 Torbjörn Sjögren23

September 2010

March 2011

Page 24: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 24/33

Information Overload…

12-04-20 Torbjörn Sjögren24

Page 25: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 25/33

- Why HTML5 is worth your time

- How JavaScript & HTML5 Are Remaking the Web- 16 popular JavaScript frameworks

- Object Oriented Programming with JavaScript

- Web vs. Desktop Apps: “Never Bet Against the Open Web”

- Using TDD With Modern JavaScript

- An ultimate HTML5 cheat sheet you must have

- 5 New Ways to Build Apps for iPhone, Android and Web Browsers

- Say good-bye to Flash, but is HTML5 winning?

- Create a Stylish Contact Form with HTML5 & CSS3

- How HTML5 is changing the face of mobile

- Best HTML5 Books: My Top 5 Choices

- 100 Awesome CSS/Javascript Plugins and Coding Techniques

- Treat JavaScript right!

- Opera 11 preview with WebGL and Hardware Acceleration for Windows

- Book Review: Eloquent JavaScript: A Modern Introduction to Programming

- Convert XML to JSON with JavaScript

- …

DZONE - http://www.dzone.comh

12-04-20 Torbjörn Sjögren25

JSON = JavaScript Object Notation (1999) Ex: {“key”:”value”, “name”:”joe”}

Page 26: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 26/33

Mobile – if – it´s technology

26Taptu 2010

Page 27: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 27/33

Apple – Thoughts on Flash - Touch

http://www.apple.com/hotnews/thoughts-on-flash/

Steve Jobs

 April, 2010

Page 28: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 28/33

Kitchen Sink – Landscape / Portrait

http://dev.sencha.com/deploy/touch/examples/kitchensink/

Page 29: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 29/33

Sencha Demo – Source

Page 30: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 30/33

CMS – Portrait / Landscape

12-04-20 Torbjörn Sjögren30

Page 33: Html5 & Touch

8/2/2019 Html5 & Touch

http://slidepdf.com/reader/full/html5-touch 33/33

Gold 1900 - 2011