SlideShare a Scribd company logo
1 of 10
Download to read offline
HTML5 & JavaScript
New JavaScript APIs
Introduction
• Petri Niemi
• Specialist, Tieturi Oy
• petri.niemi@tieturi.fi
• Currently focusing mainly on JavaScript
• Naturally also HTML and CSS
• Other areas of interest:
• Java, C++
• Mobile
Copyright © Tieturi Oy
2
Web Standards – JavaScript
• ECMAScript (ECMA 262)
• http://www.ecma-international.org/publications/standards/Ecma-262.htm
• ECMAScript 6 currently under development
Copyright © Tieturi Oy
3
JavaScript
yr. 1995
ECMAScript
yr. 1997
ECMA 262
3rd rev.
yr. 1999
ECMA 262
5th rev.
yr. 2009
HTML5 & JavaScript
• HTML5 alone does not take you very far
• It's mostly about semantics, semantics, semantics, …
• …and a little bit about media and graphics
• Most of the "cool stuff" is actually implemented using
JavaScript
• Basics of JavaScript are easy to learn
• However, it is actually a very difficult language to master
• Most of the new JavaScript APIs are not part of the
HTML5 specification
• Developed separately
Copyright © Tieturi Oy
4
New APIs
http://en.wikipedia.org/wiki/File:HTML5-APIs-and-related-technologies-by-Sergey-Mavrody.png
Copyright © Tieturi Oy
5
Why Is JavaScript Important?
• Thick clients
• Less traffic between client and server
• RIA
• Rich internet applications
• User experience closer to native applications
• SPA
• Single page applications
• More on this later
Copyright © Tieturi Oy
6
Selected Examples
• Let's take a brief look at some example code
• Download code from:
http://www.tieturi.fi/media/code_examples.zip
• Web Storage
• Geolocation API
• File API
• Web Workers
• Web Sockets
• Canvas
Copyright © Tieturi Oy
7
Single Page Applications
• Most of the APIs we saw are fairly trivial to use
• Anyone can copy-paste and understand the examples
• However, more and more web applications are so called
"single page applications" (SPA)
• Very few lines of static HTML code
• Almost all the content is generated in JavaScript dynamically
• Try e.g. Hotmail or Gmail with JavaScript turned off in your
browser…
• This is when your code becomes non-trivial
• You will need to modularize your code
• And perhaps use a MVC library of some sort
Copyright © Tieturi Oy
8
Thank You!
• Let's end with a tiny teaser…
• Can you figure out what happens here?
• If it is not clear what the code does, feel free to ask:
petri.niemi@tieturi.fi
Copyright © Tieturi Oy
9
var foo = "AAA";
function bar() {
if (!foo) { // If foo does not exist already
var foo = "BBB";
}
alert(foo); // What does this print and why?
}
bar();
Tieturi Web Courses
• http://www.tieturi.fi/web
• JavaScript Programming
• Advanced JavaScript Programming
• HTML & CSS courses
• Mobile web courses
• Social media courses
• Web analytics – Google analytics
• Search engine optimization, web site usability and accessibility
Copyright © Tieturi Oy
10

More Related Content

What's hot

What's hot (20)

Getting Started Adobe Edge Code CC & Brackets
Getting Started Adobe Edge Code CC & BracketsGetting Started Adobe Edge Code CC & Brackets
Getting Started Adobe Edge Code CC & Brackets
 
Apereo 2018 - Polymer training
Apereo 2018 - Polymer trainingApereo 2018 - Polymer training
Apereo 2018 - Polymer training
 
Elementor - WordPress WYSIWYG Page Builder
Elementor - WordPress WYSIWYG Page BuilderElementor - WordPress WYSIWYG Page Builder
Elementor - WordPress WYSIWYG Page Builder
 
WebMatrix
WebMatrixWebMatrix
WebMatrix
 
Tipping the Scale - Eyal Eizenberg
Tipping the Scale - Eyal EizenbergTipping the Scale - Eyal Eizenberg
Tipping the Scale - Eyal Eizenberg
 
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
 
Up and Running Quickly with Vue.js
Up and Running Quickly with Vue.jsUp and Running Quickly with Vue.js
Up and Running Quickly with Vue.js
 
Angular and SEO
Angular and SEOAngular and SEO
Angular and SEO
 
