SlideShare a Scribd company logo
1 of 31
Why node has a DOM
  Elijah Insua (tmpvar) @ nodeconf 2011
What is a “DOM”?

"The Document Object Model is a platform-
and language-neutral interface that will allow
programs and scripts to dynamically access
and update the content, structure and style
of documents."
- http://www.w3.org/DOM/
wah wah wah
The browser
Markup
Parser
nodejs.org
Why is this valuable?

• No more text manipulation!
• An API for manipulating the DOM tree
• An extremely common paradigm
Server-side
Implementations
Non-Javascript

• PHP (DOMDocument, libxml)
• Ruby (Nokogiri)
• Java (org.w3c.dom)
• Python (xml.dom, xml.minidom)
• c/c++ (libxml, gdome)
XML Processing
The xml/html rift

• no window
• no events
• difficult to bootstrap
• short lived
• no javascript!
markup is good.
Many people know
HTML Represent!
• w3c compliant (xml and html)
• easy to bootstrap
• execute javascript
• act like a headless browser (but better)
 • events / default actions
• long living if necessary
What is jsdom?
The w3c DOM, implemented in javascript
What makes it great?
w3c compliance

• 100% DOM Level 1 (xml/svg/html)
• 100% DOM Level 2 (xml/html/events)
• 15% DOM Level 3 (xml)
• Passed tests: 2451/3069
Easy to bootstrap
      jsdom.env
jsdom.env
Projects using jsdom
   http://search.npmjs.org/#/jsdom
Screen Scraping

• Aprocot
• node-crawler
• wsscraper
• scraper
• node-moviesearch
• spider
• jsgrep
• query
• jjw
Testing
• Zombie
• Tobie
• Ace
• Viewjs
• Jellyfish (admc/jellyfish)
• node-xmpp-bosh
Development
• Assetgraph
• jspp
• inliner
• csskeeper
• packer
• html2jade
Unobtrusive Templating

• pure (pure/pure)
• weld.js (hij1nx/weld)
• minimal.js (ruidlopes/minimal.js)
• graft (Shadowfiend/graft)
Code Reuse

• YUI3
• node-flot
• node-highcharts
• node-readability
• node-rapheal
Shout outs
• Adrian Makowski         • Evan Jones       • Matthew Pflueger   • Vincent Desjardins
• Alexander Flatter       • Felix Gnass      • Michael Fleet      • Vytautas Jakutis
• Andreas Lind Petersen   • Gord Tanner      • Nick Stenning      • Wei Dai
• Aria Stewart            • Jerry Sievert    • Nicolas LaCasse    • Yonathan
• Arrix                   • Jos Shepherd     • Olivier El Mekki   • hij1nx
• Avery Fay               • Joshua Peek      • Phil Dokas         • indexzero
• Damian Janowski         • José Valim       • Rodrigo Flores     • isaacs
• Daniel Cassidy          • Julien Guimont   • Ryan Wolf          • steve
• Daniël van de Burgt     • Karuna Sagar     • Sam Ruby           • ulteriorlife
• Dav Glass               • Karuna Sagar K   • Shimon Doodkin     • waslogic
• Edward O'Connor         • Marak Squires    • Swizec Teller
• Evan Haas               • Matthew King     • Tom Taylor
TODO

• default actions for elements
• speed improvements
• fix memory leak
• better window implementation + testing
Thank you!
https://github.com/tmpvar/jsdom

More Related Content

What's hot

Php johannesburg meetup - talk 2014 - scaling php in the enterprise
Php johannesburg   meetup - talk 2014 - scaling php in the enterprisePhp johannesburg   meetup - talk 2014 - scaling php in the enterprise
Php johannesburg meetup - talk 2014 - scaling php in the enterpriseSarel van der Walt
 
Maximize your Cache for No Cash
Maximize your Cache for No CashMaximize your Cache for No Cash
Maximize your Cache for No CashYorick Phoenix
 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureTroy Miles
 
