HTML 5 Hands On By Rohit Ghatol

Slides:



Advertisements
Similar presentations
Build Amazing Apps with Web Standards Mobile HTML5 Applications In Hours, Not Days.
Advertisements

What is HTML5…?. ”…removes the need for plugins” ”…can handle multimedia directly” ”…enables rich, interactive clients” ”…enables advanced visual designs”
Bring Life to Your Web Pages with JavaScript and HTML5 Part 2 Ole Ildsgaard Hougaard -
HTML5, OVERVIEW AND NEW FEATURES PowerPoint by Mason O’Mara.
CSCI 3100 Tutorial 6 Web Development Tools 1 Cuiyun GAO 1.
More CSS - Page layout + HTML5 new features Boriana Koleva Room: C54
SHAREPOINT PAKISTAN USER GROUP #1 SHAREPOINT COMMUNITY IN PAKISTAN AND ASIA HTML5 and SharePoint 2013.
HTML 5. What is HTML5? HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. The previous version of HTML came in The web has changed.
HTML 5 Previous version: HTML4.01, 1999 Still work in progress, most browsers support some of it.
HTML 5 Tutorial Chapter 1 Introduction. What is HTML5? HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. The previous version of HTML.
HTML 5 The next generation of web programming. WHERE IT ALL BEGAN.
Lecture 18. HTML5 and JavaScript Instructor: Jie Yang Department of Computer Science University of Massachusetts Lowell Exploring the Internet,
CANVAS Fundamentals. What is Canvas? Canvas is a medium for oil painting. One of the earliest oils on canvas is a French Madonna from Canvas is.
HTML5. What is HTML5? HTML5 will be the new standard for HTML. HTML5 is the next generation of HTML. HTML5 is still a work in progress. However, the major.
Gil Megidish And I love writing / rewriting / reverse engineering games.
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
Microsoft Certification Exam Michael Van Cleave Planet Technologies.
HTML5 Internet Engineering Spring 2014 Bahador Bakhshi CE & IT Department, Amirkabir University of Technology.
IT Engineering I Instructor: Rezvan Shiravi
HTML5 Accessibility Ted Drake, Yahoo! Accessibility Lab Slideshare.net/7mary4.
SIG WEB January 31, 3PM. What is HTML5? What it is: Allows for better intergration of media consumption. A new open standard Provides new APIs.
Josh
IE11 Preview is here! Briefing prepared for the IE MVPs and IE userAgents communities.
Building Windows 8 Apps with HTML & JavaScript Jaime Rodriguez Principal
Windows Store apps with HTML + Facebook integration
HTML, HTML5 Canvas, JavaScript PART 3 LOOKING MORE CLOSELY AT FULL BLOWN GAME DESIGN A PATTERNED BACKGROUND (CREATED WTIH LOOPS) WITH A MOVING OBJECT CHALLENGES.
New Features of HTML 5.0 Barbara Ericson
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout HTML5 – Canvas.
HTML5 – The Power of HTML5 – The Power of Thomas Lewis HTML5 Principal Technical Evangelist Microsoft | asimplepixel.tumblr.com.
Programming Games Show your simple video. More video examples. Audio. Classwork/Homework: Produce more complex video program.
Proglan Session 1. .  HTML5 will be the new standard for HTML.  The previous version of HTML, HTML 4.01, came in The web has changed a lot since.
HTML tips BTM 395: Internet Programming. Components of website development Content Structure Format and design Dynamics and interactivity –Forms –Client-side.
Presented By: Mahmoud Ghoz Internet Explorer 9 and HTML5 for Developers.
Programming Games Show project. Refresher on coordinates. Scaling, translation. HTML5 logo. Refresher on animation. Bouncing ball. Homework: Do your own.
Congratulations! You are part of a global community of thousands of web developers who attend Web Camps to keep their web development skills up-to-date.
Creating User Interfaces Recap HTML/HTML5 JavaScript features Homework: keep working on user observation studies. Review JavaScript.
CSS 2D Transforms CSS 3D Transforms CSS Animations CSS Backgrounds & Borders CSS Color CSS Flexbox CSS Fonts CSS Grid CSS Hyphenation CSS Image Values.
Apps just in… More developers More Downloads More apps Amazing Momentum Since Launch.
UPLOAD / DOWNLOAD april  HTML5 is just the next iteration of HTML  Previous version was technically HTML 4.01, which incorporated XHTML 1.0.
Programming games Review concepts. Crooked coin toss. Drawing on canvas. Homework: Complete [static] drawings. Upload files to website.
Internet Explorer 10 IE9 hardware-accelerated platform CSS 2D Transforms CSS Backgrounds & Borders CSS Color CSS Fonts CSS Media Queries CSS Namespaces.
Rich Internet Applications 9. HTML 5 and RIAs. HTML 5 Standard currently under development by W3C Aims to improve the language with support for the latest.
(1) HTML5, CSS, Twitter Bootstrap. (2) HTML5 Will be the new standard New features Drag and Drop and Support for local storage,,,, New input types Removed.
HTML5 Requirement Driven Design David Tarrant Electronics and Computer Science.
Part – 3 : HTML 5 SVG Tag. † SVG stands for Scalable Vector Graphics. † SVG is used to define vector-based graphics for the Web. † SVG defines the graphics.
CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.
HTML5 ProgLan HTML5 Making a Game on the Canvas Part 1.
The HTML5 logo was introduced by W3C in 2010
Chapter 17 The Need for HTML 5.
Chapter 4: Feature Detection & Drag and Drop
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
SPC Developer 6/10/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
HTML5 – The Saga Continues
Development of Internet Applications HTML5
Introduction to HTML5.
HTML 5 Tutorial Chapter 1 Introduction.
Building beautiful and interactive apps with HTML5 & CSS3
Introduction to HTML5.
Basics of Web Design Chapter 11 Media and Interactivity Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
HTML 5 Training HTML 5 SYMANTICS [Notes to trainer:
HTML5 and Designing a Rich Internet Experience
HTML5 – Canvas JavaScript Simple Drawing
Introduction to HTML5.
HTML5 and Designing a Rich Internet Experience
Giuseppe Attardi Università di Pisa
Catchup. Work on project.
Creating User Interfaces
Programming Games Refresher on coordinates. Scaling, translation. HTML5 logo. Refresher on animation. Bouncing ball. Show project. Classwork/Homework:
HTML5 and Designing a Rich Internet Experience
Presentation transcript:

HTML 5 Hands On By Rohit Ghatol

Topics 1.DocType, New Tags and New Form Elements 2.Audio, Video, Canvas and SVG 3.CSS 3 (Transition and Text Remaining) 4.Web Workers and Web Sockets 5.File System API and Drag and Drop 6.Geo, Device Orientation 7.Offline/Storage API 8.Chrome Frame

History of HTML and way to HTML 5

HTML 4.01

Web Technology = Innovation Vs Standards

XHR Window Slow

When will HTML 5 be ready?

Not in few years to come

HTML 5 Browser Compatibility

New DocType and Tags

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " var data = {…} HTML5

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " var data = {…} HTML5

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " var data = {…} HTML5

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " var data = {…} HTML5

Section, Article, Aside

Div Hell TechNext Tech Meet for Dev, QA and Agile practisioner! Home Archive About HTML 5 Actually Hands On 30th July 2011 Topic People have been talking about HTML 5 for ling. I think the wait is over and HTML 5 is now a reality.This session is all hands on coding of HTML 5. The topics include DocType, New Tags and New Form Types (Better Markup) Audio, Video, Canvas and SVG CSS 3 Web Workers and Web Sockets File System API and Drag and Drop Geo, Device Orientation Offline/Storage API Chrome Frame Venue Synerzip Softech Recreational Area 3rd Flior, Revliution Mall, next to CityPride Kothrud, Sheth U M Rathi Path, Pune, Maharashtra, India, Pune (map) 3 Reviews Posted at 12:01 AM July 10, 2011 Digging Deeper into ORM and Hibernate 13th August 2011 Topic Although many of us have used Hibernate and JPA, our understanding of it is limited to its usage alone. This talk digs deeper into what ORM is and compares Hibernate framework Vs the JPA standard and their relationship. This talks also focuses on what can not be done using ORM and what are the best practices when it comes to using ORM ORM : What exactly it solves Hibernate - Where it fits into picture Hibernate vs JPA Limitations of ORM Good practices of using ORM in context of JPA and Hibernate Venue Synerzip Softech Recreational Area 3rd Flior, Revliution Mall, next to CityPride Kothrud, Sheth U M Rathi Path, Pune, Maharashtra, India, Pune (map) 3 Queries Posted at 12:01 AM July 3, 2011 What's new Group Photo Tech Next Calendar Upcoming events © 2011 Tech Next

What is Needed? More Meaning to tags than just Divs

Header Nav Article Aside Header Section Footer Figure

New Form Elements

New HTML Form Elements

Audio & Video Tags

Audio & Video Formats & Codecs

Formats H 264 – MP4 Video H 264 – Codec Theora – Ogg Video Theora – Codec WebM -.webm Video WebM – Codec

Audio & Video Tags

Tags

Audio & Video Events

Media Events

Canvas & SVG

Canvas var canvasElem = document.getElementById(“canvas”); var ctx = canvasElem.getContext(‘2d’); ctx.fillStyle = "#00A308"; ctx.beginPath(); ctx.arc(220, 220, 50, 0, Math.PI*2, true); ctx.closePath(); ctx.fill(); ctx.fillStyle = "#FF1C0A"; ctx.beginPath(); ctx.arc(100, 100, 100, 0, Math.PI*2, true); ctx.closePath(); ctx.fill(); //the rectangle is half transparent ctx.fillStyle = "rgba(255, 255, 0,.5)" ctx.beginPath(); ctx.rect(15, 150, 120, 120); ctx.closePath(); ctx.fill();

Drawing Capabilities Drawing APIs – lineTo(),moveTo(),arcTo() Transformation APIs – scale(), translate(), transform() Context APIs – save() – restore()

Drawing Concepts Drawing by calculating everything yourself Drawing using Transformation

Example 0,0 200,200 84% What is x,y? 45 Degree

Psuedo Code ctx.save(); ctx.rect(0,0,200,200); ctx.restore(); ctx.save(); ctx.translate(200,200); ctx.rect(0,0,200,200); Ctx.save(); 0,0 200,200

Psuedo Code ctx.save(); ctx.translate(300,200); ctx.rotate(…); ctx.rect(0,0,200,200); ctx.restore(); ctx.save(); ctx.translate(200,200); ctx.translate(300,200); ctx.scale(…,…); ctx.rotate(…); ctx.rect(0,0,200,200); Ctx.save(); 84% 45 Degree

Game Concept setInterval(gameLoop,100); function gameLoop(){ manipulateModel(); clearCanvas(); drawModel(); }

Brick Game

SVG

CSS 3

CSS 3 Border Radius

CSS 3 Box Shadow

CSS 3 Gradients

CSS3 Animations Step 1 – CSS Transform 2D Step 2 – CSS Transform 3D Step 3 – CSS Transition (Smoothing out) Step 4 – CSS Animation (key frames)

CSS 3 Transformation 2D Transforms and 3D Transforms

Transforms -webkit-transform: translate(x,y); -webkit-transform: scale(xScale,yScale); -webkit-perspective: distance; -webkit-transform:translate3d(x,y,z); -webkit-transform:scale3d(xScale,yScale,zScale) -webkit-transform:rotate3d(xAng,yAng,zAng);

CSS 3 Transitions

CSS 3 Animations

WebWorker

//From HTML Side var worker = new Worker(“some.js”); worker.addEventListener(“message”,function(e){ var data = e.data; }); worker.postMessage(data);

WebWorker //From Worker JavaScript side addEventListener(“message”,function(e){ //receive command from html var data = e.data; }); //inform html about result postMessage(data);

HTML Page Worker Javascript DOM XHR CSS XHR Variables postMessage() Event message postMessage() Event message Separate Javascript ContextWeb Page Context

File System and Drag and Drop

Required Setup Chrome 12 Start with command prompt – --unlimited-quota-for-files – --allow-file-access-from-files

File System Setup var fileSys function onInitFs(fs){ fileSys=fs; } function errorHandler(err){ alert(err.code); } window.webkitRequestFileSystem(window.PERSIST ENT, , onInitFs, errorHandler);

Get Directory Entry Function successCallback(dirEntry){ } function errorHandler(err){ alert(err.code); } fileSys.root.getDirectory(dirPath,{},successCallba ck,errorHandler);

Create Directory Entry Function successCallback(dirEntry){ } function errorHandler(err){ alert(err.code); } fileSys.root.getDirectory(dirPath,{create:true},su ccessCallback,errorHandler);

Read Directory Entries function listFiles(entries){ } dirReader = dirEntry.createReader(); dirReader.readEntries(listFiles, errorHandler);

Drag and Drop var dropbox = document.getElementById(“commandHistory”); dropbox.addEventListener("dragenter", dragEnter, false); dropbox.addEventListener("dragexit", dragExit, false); dropbox.addEventListener("dragover", dragOver, false); dropbox.addEventListener("drop", drop, true);

Drag and Drop function drop(event){ if(event.dataTransfer.files){ var files = event.dataTransfer.files; for(var index=0;index<files.length;index++){ var file = files[index]; alert(“name=“+file.name); }

Read File var reader = new FileReader(); // init the reader event handlers reader.onloadend = function(event){ alert(“data=“+event.target.result); } // begin the read operation reader.readAsDataURL(files[index]);

Write File fileSys.root.getFile(fileName, {create: true}, function(fileEntry) { //Now we got handle to file, lets write }, errorHandler);

Write File fileEntry.createWriter( function(fileWriter) { fileWriter.onwriteend = function(e) { logDnd(fileName); }; fileWriter.onerror = function(e) { console.log('Write failed: ' + e.toString()); }; // Create a new Blob and write it to log.txt. var bb = new window.WebKitBlobBuilder(); bb.append(event.target.result); fileWriter.write(bb.getBlob('text/plain')); }, errorHandler );

Read more about File System filesystem/ filesystem/

Geo

Geo Demo function success(position){ alert(“lat=“+position.coords.latitude); alert(“lng=“+position.coords.longitude); } if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(success, error); } else { error('not supported'); }

Device Orientation

Device Orientation Demo

var iphone = document.getElementById("iphone"); window.addEventListener("deviceorientation",function(event){ document.getElementById("alpha").innerHTML = event.alpha; document.getElementById("beta").innerHTML = event.beta; document.getElementById("gamma").innerHTML = event.gamma; var rotate = 'rotate(' + event.gamma*-1 + 'deg)'; var scale = 'scale(' + ((event.beta/180)*2 + 1) + ')'; iphone.style.webkitTransform = rotate + ' ' + scale; });