Codecinella / Using CodePen to learn, prototype and inspire the front end
Codecinella / Using CodePen to learn, prototype and inspire the front endCodecinella / Using CodePen to learn, prototype and inspire the front end
Codecinella / Using CodePen to learn, prototype and inspire the front end
 
JS Fest 2019/Autumn. Eyal Eizenberg. Tipping the Scale
JS Fest 2019/Autumn. Eyal Eizenberg. Tipping the ScaleJS Fest 2019/Autumn. Eyal Eizenberg. Tipping the Scale
JS Fest 2019/Autumn. Eyal Eizenberg. Tipping the Scale
 
Sttp 7 s website02 hosting
Sttp 7 s website02 hostingSttp 7 s website02 hosting
Sttp 7 s website02 hosting
 
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
Php Indonesia x Bliblidotcom - Architecting Scalable CSSPhp Indonesia x Bliblidotcom - Architecting Scalable CSS
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
 
Websockets
WebsocketsWebsockets
Websockets
 
The RAW stack
The RAW stackThe RAW stack
The RAW stack
 
CodeUP April 2014 Lunch and Learn
CodeUP April 2014 Lunch and LearnCodeUP April 2014 Lunch and Learn
CodeUP April 2014 Lunch and Learn
 
Managing Multiple WordPress Websites in 2017
Managing Multiple WordPress Websites in 2017Managing Multiple WordPress Websites in 2017
Managing Multiple WordPress Websites in 2017
 
SPDY
SPDYSPDY
SPDY
 
WebMatrix
WebMatrixWebMatrix
WebMatrix
 
Web Development Training in Ambala ! Batra Computer Centre
Web Development Training in Ambala ! Batra Computer CentreWeb Development Training in Ambala ! Batra Computer Centre
Web Development Training in Ambala ! Batra Computer Centre
 
Time is the enemy
Time is the enemyTime is the enemy
Time is the enemy
 

Similar to Spirit-teknologiapäivät Petri Niemi HTML5 & JavaScript Developereille

Building rich interface components with SharePoint
Building rich interface components with SharePointBuilding rich interface components with SharePoint
Building rich interface components with SharePoint
Louis-Philippe Lavoie
 
Progressive Enhancement using WSGI
Progressive Enhancement using WSGIProgressive Enhancement using WSGI
Progressive Enhancement using WSGI
Matthew Wilkes
 

Similar to Spirit-teknologiapäivät Petri Niemi HTML5 & JavaScript Developereille (20)

Prototyping like it is 2022
Prototyping like it is 2022 Prototyping like it is 2022
Prototyping like it is 2022
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 
Building rich interface components with SharePoint
Building rich interface components with SharePointBuilding rich interface components with SharePoint
Building rich interface components with SharePoint
 
Training presentation.pptx
Training presentation.pptxTraining presentation.pptx
Training presentation.pptx
 
Html5
Html5Html5
Html5
 
Screw HTML5, make cool shit with AIR
Screw HTML5, make cool shit with AIRScrew HTML5, make cool shit with AIR
Screw HTML5, make cool shit with AIR
 
Progressive Enhancement using WSGI
Progressive Enhancement using WSGIProgressive Enhancement using WSGI
Progressive Enhancement using WSGI
 
Stackato v4
Stackato v4Stackato v4
Stackato v4
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019
 
HTML5--The 30,000' View (A fast-paced overview of HTML5)
HTML5--The 30,000' View (A fast-paced overview of HTML5)HTML5--The 30,000' View (A fast-paced overview of HTML5)
HTML5--The 30,000' View (A fast-paced overview of HTML5)
 
Stackato
StackatoStackato
Stackato
 
Turning huge ships - Open Source and Microsoft
Turning huge ships - Open Source and MicrosoftTurning huge ships - Open Source and Microsoft
Turning huge ships - Open Source and Microsoft
 
Html5
Html5Html5
Html5
 
Phonegap Day 2016: Ember/JS & Hybrid Apps Tips
Phonegap Day 2016: Ember/JS & Hybrid Apps TipsPhonegap Day 2016: Ember/JS & Hybrid Apps Tips
Phonegap Day 2016: Ember/JS & Hybrid Apps Tips
 
Serverless Toronto helps Startups
Serverless Toronto helps StartupsServerless Toronto helps Startups
Serverless Toronto helps Startups
 