Node Community Chennai MeetUp1
Node Community Chennai MeetUp1Node Community Chennai MeetUp1
Node Community Chennai MeetUp1akendoffice
 
From Junior Dev to Senior Dev
From Junior Dev to Senior DevFrom Junior Dev to Senior Dev
From Junior Dev to Senior DevJohn Reginald
 
A Journey Begin with Node.js
A Journey Begin with Node.jsA Journey Begin with Node.js
A Journey Begin with Node.jsKhalid Farhan
 
Advanced jQuery (Ajax Exp 2007)
Advanced jQuery (Ajax Exp 2007)Advanced jQuery (Ajax Exp 2007)
Advanced jQuery (Ajax Exp 2007)jeresig
 
Javascript now and in the future
Javascript now and in the futureJavascript now and in the future
Javascript now and in the futureDenis Stoyanov
 
BizTalk Server assessment and architecture review
BizTalk Server assessment and architecture review BizTalk Server assessment and architecture review
BizTalk Server assessment and architecture review BizTalk360
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornMiroslav Resetar
 
Hack Night Retro Futurespective
Hack Night Retro FuturespectiveHack Night Retro Futurespective
Hack Night Retro FuturespectiveJosh Price
 
Localstorage > Cookies
Localstorage > CookiesLocalstorage > Cookies
Localstorage > CookiesShane Riley
 
Databases which, why and usage tips
Databases which, why and usage tipsDatabases which, why and usage tips
Databases which, why and usage tipsavnerner
 
Yahoo! scale Node.js
Yahoo! scale Node.jsYahoo! scale Node.js
Yahoo! scale Node.jsFabian Frank
 
JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)jeresig
 
Service stack all the things
Service stack all the thingsService stack all the things
Service stack all the thingscyberzeddk
 

What's hot (20)

Php johannesburg meetup - talk 2014 - scaling php in the enterprise
Php johannesburg   meetup - talk 2014 - scaling php in the enterprisePhp johannesburg   meetup - talk 2014 - scaling php in the enterprise
Php johannesburg meetup - talk 2014 - scaling php in the enterprise
 
Maximize your Cache for No Cash
Maximize your Cache for No CashMaximize your Cache for No Cash
Maximize your Cache for No Cash
 
SFJS 6-19-2012
SFJS 6-19-2012SFJS 6-19-2012
SFJS 6-19-2012
 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows Azure
 
Node Community Chennai MeetUp1
Node Community Chennai MeetUp1Node Community Chennai MeetUp1
Node Community Chennai MeetUp1
 
From Junior Dev to Senior Dev
From Junior Dev to Senior DevFrom Junior Dev to Senior Dev
From Junior Dev to Senior Dev
 
Hello npm
Hello npmHello npm
Hello npm
 
A Journey Begin with Node.js
A Journey Begin with Node.jsA Journey Begin with Node.js
A Journey Begin with Node.js
 
Advanced jQuery (Ajax Exp 2007)
Advanced jQuery (Ajax Exp 2007)Advanced jQuery (Ajax Exp 2007)
Advanced jQuery (Ajax Exp 2007)
 
Week6
Week6Week6
Week6
 
Art of nodejs
Art of nodejsArt of nodejs
Art of nodejs
 
Javascript now and in the future
Javascript now and in the futureJavascript now and in the future
Javascript now and in the future
 
BizTalk Server assessment and architecture review
BizTalk Server assessment and architecture review BizTalk Server assessment and architecture review
BizTalk Server assessment and architecture review
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript Nashorn
 
Hack Night Retro Futurespective
Hack Night Retro FuturespectiveHack Night Retro Futurespective
Hack Night Retro Futurespective
 
Localstorage > Cookies
Localstorage > CookiesLocalstorage > Cookies
Localstorage > Cookies
 
