SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
Creating Rajinikant
  Powered Site
    Markandey Singh
I am markandey
I am javascript hacker
So lets talk about rajinikant
What is gmail id
       of
 rajinikanth?
gmail @ rajinikanth .com
Rajanikanth smoking in Dubai
recently I saw this site




   http://www.desimartini.com/allaboutrajni.htm
Claims to be working offline.
I loved it!
and hoped they are promoting
          HTML5
But sad they were using FLASH

             :(
Today we are going to
create a site which does the
magic of rajanikant in HTML5
A site which can work offline,
even if your internet unplugged
A site which works no matter
how your laptop is oriented!
and some more magic
DESCLAIMER

All characters and events in this talk -– even
though based on real people –- are entirely
                 fictional.
offline web apps
HTML5 defines some Offline
Application Caching APIs
Which allows you to cache
entire app offline so that your
 app will be fully operational
         even offline
Its very easy to do
Declaration of cache manifest
 <!DOCTYPE html>
 <html manifest="/cache-manifest-file">
 ----
 -----------------
 ---------------------
 ---------------------
Cache manifest file
CACHE MANIFEST




#comment goes here
./anything.js
./anything.css
./anything.png


NETWORK:
*
Cache manifest MIME type
                      has to be
                text/cache-manifest

 PHP
 header('Content-type: text/cache-manifest');


  App Engine
  self.response.headers['Content-Type'] = "text/cache-
manifest"
WARNING
 Once you deploy offline capable
app , none of your files will update to
user, untill you will update your
cache-manifest
How to check
 connectivity??

navigator.onLine
Events??


document.body.addEventListener("offline", function ()
{
    --------
    --------
}, false);

document.body.addEventListener("online", function ()
{
   --------
   --------
}, false);
Canvas
Canvas
Canvas was here for
    long time
in non-IE browsers, and now
  avaialable in IE9 as well
Canvas APIs are simple



var
canvas = document.getElementById('canvas'),
ctx = canvas.getContext('2d');
Canvas APIs are simple

canvas.width=500;
canvas.height=500;
Canvas APIs are simple

ctx.strokeStyle = '#0000FF';
ctx.lineWidth = 1;
Canvas APIs are simple

ctx.beginPath();
ctx.moveTo(x, y);
ctx.lineTo(x, y);


ctx.arc(x,y,radius,startAngle,endAngle, clockwise);


ctx.stroke();
ctx.fill();
DataUrl and Images


 var dataURL = canvas.toDataURL("image/png");



 data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA



 img = new Image();
 img.src=imgurl; //data:image/
png;base64,iVBORw0


 ctx.drawImage(img,0,0);
HTML Local Storage
its a way to store small size data
         on client side.
 (around 15MB per origin in most of the browsers)
Large data on localStorage should
be avoided & too many read/write
should be avoided !! To keep your
           app faster!!
HTML5 Local Storage API


localStorage.setItem('name',value);




value=localStorage.getItem('name');
Other APIs to store data locally are
1.  Indexed Database API
2.  File API
CSS 3D transforms
  (only supported by webkit)
Eventually major mobile
browsers are based on
webkit, e.g. iPhone, Android
etc...
: ro tateY
                 form
      kit- trans
 -web );