Project Timbit
Project TimbitProject Timbit
Project Timbit
 
Stackato v3
Stackato v3Stackato v3
Stackato v3
 
Presentation
PresentationPresentation
Presentation
 
Open Apereo - Web components workshop
Open Apereo - Web components workshopOpen Apereo - Web components workshop
Open Apereo - Web components workshop
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 

More from Tieturi Oy

Testaus 2014 -seminaari. Minna Aalto, Knowit, Vuoden Testaaja 2013
Testaus 2014 -seminaari. Minna Aalto, Knowit, Vuoden Testaaja 2013Testaus 2014 -seminaari. Minna Aalto, Knowit, Vuoden Testaaja 2013
Testaus 2014 -seminaari. Minna Aalto, Knowit, Vuoden Testaaja 2013
Tieturi Oy
 
Testaus 2014 -seminaari. Kaisa Tirkkonen, Kela. Case Kela: Monimutkaisten ja ...
Testaus 2014 -seminaari. Kaisa Tirkkonen, Kela. Case Kela: Monimutkaisten ja ...Testaus 2014 -seminaari. Kaisa Tirkkonen, Kela. Case Kela: Monimutkaisten ja ...
Testaus 2014 -seminaari. Kaisa Tirkkonen, Kela. Case Kela: Monimutkaisten ja ...
Tieturi Oy
 

More from Tieturi Oy (20)

Tieturin aamiaisseminaari: Paluu tulevaisuuteen - Onlineallekirjoitus, Antti ...
Tieturin aamiaisseminaari: Paluu tulevaisuuteen - Onlineallekirjoitus, Antti ...Tieturin aamiaisseminaari: Paluu tulevaisuuteen - Onlineallekirjoitus, Antti ...
Tieturin aamiaisseminaari: Paluu tulevaisuuteen - Onlineallekirjoitus, Antti ...
 
Tieturin aamiaisseminaari: Paluu tulevaisuuteen - Robotit tulevat Cristina An...
Tieturin aamiaisseminaari: Paluu tulevaisuuteen - Robotit tulevat Cristina An...Tieturin aamiaisseminaari: Paluu tulevaisuuteen - Robotit tulevat Cristina An...
Tieturin aamiaisseminaari: Paluu tulevaisuuteen - Robotit tulevat Cristina An...
 
Tieturi - Paluu tulevaisuuteen, Veli-Matti Heiskanen, 25.5.2016
Tieturi -  Paluu tulevaisuuteen, Veli-Matti Heiskanen,  25.5.2016Tieturi -  Paluu tulevaisuuteen, Veli-Matti Heiskanen,  25.5.2016
Tieturi - Paluu tulevaisuuteen, Veli-Matti Heiskanen, 25.5.2016
 
Kaisa Hernberg: Asiantuntija epämukavuusalueella myyntityössä
Kaisa Hernberg: Asiantuntija epämukavuusalueella myyntityössäKaisa Hernberg: Asiantuntija epämukavuusalueella myyntityössä
Kaisa Hernberg: Asiantuntija epämukavuusalueella myyntityössä
 
Aamiaisseminaari 3.6.: SWOT-ryhmätöiden purku
Aamiaisseminaari 3.6.: SWOT-ryhmätöiden purkuAamiaisseminaari 3.6.: SWOT-ryhmätöiden purku
Aamiaisseminaari 3.6.: SWOT-ryhmätöiden purku
 
Aamiaisseminaari 3.6.: Julkisen hallinnon projektien haasteita. Teemu Anttila...
Aamiaisseminaari 3.6.: Julkisen hallinnon projektien haasteita. Teemu Anttila...Aamiaisseminaari 3.6.: Julkisen hallinnon projektien haasteita. Teemu Anttila...
Aamiaisseminaari 3.6.: Julkisen hallinnon projektien haasteita. Teemu Anttila...
 
Aamiaisseminaari 3.6.: Johdetut projektit julkisessa hallinnossa . Timo Summa...
Aamiaisseminaari 3.6.: Johdetut projektit julkisessa hallinnossa. Timo Summa...Aamiaisseminaari 3.6.: Johdetut projektit julkisessa hallinnossa. Timo Summa...
Aamiaisseminaari 3.6.: Johdetut projektit julkisessa hallinnossa . Timo Summa...
 
