SlideShare uma empresa Scribd logo
1 de 42
Baixar para ler offline
Unobtrusive
JavaScript
Dave
Verwer
   http://daveverwer.com
http://shinydevelopment.com
What
is
UJS?


Did
it
have
full
functionality?   No



Was
it
as
quick?                  No



Was
it
as
pretty?                 No



Was
it
as
usable?                 No



Did
it
basically
work?            Yes
Why
should
you
care?
Accessibility
Mobile
Browsing
SEO
As
of
1st
September
2005,
every
web

       site
built
for
a
dutch
government

    agency
is
required
by
law
to
conform
to:

Valid
HTML
4.01
or
XHTML
1.0

CSS
and
semantic
HTML
and
separation
of
structure
and
presentation

Progressive
enhancement

The
W3C
DOM
(instead
of
the
old
Microsoft
document.all)

Meaningful
values
of
class
and
id

Meaningful
alt
attributes
on
all
images

Scripts
that
work
on
links
should
extend
the
basic
link
functionality
(think
accessible
popups)

If
a
link
makes
no
sense
without
a
script,
it
shouldn't
be
in
the
HTML
(but
be
generated
by
JavaScript)

Use
of
forms
or
scripts
as
the
only
means
of
getting
certain
information
is
prohibited

Removing
the
focus
rectangle
on
links
is
prohibited

Information
offered
in
a
closed
format
(think
Word)
should
also
be
offered
in
an
open
format

The
semantics
of
many
HTML
elements
are
explicitly
defined
Point
3:
Progressive
Enhancement.
Point
7:
Scripts
that
work
on
links

should
extend
the
basic

link
functionality.
Point
8:
If
an
element
makes
no

sense
without
a
script,
it

shouldn't
be
in
the
HTML.
Point
9:
Use
of
forms
or
scripts
as

the
only
means
of
getting

certain
information
is

prohibited.
So
JavaScript
is
evil,

       right?
Good
JavaScript
Bad
JavaScript
The
Dark
Ages
 of
the
Web
Seperating
content

   from
design
<b><font size=quot;5quot;><font color=quot;#0000FFquot;>THIS
SITE IS UNDER CONSTRUCTION!!</font></font></b>



<style>
  p.construction {
    color: #00f;
    font-size: 1.5em;
    font-weight: bold;
  }
</style>

<p class=quot;constructionquot;>
  THIS SITE IS UNDER CONSTRUCTION!!
</p>
Seperating
content

   from
design
  and
behaviour
target=“_blank”
              demo
Prototype
&
LowPro
<a class=“external”>
Event.addBehavior({
  quot;a.external:clickquot;:
    function(event) {
      window.open(this.href, quot;extquot;);
      return false;
    }
});
Setting
a
class
becomes

an
indicator
of
behaviour

       not
just
style
Make
sure
nothing
breaks
Start
minimal
and
show
UI
             or
   Start
big
and
hide
UI
JS
Specific
UI
           demo
UJS
plugin
for
Rails
              demo
Summary
Does
it
really
need
it?
Do
links
still
work?
Does
this
break
the

  back
button?
Don’t
rely
on
alert()

 for
confirmations
Scripts
hidden
away

  when
possible?
Enhancing
Accessibility

  with
JavaScript?!?
Questions?
dave.verwer@shinydevelopment.com

Mais conteúdo relacionado

Destaque

WB7_walrath_michael
WB7_walrath_michaelWB7_walrath_michael
WB7_walrath_michaelguest3c5779
 
Lessons For Service Design from the Packaging of Libido Enhancers in China
Lessons For Service Design from the Packaging of Libido Enhancers in ChinaLessons For Service Design from the Packaging of Libido Enhancers in China
Lessons For Service Design from the Packaging of Libido Enhancers in Chinaguest3c5779
 
New Zealand National Parks
New Zealand National ParksNew Zealand National Parks
New Zealand National Parkspcranston
 
SEO Tips For Bloggers
SEO Tips For BloggersSEO Tips For Bloggers
SEO Tips For Bloggersguest3c5779
 
WB7_scheinman_dan
WB7_scheinman_danWB7_scheinman_dan
WB7_scheinman_danguest3c5779
 
Kamylle's Coastal Landform
Kamylle's Coastal LandformKamylle's Coastal Landform
Kamylle's Coastal Landformpcranston
 

Destaque (7)

WB7_walrath_michael
WB7_walrath_michaelWB7_walrath_michael
WB7_walrath_michael
 