(- 11deg
Device orientation
  window.addEventListener('deviceorientation',
function(event) {
    var a = event.alpha,
     b = event.beta,
    g = event.gamma;

 }, false);
Device orientation
Resources and people!!




      @paul_irish            @rem




                            @Codepo8
http://caniuse.com/
Thank you
              &
          Questions!!

twitter: @markandey
email: markandey.singh at gmail

Contenu connexe

Tendances

That's crazy! how to build single page web apps
That's crazy! how to build single page web appsThat's crazy! how to build single page web apps
That's crazy! how to build single page web apps
Chris Love
 
Phone gap
Phone gapPhone gap
Phone gap
caviare
 

Tendances (20)

That's crazy! how to build single page web apps
That's crazy! how to build single page web appsThat's crazy! how to build single page web apps
That's crazy! how to build single page web apps
 
Pwa is the future. The Presentation I gave at PWA event
Pwa is the future. The Presentation I gave at PWA eventPwa is the future. The Presentation I gave at PWA event
Pwa is the future. The Presentation I gave at PWA event
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
Resume
ResumeResume
Resume
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Introduction To JavaScript
Introduction To JavaScriptIntroduction To JavaScript
Introduction To JavaScript
 
Progressive Web App (feat. React, Django)
Progressive Web App (feat. React, Django)Progressive Web App (feat. React, Django)
Progressive Web App (feat. React, Django)
 
Design Web Api
Design Web ApiDesign Web Api
Design Web Api
 
Progressive Web Applications - The Next Gen Web Technologies
Progressive Web Applications - The Next Gen Web TechnologiesProgressive Web Applications - The Next Gen Web Technologies
Progressive Web Applications - The Next Gen Web Technologies
 
ASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a coupleASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a couple
 
AWS Tech Summit - Berlin 2011 - Running Java Applications on AWS
AWS Tech Summit - Berlin 2011 - Running Java Applications on AWSAWS Tech Summit - Berlin 2011 - Running Java Applications on AWS
AWS Tech Summit - Berlin 2011 - Running Java Applications on AWS
 
Introduction to Progressive Web Applications
Introduction to Progressive Web ApplicationsIntroduction to Progressive Web Applications
Introduction to Progressive Web Applications
 
Html5 inputs
Html5 inputsHtml5 inputs
Html5 inputs
 
FEDM Meetup: Introducing Mojito
FEDM Meetup: Introducing MojitoFEDM Meetup: Introducing Mojito
FEDM Meetup: Introducing Mojito
 
Building Mobile Applications with Ionic
Building Mobile Applications with IonicBuilding Mobile Applications with Ionic
Building Mobile Applications with Ionic
 
PWA - The hidden stories about the future of the web
PWA - The hidden stories about the future of the webPWA - The hidden stories about the future of the web
PWA - The hidden stories about the future of the web
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
 
Phone gap
Phone gapPhone gap
Phone gap
 
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Progressive Web Apps keynote, Google Developer Summit, Tokyo, JapanProgressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
 
Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.
 

En vedette

Mrs. Smriti Irani Introduction
Mrs. Smriti Irani IntroductionMrs. Smriti Irani Introduction
Mrs. Smriti Irani Introduction
Irfan Pathan
 

En vedette (11)

Mrs. Smriti Irani Introduction
Mrs. Smriti Irani IntroductionMrs. Smriti Irani Introduction
Mrs. Smriti Irani Introduction
 
Ppt of amirkhan
Ppt of amirkhanPpt of amirkhan
Ppt of amirkhan
 
Zero To Hero Sudha Murty
Zero To Hero Sudha MurtyZero To Hero Sudha Murty
Zero To Hero Sudha Murty
 
Mandela 10 Lessons of Life
Mandela 10 Lessons of LifeMandela 10 Lessons of Life
Mandela 10 Lessons of Life
 
Kiran Bedi
Kiran BediKiran Bedi
Kiran Bedi
 
From Hero to Zero - DevOpsDays Boston
From Hero to Zero - DevOpsDays BostonFrom Hero to Zero - DevOpsDays Boston
From Hero to Zero - DevOpsDays Boston
 
Raj kapoor
Raj kapoorRaj kapoor
Raj kapoor
 
Presentation Zero to Hero in 9 Steps
Presentation Zero to Hero in 9 StepsPresentation Zero to Hero in 9 Steps
Presentation Zero to Hero in 9 Steps
 
Salman Khan- PR
Salman Khan- PRSalman Khan- PR
Salman Khan- PR
 
Kiranbedi
KiranbediKiranbedi
Kiranbedi
 
Swachh bharat abhiyan
Swachh bharat abhiyanSwachh bharat abhiyan
Swachh bharat abhiyan
 

Similaire à Creating Rajanikant Powered Site

Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
Robert Nyman
 
Html5 and beyond the next generation of mobile web applications - Touch Tou...
Html5 and beyond   the next generation of mobile web applications - Touch Tou...Html5 and beyond   the next generation of mobile web applications - Touch Tou...
Html5 and beyond the next generation of mobile web applications - Touch Tou...
RIA RUI Society
 
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Gustaf Nilsson Kotte
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
Robert Nyman
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World Romania
Christian Heilmann
 
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIsHTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
Gustaf Nilsson Kotte
 

Similaire à Creating Rajanikant Powered Site (20)

Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
Startup Technology: Cheatsheet for Non-Techies
Startup Technology: Cheatsheet for Non-TechiesStartup Technology: Cheatsheet for Non-Techies
Startup Technology: Cheatsheet for Non-Techies
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make it
 
Building WebApp with HTML5
Building WebApp with HTML5Building WebApp with HTML5
Building WebApp with HTML5
 
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?
 
Building great mobile apps: Somethings you might want to know
Building great mobile apps: Somethings you might want to knowBuilding great mobile apps: Somethings you might want to know
Building great mobile apps: Somethings you might want to know
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & sockets
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global domination
 
Frontend. Global domination.
Frontend. Global domination.Frontend. Global domination.
Frontend. Global domination.
 
Html5 and beyond the next generation of mobile web applications - Touch Tou...
Html5 and beyond   the next generation of mobile web applications - Touch Tou...Html5 and beyond   the next generation of mobile web applications - Touch Tou...
Html5 and beyond the next generation of mobile web applications - Touch Tou...
 
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
 
Modern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIsModern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIs
 
Html5 - Awesome APIs
Html5 - Awesome APIsHtml5 - Awesome APIs
Html5 - Awesome APIs
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
Html5
Html5Html5
Html5
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World Romania
 
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIsHTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
 
Web assembly with PWA
Web assembly with PWA Web assembly with PWA
Web assembly with PWA
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers
 
HTML5 for Rich User Experience
HTML5 for Rich User ExperienceHTML5 for Rich User Experience
HTML5 for Rich User Experience
 

Plus de markandey

YQL: Master Of the Mix
YQL: Master Of the MixYQL: Master Of the Mix
YQL: Master Of the Mix
markandey
 
Select * from internet
Select * from internetSelect * from internet
Select * from internet
markandey
 
YQL (IITK PPT)
YQL (IITK PPT)YQL (IITK PPT)
YQL (IITK PPT)
markandey
 
10 things you can't do without YQL
10 things you can't do without  YQL10 things you can't do without  YQL
10 things you can't do without YQL
markandey
 
10thingsyoucantdowithout yql1
10thingsyoucantdowithout yql110thingsyoucantdowithout yql1
10thingsyoucantdowithout yql1
markandey
 

Plus de markandey (6)

YQL: Master Of the Mix
YQL: Master Of the MixYQL: Master Of the Mix
YQL: Master Of the Mix
 
Rhok Dec-2012
Rhok Dec-2012Rhok Dec-2012
Rhok Dec-2012
 
Select * from internet
Select * from internetSelect * from internet
Select * from internet
 
YQL (IITK PPT)
YQL (IITK PPT)YQL (IITK PPT)
YQL (IITK PPT)
 
10 things you can't do without YQL
10 things you can't do without  YQL10 things you can't do without  YQL
10 things you can't do without YQL
 
10thingsyoucantdowithout yql1
10thingsyoucantdowithout yql110thingsyoucantdowithout yql1
10thingsyoucantdowithout yql1
 

Dernier

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Creating Rajanikant Powered Site