Aamiaisseminaari 3.6.: Kokonaisarkkitehtuuriprojektien haasteet. Tarja Raussi...
Aamiaisseminaari 3.6.: Kokonaisarkkitehtuuriprojektien haasteet. Tarja Raussi...Aamiaisseminaari 3.6.: Kokonaisarkkitehtuuriprojektien haasteet. Tarja Raussi...
Aamiaisseminaari 3.6.: Kokonaisarkkitehtuuriprojektien haasteet. Tarja Raussi...
 
Aamiaisseminaari 3.6.: Kokonaisarkkitehtuuriprojektien haasteet. Tarja Raussi...
Aamiaisseminaari 3.6.: Kokonaisarkkitehtuuriprojektien haasteet. Tarja Raussi...Aamiaisseminaari 3.6.: Kokonaisarkkitehtuuriprojektien haasteet. Tarja Raussi...
Aamiaisseminaari 3.6.: Kokonaisarkkitehtuuriprojektien haasteet. Tarja Raussi...
 
Aamiaisseminaari 3.6.: Julkisen hallinnon projektien haasteet ja mahdollisuud...
Aamiaisseminaari 3.6.: Julkisen hallinnon projektien haasteet ja mahdollisuud...Aamiaisseminaari 3.6.: Julkisen hallinnon projektien haasteet ja mahdollisuud...
Aamiaisseminaari 3.6.: Julkisen hallinnon projektien haasteet ja mahdollisuud...
 
Testaus 2014: Paul Gerrard - The Changing Role of Testers'
Testaus 2014: Paul Gerrard - The Changing Role of Testers'Testaus 2014: Paul Gerrard - The Changing Role of Testers'
Testaus 2014: Paul Gerrard - The Changing Role of Testers'
 
Testaus 2014 -seminaari. Minna Aalto, Knowit, Vuoden Testaaja 2013
Testaus 2014 -seminaari. Minna Aalto, Knowit, Vuoden Testaaja 2013Testaus 2014 -seminaari. Minna Aalto, Knowit, Vuoden Testaaja 2013
Testaus 2014 -seminaari. Minna Aalto, Knowit, Vuoden Testaaja 2013
 
Testaus 2014 -seminaari. Kaisa Tirkkonen, Kela. Case Kela: Monimutkaisten ja ...
Testaus 2014 -seminaari. Kaisa Tirkkonen, Kela. Case Kela: Monimutkaisten ja ...Testaus 2014 -seminaari. Kaisa Tirkkonen, Kela. Case Kela: Monimutkaisten ja ...
Testaus 2014 -seminaari. Kaisa Tirkkonen, Kela. Case Kela: Monimutkaisten ja ...
 
Testaus 2014 -seminaari. Pauli Kauppila, Secrays Oy. Mitä jokaisen testaajan ...
Testaus 2014 -seminaari. Pauli Kauppila, Secrays Oy. Mitä jokaisen testaajan ...Testaus 2014 -seminaari. Pauli Kauppila, Secrays Oy. Mitä jokaisen testaajan ...
Testaus 2014 -seminaari. Pauli Kauppila, Secrays Oy. Mitä jokaisen testaajan ...
 
Testaus 2014 -seminaari. Kari Kakkonen, FiSTB-puheenvuoro.
Testaus 2014 -seminaari. Kari Kakkonen, FiSTB-puheenvuoro.Testaus 2014 -seminaari. Kari Kakkonen, FiSTB-puheenvuoro.
Testaus 2014 -seminaari. Kari Kakkonen, FiSTB-puheenvuoro.
 
Testaus 2014 -seminaari: Arto Kiiskinen, Mirasys Oy. Case Mirasys: Toiminnoil...
Testaus 2014 -seminaari: Arto Kiiskinen, Mirasys Oy. Case Mirasys: Toiminnoil...Testaus 2014 -seminaari: Arto Kiiskinen, Mirasys Oy. Case Mirasys: Toiminnoil...
Testaus 2014 -seminaari: Arto Kiiskinen, Mirasys Oy. Case Mirasys: Toiminnoil...
 
Testaus 2014 -seminaari: Paul Gerrard. The Changing Role of Testers’.
Testaus 2014 -seminaari: Paul Gerrard. The Changing Role of Testers’.Testaus 2014 -seminaari: Paul Gerrard. The Changing Role of Testers’.
Testaus 2014 -seminaari: Paul Gerrard. The Changing Role of Testers’.
 
