SlideShare a Scribd company logo
1 of 58
Download to read offline
HTML5	
  
        	
  ((mdream)	
  
Web	
  Developer	
  
DEV310	
  
<me	
  />	
  
	
  
!   “(mdream”	
  
!   Web	
  Developer,	
  not	
  Designer	
  
       l                        	
  Web	
            	
  FrontPage	
  
             	
  HTML5	
  
       l                    PhotoShop	
                           	
  
!                               	
  Programmer	
  
       l                        	
  m(_	
  _)m	
  
HTML5   hKp://(mc.idv.tw/wordcloud/	
  
Outline	
  
	
  	
  	
  
!    
!              	
  HTML5	
  
!    
!     IE10	
  
!     Web	
  
!              	
  
JavaScript	
  


 CSS	
  


 DOM	
      	
  



HTML	
             	
  
How	
  browsers	
  work:	
  Behind	
  the	
  scenes	
  of	
  modern	
  web	
  browsers	
  
hKp://taligarsiel.com/Projects/howbrowserswork1.htm	
  
 
	
  	
     HTML	
  
!                                             1991 	
  
       ! 
       !                                             crica.	
  2004
!   CSS	
                            1995 	
  
       !              	
  HTML	
  
                                                                               1996 	
  
       !                             2010
!   JavaScript	
                             ECMAScript 1996                       	
  
       !   Event-­‐based                    	
  HTML	
   	
  CSS	
  
       !                               XMLHKpRequest 2004
!   Document	
  Object	
  Model                    DOM           1996
       !   HTML	
                                                       	
  
JavaScript	
  


 CSS	
        	
  


 DOM	
      	
  



HTML	
               	
  
Web	
  as	
  an	
  Applica(on	
  Plaborm
HTML5	
                                                       	
  

!           	
  <HTML	
                   	
  />
     !   <blink>	
           	
  <marquee>	
  
!   Buzzword™
!                                                         	
  Flash	
  




          hKp://lovesansrival.blogspot.com/2010/10/first-­‐internet-­‐
          browser-­‐wars.html	
  
HTML5	
                                     	
  …	
  
	
  	
  
	
  
!                             	
  API	
                      	
  
           l 
           l    	
  OS	
  
           l 




                                             hKp://www.w3.org/html/logo/	
  
 

	
  
!   Library,	
  not	
  Framework	
  
! 
     frameworks
! 
    !   Say	
  good	
  bye	
  to	
  some	
  of	
  the	
  “JavaScript	
  PaKerns”	
  



                                                             hKp://www.w3.org/html/logo/	
  
 OS	
          	
  

	
  
!   2D	
  
                                      	
  …	
  
     !   Typed	
  Arrays	
                                           	
  




                                                  hKp://www.w3.org/html/logo/	
  
 


! 

     !                                                   	
  
! 
     !    	
  A	
               G	
     O	
             	
  M	
  
                      	
  


                                                hKp://www.w3.org/html/logo/	
  
-­‐    	
  Mac	
  
-­‐    	
  PC	
  
-­‐ 

                                        	
  




                     hKp://xkcd.com/934/	
  
<!doctype	
  html>
IDE	
  
             	
  
	
  
!         IDE	
  
! 
!                           	
  




                    *	
            	
  Authoring	
  Tools	
  
Internet	
  Explorer	
  
F12	
  Developer	
  Tools	
  
Chrome,	
  Safari,	
  Webkit	
  Nightly	
  
Web	
  Inspector	
  
Opera	
  
Dragonfly	
  
Firefox	
  
Web	
  Console,	
  Firebug	
  
 
	
  console.log()	
                        Console 	
  
	
  
!                              console.log()	
  

!   	
  Console	
  
!   Console	
  API:	
  	
  
       hKp://gebirebug.com/wiki/index.php/Console_API
HTML	
                              	
  
                                                          	
  
<!doctype html>
<html lang="zh-tw">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <title>TITLE</title>
  <link rel="stylesheet" href="assets/style.css">
</head>
<body>
  <!--
    HTML here
  -->
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2
/jquery.min.js"></script>
  <script src="assets/script.min.js"></script>
</body>
</html>
HTML	
                              	
  
                                                         	
  
<!doctype html> <!-- HTML5     -->
<html lang=“zh-tw”> <!-- HTML                  -->
<head> <!--     -->
  <meta charset=“utf-8”> <!–     -->
  <meta http-equiv=“X-UA-Compatible” content=“IE=edge”> <!--         IE   -->

  <title>TITLE</title> <!--        -->
  <link rel=“stylesheet” href=“assets/style.css”> <!--        -->
</head>
<body> <!--     -->
  <!--
  HTML here
  -->
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2
/jquery.min.js"></script> <!-- jQuery CDN -->
  <script src=“assets/script.min.js”></script> <!-- JavaScript -->
</body>
</html>
hKp://www.spreadshirt.co.uk/-­‐C4408A6786516	
  
JavaScript	
  


 CSS	
        	
  


 DOM	
      	
  



HTML	
               	
  
Minimal	
  HTML	
  
                    	
  JavaScript	
         	
  
<!doctype html>
<html><head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge”>
</head>
<body><script src="assets/script.min.js"></script></body>
</html>
JavaScript	
                                   	
  
ECMAScript	
  5	
  Strict	
  Mode	
  

! 
     !   “Use Strict”;
! 
     !              var	
                             scope	
  
     !            with
     !     arguments.callee	
  
     !     …
!   For	
  “The	
  Good	
  Part”	
  
!                     eval	
  is	
  evil	
  
jQuery	
  Library	
  
The	
  Dollar	
  

!         	
  DOM	
  Element	
     $(              )
        jQuery	
                            	
  
	
  
       $(”#neat").addClass("ohmy").show("slow");

       var el = document.getElementById(‘neat’);
       if (!/bohmyb/.test(el.className) el.className += ‘ ohmy’;
html5shiv	
  Library	
  
                  	
  
!   IE6/7/8	
                         	
  HTML5	
  
!   	
  <head>	
         	
  IE	
  condi(onal	
  comment
                	
  html5.js	
  
    <!--[if lt IE 9]>
      <script src="assets/libs/html5.js”
      type="text/javascript"></script>
    <![endif]-->
 
                                                 	
  
! 
     if (!window.FileReader) { … }

     if (!document.createElement(‘canvas’).getContext) {
       …
     }

     if (!Array.prototype.forEach) { … }


!   Modernizer	
  
! Polyfill JavaScript	
              (shim)	
  
Polyfill	
        	
  
	
  	
  
if (!Array.prototype.forEach) {
   Array.prototype.forEach = function(c,d){var
  e,a;if(this==null)throw new TypeError(" this
  is null or not defined");var b=Objec
t(this),g=b.length>>>0;if({}.toString.cal
l(c)!="[object Function]")throw new TypeErro
r(c+" is not a function");d&&(e=d);fo
r(a=0;a<g;){var f;a in b&&(f=b[Pk],c.cal
l(e,f,a,b));a++}};
}

              	
  Mozilla	
  Developer	
  Network   	
  Closure	
  Complier	
     	
  
Modernizr	
  Library	
  
	
  	
  
!              40	
                        	
  HTML5	
  
!                        Modernizr	
  
!     	
  <HTML>	
                    	
  class
!                    	
  script	
  loader	
  
!     …	
  
Modernizr	
  Library	
  
        polyfill	
  
Modernizr.load({
  test: Modernizr.geolocation,
  yep : 'geo.js',
  nope: 'geo-polyfill.js'
});
<h1>Hello	
  World</h1>
 API	
  
requestAnima(onFrame,	
  setImmediate	
  …	
  

! 
     !                                    	
  2005	
   	
  
     !       setInterval	
  =	
  
     !    
                                                                         F.I.R.	
         2005 	
  
     !    
     snowtimer = setInterval("snowIE_NS6()", 10);


                                                    hKp://www.altan.hr/snow/index.html#eng	
  
                                                    	
  
setInterval	
  vs	
  requestAnimateFrame	
  
	
  




                 http://msdn.microsoft.com/en-us/ie/hh272906
 API	
  
vender	
  prefix	
  shim	
  and	
  fallback	
  
    window.requestAnimationFrame = (function(){
          return window.requestAnimationFrame              ||
                  window.webkitRequestAnimationFrame       ||
                  window.mozRequestAnimationFrame          ||
                  window.oRequestAnimationFrame            ||
                  window.msRequestAnimationFrame           ||
                  function(callback, element){
                    window.setTimeout(callback, 1000       / 60);
          };
    })();

    requestAnimationFrame(
       function step() {
          snowIE_NS6();
          if (not_stopped) requestAnimationFrame(step);
       }
    );
            hKp://paulirish.com/2011/requestanima(onframe-­‐for-­‐smart-­‐anima(ng/	
  
 API	
  
Web	
  Workers	
  
	
      	
  
!                   	
  while(true)	
         	
  
      while(true) { snowIE_NS6(); };


!             Web	
  Workers	
  
     	
  thread       	
  while	
  loop	
  
      var worker = new Worker(‘./snow_calc.js’);
      worker.onmessage = function (ev) {
         …
      };
Web	
  Workers	
                    	
  
	
  	
  
!                  	
  DOM	
  
     l          window	
   	
  global	
  object
     l            XMLHKpRequest	
   importScript()	
  
     l          console.log()	
  	
  (T____T)
!                   postMessage()	
  
     	
  scope
Web	
  Workers	
  
Drag	
  Drop	
  API	
  &	
  File	
  API	
  
	
        	
  
!          	
  script	
                              	
  
     l              	
  <input	
  type=“file”>	
            	
  
!                           	
  
     ! 
     ! 
     ! 
Drag	
  Drop	
  API	
  &	
  File	
  API	
  
Web	
     	
  
Beyond	
  Browsers	
  
	
  	
  	
  
!   Site-­‐specific	
  Browsers	
  
     !   HTA:	
  HTML	
  Applica(ons	
  (.hta)	
  
     !   Ac(veX	
  Control	
   	
  Windows	
            	
  IE	
  
!   Web	
   	
  OS	
                 	
  
     !       IE4	
   	
  Ac(ve	
  Desktop 1997 	
  
     !       Windows	
  Widgets	
                     	
  
     !       IE9+	
  
     !       Windows	
  8	
  Metro-­‐style	
  App
!                     	
  OS	
  
     !   G	
             	
  C	
                                     	
  (1966-­‐1997)	
  
Build Windows 2011 Keynote, http://www.buildwindows.com/
Metro UI start screen, http://www.microsoft.com/presspass/events/build/
Going	
  Mobile	
  
	
  	
  	
  
! 
!   Web	
  App	
  as	
  App
    !   A	
   i	
                     Add	
  to	
  Home	
  Screen
    ! PhoneGap                	
  Windows	
  Phone	
  7	
  
JavaScript	
  is	
  more	
  than	
  web	
  
	
  	
  	
  
!                            	
  JavaScript	
              	
  
     !     Windows	
  Script	
  Host	
  
     !                                              	
  
     !     Node.JS	
  
     !     Titanium	
  
     !     Mozilla	
  Applica(on	
  Plaborm	
  (XUL	
  Runner)	
  
Toward	
  a	
  more	
  beau(ful	
  web	
  
	
  	
  
!   Web	
                                             	
  
!   Web	
  

     !   Single	
  toolset	
  for	
  all	
  plaborm
! 
     !                  jQuery          Modernizr
! 
 
     HTML5                                                                     (	
  DEV311	
  )	
  
9/15/2011	
  	
  10:20	
  –	
  11:30	
  


hKp://caniuse.com/	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  (When	
  can	
  I	
  use	
  …	
                           )	
  



hKp://diveintohtml5.org/	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  (Dive	
  into	
  HTML5	
                                              	
  HTML5	
  )	
  (           )	
  
 

hKp://technet.microsow.com/zh-­‐                              hKp://msdn.microsow.com/zh-­‐
tw/default.aspx	
                                             tw/default.aspx	
  
                                                              	
  
	
  

Resources	
  for	
  IT	
  Professionals	
                     Resources	
  for	
  Developers	
  

       windows.microsow.com/zh-­‐TW/internet-­‐explorer/products/ie/home	
  
       Microsow	
  Internet	
  Explorer	
  9	
       	
  
       ie.microsow.com/testdrive/	
  
       Internet	
  Explorer	
  Test	
  Drive	
  (   	
  IE	
  10	
  Preview	
  2)	
  (   )	
  

       hKp://msdn.microsow.com/zh-­‐tw/ie/gg192966.aspx	
  
                  Internet	
  Explorer	
                                      	
  
©	
  2009	
  Microsow	
  Corpora(on.	
  All	
  rights	
  reserved.	
  Microsow,	
  Windows,	
  Windows	
  Vista	
  and	
  other	
  product	
  names	
  are	
  or	
  may	
  be	
  registered	
  trademarks	
  and/or	
  trademarks	
  in	
  the	
  U.S.	
  and/or	
  other	
  countries.	
  
The	
  informa(on	
  herein	
  is	
  for	
  informa(onal	
  purposes	
  only	
  and	
  represents	
  the	
  current	
  view	
  of	
  Microsow	
  Corpora(on	
  as	
  of	
  the	
  date	
  of	
  this	
  presenta(on.	
  	
  Because	
  Microsow	
  must	
  respond	
  to	
  changing	
  market	
  condi(ons,	
  it	
  should
 	
  not	
  be	
  interpreted	
  to	
  be	
  a	
  commitment	
  on	
  the	
  part	
  of	
  Microsow,	
  and	
  Microsow	
  cannot	
  guarantee	
  the	
  accuracy	
  of	
  any	
  informa(on	
  provided	
  awer	
  the	
  date	
  of	
  this	
  presenta(on.	
  	
  MICROSOFT	
  MAKES	
  NO	
  WARRANTIES,	
  EXPRESS,
                                                                                                                  	
  IMPLIED	
  OR	
  STATUTORY,	
  AS	
  TO	
  THE	
  INFORMATION	
  IN	
  THIS	
  PRESENTATION.        	
  

More Related Content

What's hot

How to make Ajax work for you
How to make Ajax work for youHow to make Ajax work for you
How to make Ajax work for youSimon Willison
 
JavaScript Performance Patterns
JavaScript Performance PatternsJavaScript Performance Patterns
JavaScript Performance PatternsStoyan Stefanov
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developergicappa
 
Progressive Downloads and Rendering - take #2
Progressive Downloads and Rendering - take #2Progressive Downloads and Rendering - take #2
Progressive Downloads and Rendering - take #2Stoyan Stefanov
 
HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?Remy Sharp
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of usStefan Adolf
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for youSimon Willison
 
WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)Shumpei Shiraishi
 
Even faster web sites presentation 3
Even faster web sites presentation 3Even faster web sites presentation 3
Even faster web sites presentation 3Felipe Lavín
 
Even faster web sites
Even faster web sitesEven faster web sites
Even faster web sitesFelipe Lavín
 
High Performance Social Plugins
High Performance Social PluginsHigh Performance Social Plugins
High Performance Social PluginsStoyan Stefanov
 
The DOM is a Mess @ Yahoo
The DOM is a Mess @ YahooThe DOM is a Mess @ Yahoo
The DOM is a Mess @ Yahoojeresig
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginningAnis Ahmad
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usStefan Adolf
 

What's hot (19)

HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
Ajax Security
Ajax SecurityAjax Security
Ajax Security
 
How to make Ajax work for you
How to make Ajax work for youHow to make Ajax work for you
How to make Ajax work for you
 
JavaScript Performance Patterns
JavaScript Performance PatternsJavaScript Performance Patterns
JavaScript Performance Patterns
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developer
 
JavaScript-Core
JavaScript-CoreJavaScript-Core
JavaScript-Core
 
Road to Rails
Road to RailsRoad to Rails
Road to Rails
 
Progressive Downloads and Rendering - take #2
Progressive Downloads and Rendering - take #2Progressive Downloads and Rendering - take #2
Progressive Downloads and Rendering - take #2
 
HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for you
 
WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)
 
Even faster web sites presentation 3
Even faster web sites presentation 3Even faster web sites presentation 3
Even faster web sites presentation 3
 
Even faster web sites
Even faster web sitesEven faster web sites
Even faster web sites
 
High Performance Social Plugins
High Performance Social PluginsHigh Performance Social Plugins
High Performance Social Plugins
 
The DOM is a Mess @ Yahoo
The DOM is a Mess @ YahooThe DOM is a Mess @ Yahoo
The DOM is a Mess @ Yahoo
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginning
 
HTML5 JS APIs
HTML5 JS APIsHTML5 JS APIs
HTML5 JS APIs
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of us
 

Similar to HTML5 應用程式開發簡介

Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Sho Ito
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracketjnewmanux
 
从小书签到浏览器扩展的应用
从小书签到浏览器扩展的应用从小书签到浏览器扩展的应用
从小书签到浏览器扩展的应用Alipay
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBob Paulin
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Sadaaki HIRAI
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるSadaaki HIRAI
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12Stephan Hochdörfer
 
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010Patrick Lauke
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Asher Martin
 
HTML5 Who what where when why how
HTML5 Who what where when why howHTML5 Who what where when why how
HTML5 Who what where when why howbrucelawson
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An OverviewNagendra Um
 
Declarative and standards-based web application development with the Ample SDK
Declarative and standards-based web application development with the Ample SDKDeclarative and standards-based web application development with the Ample SDK
Declarative and standards-based web application development with the Ample SDKBéla Varga
 

Similar to HTML5 應用程式開發簡介 (20)

Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~
 
Sanjeev ghai 12
Sanjeev ghai 12Sanjeev ghai 12
Sanjeev ghai 12
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracket
 
从小书签到浏览器扩展的应用
从小书签到浏览器扩展的应用从小书签到浏览器扩展的应用
从小书签到浏览器扩展的应用
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Echo HTML5
Echo HTML5Echo HTML5
Echo HTML5
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12
 
[In Control 2010] HTML5
[In Control 2010] HTML5[In Control 2010] HTML5
[In Control 2010] HTML5
 
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
 
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2
 
HTML5 Who what where when why how
HTML5 Who what where when why howHTML5 Who what where when why how
HTML5 Who what where when why how
 
HTML5와 모바일
HTML5와 모바일HTML5와 모바일
HTML5와 모바일
 
Html 5 boot camp
Html 5 boot campHtml 5 boot camp
Html 5 boot camp
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 
Declarative and standards-based web application development with the Ample SDK
Declarative and standards-based web application development with the Ample SDKDeclarative and standards-based web application development with the Ample SDK
Declarative and standards-based web application development with the Ample SDK
 

More from Timothy Chien

Insight Gaia - OS Shell in a &lt;html>
Insight Gaia - OS Shell in a &lt;html>Insight Gaia - OS Shell in a &lt;html>
Insight Gaia - OS Shell in a &lt;html>Timothy Chien
 
Apps on HTML5 - Why, how, and beyond
Apps on HTML5 - Why, how, and beyondApps on HTML5 - Why, how, and beyond
Apps on HTML5 - Why, how, and beyondTimothy Chien
 
Gfx.tw: Two Year Report
Gfx.tw: Two Year ReportGfx.tw: Two Year Report
Gfx.tw: Two Year ReportTimothy Chien
 
Google Apps Account as OpenID (中文)
Google Apps Account as OpenID (中文)Google Apps Account as OpenID (中文)
Google Apps Account as OpenID (中文)Timothy Chien
 
Google Apps Account as OpenID
Google Apps Account as OpenIDGoogle Apps Account as OpenID
Google Apps Account as OpenIDTimothy Chien
 
OpenID 登入 UI 與流程設計
OpenID 登入 UI 與流程設計OpenID 登入 UI 與流程設計
OpenID 登入 UI 與流程設計Timothy Chien
 
HTML5 AJAX File Upload
HTML5 AJAX File UploadHTML5 AJAX File Upload
HTML5 AJAX File UploadTimothy Chien
 

More from Timothy Chien (7)

Insight Gaia - OS Shell in a &lt;html>
Insight Gaia - OS Shell in a &lt;html>Insight Gaia - OS Shell in a &lt;html>
Insight Gaia - OS Shell in a &lt;html>
 
Apps on HTML5 - Why, how, and beyond
Apps on HTML5 - Why, how, and beyondApps on HTML5 - Why, how, and beyond
Apps on HTML5 - Why, how, and beyond
 
Gfx.tw: Two Year Report
Gfx.tw: Two Year ReportGfx.tw: Two Year Report
Gfx.tw: Two Year Report
 
Google Apps Account as OpenID (中文)
Google Apps Account as OpenID (中文)Google Apps Account as OpenID (中文)
Google Apps Account as OpenID (中文)
 
Google Apps Account as OpenID
Google Apps Account as OpenIDGoogle Apps Account as OpenID
Google Apps Account as OpenID
 
OpenID 登入 UI 與流程設計
OpenID 登入 UI 與流程設計OpenID 登入 UI 與流程設計
OpenID 登入 UI 與流程設計
 
HTML5 AJAX File Upload
HTML5 AJAX File UploadHTML5 AJAX File Upload
HTML5 AJAX File Upload
 

Recently uploaded

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 

Recently uploaded (20)

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 

HTML5 應用程式開發簡介

  • 1. HTML5    ((mdream)   Web  Developer   DEV310  
  • 2. <me  />     !   “(mdream”   !   Web  Developer,  not  Designer   l   Web    FrontPage    HTML5   l  PhotoShop     !   Programmer   l   m(_  _)m  
  • 3. HTML5 hKp://(mc.idv.tw/wordcloud/  
  • 4. Outline         !   !    HTML5   !   !   IE10   !   Web   !    
  • 5.
  • 6. JavaScript   CSS   DOM     HTML    
  • 7. How  browsers  work:  Behind  the  scenes  of  modern  web  browsers   hKp://taligarsiel.com/Projects/howbrowserswork1.htm  
  • 8.         HTML   ! 1991   !  !  crica.  2004 !   CSS   1995   !   HTML   1996   !  2010 !   JavaScript   ECMAScript 1996   !   Event-­‐based  HTML    CSS   !  XMLHKpRequest 2004 !   Document  Object  Model DOM 1996 !   HTML    
  • 9.
  • 10. JavaScript   CSS     DOM     HTML    
  • 11. Web  as  an  Applica(on  Plaborm
  • 12. HTML5     !   <HTML    /> !   <blink>    <marquee>   !   Buzzword™ !   Flash   hKp://lovesansrival.blogspot.com/2010/10/first-­‐internet-­‐ browser-­‐wars.html  
  • 13. HTML5    …         !   API     l  l   OS   l  hKp://www.w3.org/html/logo/  
  • 14.     !   Library,  not  Framework   !  frameworks !  !   Say  good  bye  to  some  of  the  “JavaScript  PaKerns”   hKp://www.w3.org/html/logo/  
  • 15.  OS       !   2D    …   !   Typed  Arrays     hKp://www.w3.org/html/logo/  
  • 16.   !  !    !  !   A   G   O    M     hKp://www.w3.org/html/logo/  
  • 17. -­‐   Mac   -­‐   PC   -­‐    hKp://xkcd.com/934/  
  • 19. IDE       !  IDE   !  !    *    Authoring  Tools  
  • 20. Internet  Explorer   F12  Developer  Tools  
  • 21. Chrome,  Safari,  Webkit  Nightly   Web  Inspector  
  • 24.    console.log()   Console     !  console.log()   !    Console   !   Console  API:     hKp://gebirebug.com/wiki/index.php/Console_API
  • 25. HTML       <!doctype html> <html lang="zh-tw"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>TITLE</title> <link rel="stylesheet" href="assets/style.css"> </head> <body> <!-- HTML here --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2 /jquery.min.js"></script> <script src="assets/script.min.js"></script> </body> </html>
  • 26. HTML       <!doctype html> <!-- HTML5 --> <html lang=“zh-tw”> <!-- HTML --> <head> <!-- --> <meta charset=“utf-8”> <!– --> <meta http-equiv=“X-UA-Compatible” content=“IE=edge”> <!-- IE --> <title>TITLE</title> <!-- --> <link rel=“stylesheet” href=“assets/style.css”> <!-- --> </head> <body> <!-- --> <!-- HTML here --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2 /jquery.min.js"></script> <!-- jQuery CDN --> <script src=“assets/script.min.js”></script> <!-- JavaScript --> </body> </html>
  • 28. JavaScript   CSS     DOM     HTML    
  • 29. Minimal  HTML    JavaScript     <!doctype html> <html><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge”> </head> <body><script src="assets/script.min.js"></script></body> </html>
  • 30. JavaScript     ECMAScript  5  Strict  Mode   !  !   “Use Strict”; !  !   var   scope   !   with ! arguments.callee   !   … !   For  “The  Good  Part”   !  eval  is  evil  
  • 31. jQuery  Library   The  Dollar   !   DOM  Element   $( ) jQuery       $(”#neat").addClass("ohmy").show("slow"); var el = document.getElementById(‘neat’); if (!/bohmyb/.test(el.className) el.className += ‘ ohmy’;
  • 32. html5shiv  Library     !   IE6/7/8    HTML5   !    <head>    IE  condi(onal  comment  html5.js   <!--[if lt IE 9]> <script src="assets/libs/html5.js” type="text/javascript"></script> <![endif]-->
  • 33.     !  if (!window.FileReader) { … } if (!document.createElement(‘canvas’).getContext) { … } if (!Array.prototype.forEach) { … } !   Modernizer   ! Polyfill JavaScript   (shim)  
  • 34. Polyfill         if (!Array.prototype.forEach) { Array.prototype.forEach = function(c,d){var e,a;if(this==null)throw new TypeError(" this is null or not defined");var b=Objec t(this),g=b.length>>>0;if({}.toString.cal l(c)!="[object Function]")throw new TypeErro r(c+" is not a function");d&&(e=d);fo r(a=0;a<g;){var f;a in b&&(f=b[Pk],c.cal l(e,f,a,b));a++}}; }  Mozilla  Developer  Network  Closure  Complier    
  • 35. Modernizr  Library       !   40    HTML5   !   Modernizr   !    <HTML>    class !    script  loader   !   …  
  • 36. Modernizr  Library   polyfill   Modernizr.load({ test: Modernizr.geolocation, yep : 'geo.js', nope: 'geo-polyfill.js' });
  • 38.  API   requestAnima(onFrame,  setImmediate  …   !  !    2005     ! setInterval  =   !   F.I.R.   2005   !   snowtimer = setInterval("snowIE_NS6()", 10); hKp://www.altan.hr/snow/index.html#eng    
  • 39. setInterval  vs  requestAnimateFrame     http://msdn.microsoft.com/en-us/ie/hh272906
  • 40.  API   vender  prefix  shim  and  fallback   window.requestAnimationFrame = (function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback, element){ window.setTimeout(callback, 1000 / 60); }; })(); requestAnimationFrame( function step() { snowIE_NS6(); if (not_stopped) requestAnimationFrame(step); } ); hKp://paulirish.com/2011/requestanima(onframe-­‐for-­‐smart-­‐anima(ng/  
  • 42. Web  Workers       !   while(true)     while(true) { snowIE_NS6(); }; !  Web  Workers    thread  while  loop   var worker = new Worker(‘./snow_calc.js’); worker.onmessage = function (ev) { … };
  • 43. Web  Workers         !   DOM   l  window    global  object l  XMLHKpRequest   importScript()   l  console.log()    (T____T) !  postMessage()    scope
  • 45. Drag  Drop  API  &  File  API       !   script     l   <input  type=“file”>     !    !  !  ! 
  • 46. Drag  Drop  API  &  File  API  
  • 47. Web    
  • 48. Beyond  Browsers         !   Site-­‐specific  Browsers   !   HTA:  HTML  Applica(ons  (.hta)   !   Ac(veX  Control    Windows    IE   !   Web    OS     !   IE4    Ac(ve  Desktop 1997   !   Windows  Widgets     !   IE9+   !   Windows  8  Metro-­‐style  App !   OS   !   G    C    (1966-­‐1997)  
  • 49. Build Windows 2011 Keynote, http://www.buildwindows.com/
  • 50. Metro UI start screen, http://www.microsoft.com/presspass/events/build/
  • 51. Going  Mobile         !  !   Web  App  as  App !   A   i   Add  to  Home  Screen ! PhoneGap  Windows  Phone  7  
  • 52. JavaScript  is  more  than  web         !   JavaScript     !   Windows  Script  Host   !     ! Node.JS   !   Titanium   !   Mozilla  Applica(on  Plaborm  (XUL  Runner)  
  • 53.
  • 54. Toward  a  more  beau(ful  web       !   Web     !   Web   !   Single  toolset  for  all  plaborm !  !  jQuery Modernizr ! 
  • 55.
  • 56.   HTML5 (  DEV311  )   9/15/2011    10:20  –  11:30   hKp://caniuse.com/                                          (When  can  I  use  …   )   hKp://diveintohtml5.org/                      (Dive  into  HTML5    HTML5  )  ( )  
  • 57.   hKp://technet.microsow.com/zh-­‐ hKp://msdn.microsow.com/zh-­‐ tw/default.aspx   tw/default.aspx       Resources  for  IT  Professionals   Resources  for  Developers   windows.microsow.com/zh-­‐TW/internet-­‐explorer/products/ie/home   Microsow  Internet  Explorer  9     ie.microsow.com/testdrive/   Internet  Explorer  Test  Drive  (  IE  10  Preview  2)  ( )   hKp://msdn.microsow.com/zh-­‐tw/ie/gg192966.aspx   Internet  Explorer    
  • 58. ©  2009  Microsow  Corpora(on.  All  rights  reserved.  Microsow,  Windows,  Windows  Vista  and  other  product  names  are  or  may  be  registered  trademarks  and/or  trademarks  in  the  U.S.  and/or  other  countries.   The  informa(on  herein  is  for  informa(onal  purposes  only  and  represents  the  current  view  of  Microsow  Corpora(on  as  of  the  date  of  this  presenta(on.    Because  Microsow  must  respond  to  changing  market  condi(ons,  it  should  not  be  interpreted  to  be  a  commitment  on  the  part  of  Microsow,  and  Microsow  cannot  guarantee  the  accuracy  of  any  informa(on  provided  awer  the  date  of  this  presenta(on.    MICROSOFT  MAKES  NO  WARRANTIES,  EXPRESS,  IMPLIED  OR  STATUTORY,  AS  TO  THE  INFORMATION  IN  THIS  PRESENTATION.