SlideShare uma empresa Scribd logo
1 de 54
GG Team Workshop GAMES & APPS IN JAVASCRIPT 2011 by Michal Budzynski
GG Team Workshop 2011 by Michal Budzynski Development of a game: ,[object Object]
Prototype
Alpha
Beta
RC
Gold Master
Localization
GG Team Workshop 2011 by Michal Budzynski
GG Team Workshop 2011 by Michal Budzynski DOM manipulation – direct appending ,[object Object]
Assembling them into DOM tree
Connecting created tree into main DOM structure
GG Team Workshop 2011 by Michal Budzynski DOM manipulation – direct appending
GG Team Workshop 2011 by Michal Budzynski DOM manipulation – document fragment ,[object Object]
Append all nodes & elements to it
Connecting documentFragment to the main DOM structure
GG Team Workshop DOM manipulation – document fragment
GG Team Workshop 2011 by Michal Budzynski Result:
GG Team Workshop 2011 by Michal Budzynski DOM manipulation – concatenation + innerHTML ,[object Object]
Put it directly into innerHTML of the parent node
Use methods like .childNodes() or .getElementsByTagName()
GG Team Workshop DOM manipulation – document fragment 2011 by Michal Budzynski
GG Team Workshop For single string using array buffer instead of += makes perfect sense – huge performance difference in older browsers and comparable results in newer ones. Doing join() on multiple arrays for concatenation is not a good idea. It takes way more time than simple +! http://kasia.drzyzga.pl/2011/04/never-concatenate-strings-with-really/ 2011 by Michal Budzynski
GG Team Workshop 2011 by Michal Budzynski
GG Team Workshop 2011 by Michal Budzynski
GG Team Workshop 2011 by Michal Budzynski Canvas API – 2d context ,[object Object]
.fillStyle = “”
.fillRect(a, b, c, d)
.moveTo(x, y)
.lineTo(x, y)
.bezierCurveTo()
.arc(x, y, radius, startAngle, endAngle, anticlockwise)
.stroke()
.fill()
GG Team Workshop 2011 by Michal Budzynski Canvas ,[object Object]
ctx.clearRect()
canvas.toDataURL();
GG Team Workshop 2011 by Michal Budzynski checker.draw('#f00') Result: checker.draw('#00f') Result:
GG Team Workshop 2011 by Michal Budzynski Result:
GG Team Workshop 2011 by Michal Budzynski Global variables and 'Namespace Pattern' ,[object Object]
More specific position of variable – better performance
GG Team Workshop 2011 by Michal Budzynski Global variables and 'Namespace Pattern' ,[object Object]
More specific position of variable – better performance
GG Team Workshop 2011 by Michal Budzynski Result:
GG Team Workshop 2011 by Michal Budzynski Events ,[object Object]
Events by attributes (DOM lvl 1)
Event Listeners (DOM lvl 2)
GG Team Workshop 2011 by Michal Budzynski Events ,[object Object]
Events by attributes (DOM lvl 1)
Event Listeners (DOM lvl 2)
Removing event-handlers
GG Team Workshop 2011 by Michal Budzynski Removing event handlers
GG Team Workshop 2011 by Michal Budzynski Removing event handlers
GG Team Workshop 2011 by Michal Budzynski Removing event handlers

Mais conteúdo relacionado

Mais procurados

Untangling the web9
Untangling the web9Untangling the web9
Untangling the web9Derek Jacoby
 
HTML GL - возьмите столько FPS, сколько вам нужно!
HTML GL - возьмите столько FPS, сколько вам нужно!HTML GL - возьмите столько FPS, сколько вам нужно!
HTML GL - возьмите столько FPS, сколько вам нужно!CodeFest
 
Angular Illumination
Angular IlluminationAngular Illumination
Angular IlluminationBryan Arbelo
 
Building your actions for Google Assistant
Building your actions for Google AssistantBuilding your actions for Google Assistant
Building your actions for Google AssistantAhmed Abu Eldahab
 