Lessons For Service Design from the Packaging of Libido Enhancers in China
Lessons For Service Design from the Packaging of Libido Enhancers in ChinaLessons For Service Design from the Packaging of Libido Enhancers in China
Lessons For Service Design from the Packaging of Libido Enhancers in China
 
New Zealand National Parks
New Zealand National ParksNew Zealand National Parks
New Zealand National Parks
 
SEO Tips For Bloggers
SEO Tips For BloggersSEO Tips For Bloggers
SEO Tips For Bloggers
 
Organic SEO
Organic SEOOrganic SEO
Organic SEO
 
WB7_scheinman_dan
WB7_scheinman_danWB7_scheinman_dan
WB7_scheinman_dan
 
Kamylle's Coastal Landform
Kamylle's Coastal LandformKamylle's Coastal Landform
Kamylle's Coastal Landform
 

Semelhante a Unobtrusive Javascript

2009 05 01 How To Build A Lean Startup Step By Step
2009 05 01 How To Build A Lean Startup Step By Step2009 05 01 How To Build A Lean Startup Step By Step
2009 05 01 How To Build A Lean Startup Step By StepEric Ries
 
Tesi Laurea Specialistica
Tesi Laurea SpecialisticaTesi Laurea Specialistica
Tesi Laurea Specialisticalando84
 
GIPA
GIPAGIPA
GIPAESUG
 
The Lean Startup at Web 2.0 Expo
The Lean Startup at Web 2.0 ExpoThe Lean Startup at Web 2.0 Expo
The Lean Startup at Web 2.0 ExpoVenture Hacks
 
Scalability without going nuts
Scalability without going nutsScalability without going nuts
Scalability without going nutsJames Cox
 
Yakov Fain - Design Patterns a Deep Dive
Yakov Fain - Design Patterns a Deep DiveYakov Fain - Design Patterns a Deep Dive
Yakov Fain - Design Patterns a Deep Dive360|Conferences
 
Google Docs workshop
Google Docs workshopGoogle Docs workshop
Google Docs workshopKeith Landa
 
Hacking Movable Type Training - Day 1
Hacking Movable Type Training - Day 1Hacking Movable Type Training - Day 1
Hacking Movable Type Training - Day 1Byrne Reese
 
Sapo BUS Hands-On
Sapo BUS Hands-OnSapo BUS Hands-On
Sapo BUS Hands-Oncodebits
 
vdoLife.com
vdoLife.comvdoLife.com
vdoLife.comvdolife
 
Agilebuddy Users Guide
Agilebuddy Users GuideAgilebuddy Users Guide
Agilebuddy Users Guideagilebuddy
 
5 Lack Of Promotion
5 Lack Of Promotion5 Lack Of Promotion
5 Lack Of Promotionneedcreative
 
Product Management In Scrum Kozlov
Product Management In Scrum KozlovProduct Management In Scrum Kozlov
Product Management In Scrum KozlovAlexey Krivitsky
 
The Yahoo Open Stack
The Yahoo Open StackThe Yahoo Open Stack
The Yahoo Open StackMegan Eskey
 
Facebook for Business: a primer.
Facebook for Business: a primer.Facebook for Business: a primer.
Facebook for Business: a primer.Eric Weaver
 

Semelhante a Unobtrusive Javascript (20)

2009 05 01 How To Build A Lean Startup Step By Step
2009 05 01 How To Build A Lean Startup Step By Step2009 05 01 How To Build A Lean Startup Step By Step
2009 05 01 How To Build A Lean Startup Step By Step
 
Java/Swing
Java/SwingJava/Swing
Java/Swing
 
Tesi Laurea Specialistica
Tesi Laurea SpecialisticaTesi Laurea Specialistica
Tesi Laurea Specialistica
 
GIPA
GIPAGIPA
GIPA
 
The Lean Startup at Web 2.0 Expo
The Lean Startup at Web 2.0 ExpoThe Lean Startup at Web 2.0 Expo
The Lean Startup at Web 2.0 Expo
 
Scalability without going nuts
Scalability without going nutsScalability without going nuts
Scalability without going nuts
 
Yakov Fain - Design Patterns a Deep Dive
Yakov Fain - Design Patterns a Deep DiveYakov Fain - Design Patterns a Deep Dive
Yakov Fain - Design Patterns a Deep Dive
 