ICT-palveluprosessit ja toiminnan tehostaminen: Jukka Timonen, "Matkalla koht...
ICT-palveluprosessit ja toiminnan tehostaminen: Jukka Timonen, "Matkalla koht...ICT-palveluprosessit ja toiminnan tehostaminen: Jukka Timonen, "Matkalla koht...
ICT-palveluprosessit ja toiminnan tehostaminen: Jukka Timonen, "Matkalla koht...
 
ICT-palveluprosessit ja toiminnan tehostaminen: Tuukka Heinonen, "Asiakaskoke...
ICT-palveluprosessit ja toiminnan tehostaminen: Tuukka Heinonen, "Asiakaskoke...ICT-palveluprosessit ja toiminnan tehostaminen: Tuukka Heinonen, "Asiakaskoke...
ICT-palveluprosessit ja toiminnan tehostaminen: Tuukka Heinonen, "Asiakaskoke...
 
ICT-palveluprosessit ja toiminnan tehostaminen: Ben Kalland, "Prosessien selk...
ICT-palveluprosessit ja toiminnan tehostaminen: Ben Kalland, "Prosessien selk...ICT-palveluprosessit ja toiminnan tehostaminen: Ben Kalland, "Prosessien selk...
ICT-palveluprosessit ja toiminnan tehostaminen: Ben Kalland, "Prosessien selk...
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Spirit-teknologiapäivät Petri Niemi HTML5 & JavaScript Developereille

  • 1. HTML5 & JavaScript New JavaScript APIs
  • 2. Introduction • Petri Niemi • Specialist, Tieturi Oy • petri.niemi@tieturi.fi • Currently focusing mainly on JavaScript • Naturally also HTML and CSS • Other areas of interest: • Java, C++ • Mobile Copyright © Tieturi Oy 2
  • 3. Web Standards – JavaScript • ECMAScript (ECMA 262) • http://www.ecma-international.org/publications/standards/Ecma-262.htm • ECMAScript 6 currently under development Copyright © Tieturi Oy 3 JavaScript yr. 1995 ECMAScript yr. 1997 ECMA 262 3rd rev. yr. 1999 ECMA 262 5th rev. yr. 2009
  • 4. HTML5 & JavaScript • HTML5 alone does not take you very far • It's mostly about semantics, semantics, semantics, … • …and a little bit about media and graphics • Most of the "cool stuff" is actually implemented using JavaScript • Basics of JavaScript are easy to learn • However, it is actually a very difficult language to master • Most of the new JavaScript APIs are not part of the HTML5 specification • Developed separately Copyright © Tieturi Oy 4
  • 6. Why Is JavaScript Important? • Thick clients • Less traffic between client and server • RIA • Rich internet applications • User experience closer to native applications • SPA • Single page applications • More on this later Copyright © Tieturi Oy 6
  • 7. Selected Examples • Let's take a brief look at some example code • Download code from: http://www.tieturi.fi/media/code_examples.zip • Web Storage • Geolocation API • File API • Web Workers • Web Sockets • Canvas Copyright © Tieturi Oy 7
  • 8. Single Page Applications • Most of the APIs we saw are fairly trivial to use • Anyone can copy-paste and understand the examples • However, more and more web applications are so called "single page applications" (SPA) • Very few lines of static HTML code • Almost all the content is generated in JavaScript dynamically • Try e.g. Hotmail or Gmail with JavaScript turned off in your browser… • This is when your code becomes non-trivial • You will need to modularize your code • And perhaps use a MVC library of some sort Copyright © Tieturi Oy 8
  • 9. Thank You! • Let's end with a tiny teaser… • Can you figure out what happens here? • If it is not clear what the code does, feel free to ask: petri.niemi@tieturi.fi Copyright © Tieturi Oy 9 var foo = "AAA"; function bar() { if (!foo) { // If foo does not exist already var foo = "BBB"; } alert(foo); // What does this print and why? } bar();
  • 10. Tieturi Web Courses • http://www.tieturi.fi/web • JavaScript Programming • Advanced JavaScript Programming • HTML & CSS courses • Mobile web courses • Social media courses • Web analytics – Google analytics • Search engine optimization, web site usability and accessibility Copyright © Tieturi Oy 10