Installing Games Sucks, Learn WebGL
Installing Games Sucks, Learn WebGLInstalling Games Sucks, Learn WebGL
Installing Games Sucks, Learn WebGLCorey Clark, Ph.D.
 
DevChatt: The Wonderful World Of Html5
DevChatt: The Wonderful World Of Html5DevChatt: The Wonderful World Of Html5
DevChatt: The Wonderful World Of Html5Cameron Kilgore
 

Mais procurados (8)

Untangling7
Untangling7Untangling7
Untangling7
 
Goobi overview
Goobi overviewGoobi overview
Goobi overview
 
Untangling the web9
Untangling the web9Untangling the web9
Untangling the web9
 
HTML GL - возьмите столько FPS, сколько вам нужно!
HTML GL - возьмите столько FPS, сколько вам нужно!HTML GL - возьмите столько FPS, сколько вам нужно!
HTML GL - возьмите столько FPS, сколько вам нужно!
 
Angular Illumination
Angular IlluminationAngular Illumination
Angular Illumination
 
Building your actions for Google Assistant
Building your actions for Google AssistantBuilding your actions for Google Assistant
Building your actions for Google Assistant
 
Installing Games Sucks, Learn WebGL
Installing Games Sucks, Learn WebGLInstalling Games Sucks, Learn WebGL
Installing Games Sucks, Learn WebGL
 
DevChatt: The Wonderful World Of Html5
DevChatt: The Wonderful World Of Html5DevChatt: The Wonderful World Of Html5
DevChatt: The Wonderful World Of Html5
 

Semelhante a JavaScript Games & Apps DOM Manipulation Events Communication

TechEvent BASTA von WPF nach Angular in 60 Minuten
TechEvent BASTA von WPF nach Angular in 60 MinutenTechEvent BASTA von WPF nach Angular in 60 Minuten
TechEvent BASTA von WPF nach Angular in 60 MinutenTrivadis
 
German introduction to sp framework
German   introduction to sp frameworkGerman   introduction to sp framework
German introduction to sp frameworkBob German
 
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overviewCiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overviewCiklum Ukraine
 
TechEvent Advanced Service Worker / PWA with Google Workbox
TechEvent Advanced Service Worker / PWA with Google WorkboxTechEvent Advanced Service Worker / PWA with Google Workbox
TechEvent Advanced Service Worker / PWA with Google WorkboxTrivadis
 
Pro Agile .NET Development Solution Overview
Pro Agile .NET Development Solution OverviewPro Agile .NET Development Solution Overview
Pro Agile .NET Development Solution OverviewJosh Gough
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.JooinK
 
DIY- computer vision with GWT
DIY- computer vision with GWTDIY- computer vision with GWT
DIY- computer vision with GWTFrancesca Tosi
 
E-magazineDecember_sample
E-magazineDecember_sampleE-magazineDecember_sample
E-magazineDecember_sampletutorialsruby
 
E-magazineDecember_sample
E-magazineDecember_sampleE-magazineDecember_sample
E-magazineDecember_sampletutorialsruby
 
Getting more out of Matplotlib with GR
Getting more out of Matplotlib with GRGetting more out of Matplotlib with GR
Getting more out of Matplotlib with GRJosef Heinen
 
Mobile Java with GWT: Still "Write Once, Run Everywhere"
Mobile Java with GWT: Still "Write Once, Run Everywhere"Mobile Java with GWT: Still "Write Once, Run Everywhere"
Mobile Java with GWT: Still "Write Once, Run Everywhere"Alex Theedom
 
Using WordPress as a Headless CMS with WPGraphQL
Using WordPress as a Headless CMS with WPGraphQLUsing WordPress as a Headless CMS with WPGraphQL
Using WordPress as a Headless CMS with WPGraphQLAri-Pekka Koponen
 
Untangle Your Front End Development with Visual Studio 2015
Untangle Your Front End Development with Visual Studio 2015Untangle Your Front End Development with Visual Studio 2015
Untangle Your Front End Development with Visual Studio 2015Scott Heckel
 