Google Docs workshop
Google Docs workshopGoogle Docs workshop
Google Docs workshop
 
Hacking Movable Type Training - Day 1
Hacking Movable Type Training - Day 1Hacking Movable Type Training - Day 1
Hacking Movable Type Training - Day 1
 
Sapo BUS Hands-On
Sapo BUS Hands-OnSapo BUS Hands-On
Sapo BUS Hands-On
 
vdoLife.com
vdoLife.comvdoLife.com
vdoLife.com
 
Agilebuddy Users Guide
Agilebuddy Users GuideAgilebuddy Users Guide
Agilebuddy Users Guide
 
Rich Web Clients 20081118
Rich Web Clients 20081118Rich Web Clients 20081118
Rich Web Clients 20081118
 
SEO Packages
SEO PackagesSEO Packages
SEO Packages
 
5 Lack Of Promotion
5 Lack Of Promotion5 Lack Of Promotion
5 Lack Of Promotion
 
Ms Dm Online
Ms Dm OnlineMs Dm Online
Ms Dm Online
 
Product Management In Scrum Kozlov
Product Management In Scrum KozlovProduct Management In Scrum Kozlov
Product Management In Scrum Kozlov
 
The Yahoo Open Stack
The Yahoo Open StackThe Yahoo Open Stack
The Yahoo Open Stack
 
Mobile Marketing Forum - MOOGA
Mobile Marketing Forum - MOOGAMobile Marketing Forum - MOOGA
Mobile Marketing Forum - MOOGA
 
Facebook for Business: a primer.
Facebook for Business: a primer.Facebook for Business: a primer.
Facebook for Business: a primer.
 

Mais de guest3c5779

Social Networking Tools and Librarians
Social Networking Tools and Librarians Social Networking Tools and Librarians
Social Networking Tools and Librarians guest3c5779
 
Vertua CSS Problems
Vertua CSS ProblemsVertua CSS Problems
Vertua CSS Problemsguest3c5779
 
WB7_hogg_leonsis
WB7_hogg_leonsisWB7_hogg_leonsis
WB7_hogg_leonsisguest3c5779
 
WB7_vanjoki_anssi
WB7_vanjoki_anssiWB7_vanjoki_anssi
WB7_vanjoki_anssiguest3c5779
 
Al Gore, Climate Change & Inconvenient Truth
Al Gore, Climate Change & Inconvenient TruthAl Gore, Climate Change & Inconvenient Truth
Al Gore, Climate Change & Inconvenient Truthguest3c5779
 
Federated Media- profile
Federated Media- profile Federated Media- profile
Federated Media- profile guest3c5779
 
Insight & Innovation: Design Research
Insight & Innovation: Design ResearchInsight & Innovation: Design Research
Insight & Innovation: Design Researchguest3c5779
 

Mais de guest3c5779 (9)

Social Networking Tools and Librarians
Social Networking Tools and Librarians Social Networking Tools and Librarians
Social Networking Tools and Librarians
 
Vertua CSS Problems
Vertua CSS ProblemsVertua CSS Problems
Vertua CSS Problems
 
WB7_hogg_leonsis
WB7_hogg_leonsisWB7_hogg_leonsis
WB7_hogg_leonsis
 
WB7_vanjoki_anssi
WB7_vanjoki_anssiWB7_vanjoki_anssi
WB7_vanjoki_anssi
 
Wb7_tancer_bill
Wb7_tancer_billWb7_tancer_bill
Wb7_tancer_bill
 
Al Gore, Climate Change & Inconvenient Truth
Al Gore, Climate Change & Inconvenient TruthAl Gore, Climate Change & Inconvenient Truth
Al Gore, Climate Change & Inconvenient Truth
 
Federated Media- profile
Federated Media- profile Federated Media- profile
Federated Media- profile
 
Insight & Innovation: Design Research
Insight & Innovation: Design ResearchInsight & Innovation: Design Research
Insight & Innovation: Design Research
 
A Path, Adapted
A Path, AdaptedA Path, Adapted
A Path, Adapted
 

Último

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
"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 ...Zilliz
 
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, ...apidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
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 connectorsNanddeep Nachan
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
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 DiscoveryTrustArc
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
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...DianaGray10
 
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...apidays
 
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, Adobeapidays
 
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.pdfOrbitshub
 
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.pdfsudhanshuwaghmare1
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
"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 ...
 
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, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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...
 
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...
 
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
 
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
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Unobtrusive Javascript