Databases which, why and usage tips
Databases which, why and usage tipsDatabases which, why and usage tips
Databases which, why and usage tips
 
Yahoo! scale Node.js
Yahoo! scale Node.jsYahoo! scale Node.js
Yahoo! scale Node.js
 
JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)
 
Service stack all the things
Service stack all the thingsService stack all the things
Service stack all the things
 

Viewers also liked

Wall mounts wholesale
Wall mounts wholesaleWall mounts wholesale
Wall mounts wholesaledanish101
 
Diapositivas google docs
Diapositivas google docsDiapositivas google docs
Diapositivas google docsyineth0110
 
Wall Mounts Wholesale
Wall Mounts WholesaleWall Mounts Wholesale
Wall Mounts Wholesaledanish101
 
Wall mounts wholesale
Wall mounts wholesaleWall mounts wholesale
Wall mounts wholesaledanish101
 
USO DE GOOGLE DOCS
USO DE GOOGLE DOCSUSO DE GOOGLE DOCS
USO DE GOOGLE DOCSyineth0110
 
Diapositivas google docs
Diapositivas google docsDiapositivas google docs
Diapositivas google docsyineth0110
 
Презентация PROMT для РИТ
Презентация PROMT для РИТПрезентация PROMT для РИТ
Презентация PROMT для РИТQPsoft
 
Embarazo adolescentes-udh-2015-2
Embarazo adolescentes-udh-2015-2Embarazo adolescentes-udh-2015-2
Embarazo adolescentes-udh-2015-2Neirod Meza
 
Dmitri ivanovich mendeleev
Dmitri ivanovich mendeleevDmitri ivanovich mendeleev
Dmitri ivanovich mendeleevemonroy09
 

Viewers also liked (15)

The jsdom
The jsdomThe jsdom
The jsdom
 
Wall mounts wholesale
Wall mounts wholesaleWall mounts wholesale
Wall mounts wholesale
 
Diapositivas google docs
Diapositivas google docsDiapositivas google docs
Diapositivas google docs
 
Wall Mounts Wholesale
Wall Mounts WholesaleWall Mounts Wholesale
Wall Mounts Wholesale
 
Nicola scaramuzza 269257
Nicola scaramuzza 269257Nicola scaramuzza 269257
Nicola scaramuzza 269257
 
Wall mounts wholesale
Wall mounts wholesaleWall mounts wholesale
Wall mounts wholesale
 
Chapter00000000
Chapter00000000Chapter00000000
Chapter00000000
 
USO DE GOOGLE DOCS
USO DE GOOGLE DOCSUSO DE GOOGLE DOCS
USO DE GOOGLE DOCS
 
Diapositivas google docs
Diapositivas google docsDiapositivas google docs
Diapositivas google docs
 
Genetica I
Genetica IGenetica I
Genetica I
 
Genetica II
Genetica IIGenetica II
Genetica II
 
Презентация PROMT для РИТ
Презентация PROMT для РИТПрезентация PROMT для РИТ
Презентация PROMT для РИТ
 
Arritmias card 2011_1 (1)
Arritmias card 2011_1 (1)Arritmias card 2011_1 (1)
Arritmias card 2011_1 (1)
 
Embarazo adolescentes-udh-2015-2
Embarazo adolescentes-udh-2015-2Embarazo adolescentes-udh-2015-2
Embarazo adolescentes-udh-2015-2
 
Dmitri ivanovich mendeleev
Dmitri ivanovich mendeleevDmitri ivanovich mendeleev
Dmitri ivanovich mendeleev
 

Similar to jsdom @ nodeconf 2011

Offience's Node showcase
Offience's Node showcaseOffience's Node showcase
Offience's Node showcasecloud4le
 
End-to-end W3C APIs - tpac 2012
End-to-end W3C APIs - tpac 2012End-to-end W3C APIs - tpac 2012
End-to-end W3C APIs - tpac 2012Alexandre Morgaut
 