Magento 2 Front-end performance tips & tricks - Meet Magento Romania 2017
Magento 2 Front-end performance tips & tricks - Meet Magento Romania 2017Magento 2 Front-end performance tips & tricks - Meet Magento Romania 2017
Magento 2 Front-end performance tips & tricks - Meet Magento Romania 2017Bartek Igielski
 
Reactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSReactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSMartin Hochel
 
Look Inside Your OSGi Bundles and Build them Block by Block - FA Kramer
Look Inside Your OSGi Bundles and Build them Block by Block - FA KramerLook Inside Your OSGi Bundles and Build them Block by Block - FA Kramer
Look Inside Your OSGi Bundles and Build them Block by Block - FA Kramermfrancis
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkitPaul Jensen
 
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...Stefan Richter
 

Semelhante a JavaScript Games & Apps DOM Manipulation Events Communication (20)

TechEvent BASTA von WPF nach Angular in 60 Minuten
TechEvent BASTA von WPF nach Angular in 60 MinutenTechEvent BASTA von WPF nach Angular in 60 Minuten
TechEvent BASTA von WPF nach Angular in 60 Minuten
 
German introduction to sp framework
German   introduction to sp frameworkGerman   introduction to sp framework
German introduction to sp framework
 
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overviewCiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
 
TechEvent Advanced Service Worker / PWA with Google Workbox
TechEvent Advanced Service Worker / PWA with Google WorkboxTechEvent Advanced Service Worker / PWA with Google Workbox
TechEvent Advanced Service Worker / PWA with Google Workbox
 
Pro Agile .NET Development Solution Overview
Pro Agile .NET Development Solution OverviewPro Agile .NET Development Solution Overview
Pro Agile .NET Development Solution Overview
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
 
DIY- computer vision with GWT
DIY- computer vision with GWTDIY- computer vision with GWT
DIY- computer vision with GWT
 
E-magazineDecember_sample
E-magazineDecember_sampleE-magazineDecember_sample
E-magazineDecember_sample
 
E-magazineDecember_sample
E-magazineDecember_sampleE-magazineDecember_sample
E-magazineDecember_sample
 
Getting more out of Matplotlib with GR
Getting more out of Matplotlib with GRGetting more out of Matplotlib with GR
Getting more out of Matplotlib with GR
 
Mobile Java with GWT: Still "Write Once, Run Everywhere"
Mobile Java with GWT: Still "Write Once, Run Everywhere"Mobile Java with GWT: Still "Write Once, Run Everywhere"
Mobile Java with GWT: Still "Write Once, Run Everywhere"
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Using WordPress as a Headless CMS with WPGraphQL
Using WordPress as a Headless CMS with WPGraphQLUsing WordPress as a Headless CMS with WPGraphQL
Using WordPress as a Headless CMS with WPGraphQL
 
Untangle Your Front End Development with Visual Studio 2015
Untangle Your Front End Development with Visual Studio 2015Untangle Your Front End Development with Visual Studio 2015
Untangle Your Front End Development with Visual Studio 2015
 
Magento 2 Front-end performance tips & tricks - Meet Magento Romania 2017
Magento 2 Front-end performance tips & tricks - Meet Magento Romania 2017Magento 2 Front-end performance tips & tricks - Meet Magento Romania 2017
Magento 2 Front-end performance tips & tricks - Meet Magento Romania 2017
 
Reactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSReactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJS
 
Look Inside Your OSGi Bundles and Build them Block by Block - FA Kramer
Look Inside Your OSGi Bundles and Build them Block by Block - FA KramerLook Inside Your OSGi Bundles and Build them Block by Block - FA Kramer
Look Inside Your OSGi Bundles and Build them Block by Block - FA Kramer
 
Jenkins Job DSL plugin
Jenkins Job DSL plugin Jenkins Job DSL plugin
Jenkins Job DSL plugin
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
 

Último

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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?Igalia
 
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 2024Rafal Los
 
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...Martijn de Jong
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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 WorkerThousandEyes
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Último (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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?
 
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
 
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...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

JavaScript Games & Apps DOM Manipulation Events Communication