Digging deeper into service stack
Digging deeper into service stackDigging deeper into service stack
Digging deeper into service stackcyberzeddk
 
End to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeEnd to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeAlexandre Morgaut
 
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemDownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemFITC
 
History of Android Security – from linux to jelly bean
History of Android Security – from linux to jelly beanHistory of Android Security – from linux to jelly bean
History of Android Security – from linux to jelly beanJung Pil (J.P.) Choi
 
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemDownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemFITC
 
Troubleshooting Node.js
Troubleshooting Node.jsTroubleshooting Node.js
Troubleshooting Node.jsIgor Soarez
 
Developing a Staff-Only Samvera Application
Developing a Staff-Only Samvera ApplicationDeveloping a Staff-Only Samvera Application
Developing a Staff-Only Samvera ApplicationJames Griffin
 
CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development LetsConnect
 
Charles nutter star techconf 2011 - jvm languages
Charles nutter   star techconf 2011 - jvm languagesCharles nutter   star techconf 2011 - jvm languages
Charles nutter star techconf 2011 - jvm languagesStarTech Conference
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and meJason Casden
 
Node js quick-tour_v2
Node js quick-tour_v2Node js quick-tour_v2
Node js quick-tour_v2http403
 
Node js quick tour v2
Node js quick tour v2Node js quick tour v2
Node js quick tour v2Wyatt Fang
 
Node js quick-tour_v2
Node js quick-tour_v2Node js quick-tour_v2
Node js quick-tour_v2tianyi5212222
 
Git Money
Git MoneyGit Money
Git MoneyTim N
 

Similar to jsdom @ nodeconf 2011 (20)

End-to-end W3C APIs
End-to-end W3C APIsEnd-to-end W3C APIs
End-to-end W3C APIs
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
 
Offience's Node showcase
Offience's Node showcaseOffience's Node showcase
Offience's Node showcase
 
End-to-end W3C APIs - tpac 2012
End-to-end W3C APIs - tpac 2012End-to-end W3C APIs - tpac 2012
End-to-end W3C APIs - tpac 2012
 
Digging deeper into service stack
Digging deeper into service stackDigging deeper into service stack
Digging deeper into service stack
 
End to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeEnd to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) Europe
 
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemDownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
 
Be faster then rabbits
Be faster then rabbitsBe faster then rabbits
Be faster then rabbits
 
History of Android Security – from linux to jelly bean
History of Android Security – from linux to jelly beanHistory of Android Security – from linux to jelly bean
History of Android Security – from linux to jelly bean
 
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemDownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
 
Troubleshooting Node.js
Troubleshooting Node.jsTroubleshooting Node.js
Troubleshooting Node.js
 
CouchDB introduction
CouchDB introductionCouchDB introduction
CouchDB introduction
 
Developing a Staff-Only Samvera Application
Developing a Staff-Only Samvera ApplicationDeveloping a Staff-Only Samvera Application
Developing a Staff-Only Samvera Application
 
CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development
 
Charles nutter star techconf 2011 - jvm languages
Charles nutter   star techconf 2011 - jvm languagesCharles nutter   star techconf 2011 - jvm languages
Charles nutter star techconf 2011 - jvm languages
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
Node js quick-tour_v2
Node js quick-tour_v2Node js quick-tour_v2
Node js quick-tour_v2
 
Node js quick tour v2
Node js quick tour v2Node js quick tour v2
Node js quick tour v2
 
Node js quick-tour_v2
Node js quick-tour_v2Node js quick-tour_v2
Node js quick-tour_v2
 
Git Money
Git MoneyGit Money
Git Money
 

Recently uploaded

Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Recently uploaded (20)

Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

jsdom @ nodeconf 2011

Editor's Notes

  1. Notes\n
  2. name, rank, serial number\npurpose of talking:\n - explain my insanity and transfer knowledge in case of an encounter with a bus\n\nin order to understand why node has a dom, we must first know what a dom is.\n
  3. The Document Object Model (or DOM) is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents.\n\nwell, thats nice. but I’m still confused.\n
  4. When I think of the DOM, I immediately think of the browser.\n
  5. this is the result of rendering this page’s html + styling\n\nThe dom lives above the parser and below the renderer/reflow engine. \n\nmarkup->parser->dom->styling->reflow->renderer->image\n\nFor instance...\n
  6. this is a snippet taken from nodejs.org (it is the navigation on the left side of the page).\n\nWhen the browser retrieves the html it asks the parser to create a dom.\n
  7. the parser is a sort of assembly line, taking raw material (markup) and turning it into usable components, in this case its a tree of dom nodes.\n\nthese are f22’s\n
  8. this is a htmlgraph representation of the nodejs homepage\n\ncircles represent dom nodes, color indicates type\n\nthe markup from the previous slide is shown with an orange arrow to where it lives in the DOM tree\n\nBelow the body\nabove the li’s which contain anchors\n
  9. - you can treat documents as a tree\n - manipulation is easier because we now have the tools to locate and manipulate nodes/branches/content\n - mostly consistent set of tools available everywhere you find a dom implementation\n
  10. now, I’d like to dive a bit into what other server-sided platforms are doing with their doms\n
  11. every server-side language has atleast one dom implementation\nbut there are fundamental problems with these:\n\nthe problem with each of these is there is no way to execute javascript in the context of the dom\n\nso you might be asking what are these libraries used for?\n
  12. These implementations are used primarily for XML manipulation including:\nXML-RPC, SOAP, XPATH, XSLT\n
  13. but there is a rift here. you can process html, but you don’t get any of the benefits.\n\n - no window\n - no events (in most cases)\n - default behavior of elements (links)\n - meant to be short lived (mostly php+python)\n - difficult to bootstrap\n - no javascript\n
  14. the thing is, markup is good.\n\nhtml is by far the most known language\n
  15. many people, including non-technical types, know what this does\n
  16. how do we fix this problem?\n\n- we MUST be compliant with the w3c spec (no surprises)\n- many platforms make bootstrapping a DOM a gigantic pain. We must solve this.\n- they also don’t execute javascript which is why many crawlers do not evaluate ajax’d content\n- in the ideal implementation, the dom should be scriptable like any browser. But since node is written in js we should be able to script the dom from both sides (node and inside the window context)\n- because node is the server, we can run a dom for as long as we need. this makes it useful for a whole slew of things that most of the other platforms can’t even consider\n\nthese are some of the things that were missing and this void prompted me to start jsdom\n
  17. now that we know what a dom is, and the problems with other implementations\n\nwhat is this jsdom thing?\n
  18. it is the components between the parser and the renderer\n\nParsers\nsax - (xml only) strict + fast\nhtmlparser - less strict, slower\nhtml5 - lenient (useful for the wild internet)\n
  19. \n
  20. jsdom isn’t done until all of the tests pass, and it’s fast.\n\neach level is an extension of the previous, defining new functionality or updating existing\n\nexample: level1 core -> level2 xml & html\n
  21. jsdom.env creates an browser-like environment\n
  22. NOTE: pages run with jsdom.env will not process script tags\n\nit works!\n
  23. \n
  24. lots of scrapers, biggest category\n
  25. testing framework / smoke testing\n
  26. optimization / \n
  27. \n
  28. if you haven’t you must see Dav Glass’ yui3 on node project\n\ngraphing, charting, reading\n
  29. whether its a 1 line patch or rewriting the entire test infrastructure, without these 46 folks, jsdom wouldn’t even be worth using.\n
  30. - currently clicking on a link has no default action\n - jsdom resorts to a fairly slow mechanism to handle live node lists\n - we have memory leaks in the script tag executor\n - and we need to turn the window stubs into functional code and properly test it (act more like a browser)\n
  31. \n