SlideShare una empresa de Scribd logo
1 de 13
JavaScript (ii)

 Prof. Alvarado
MDST 3703/7703
4 October 2012
Business

• Midterms to be on Collab early this evening
  – They will be due next Thursday at Midnight
• No readings over Fall Pause
  – But you may want to brush up on your HTML, CSS,
    and JavaScript
  – See the Resources Page on the course blog
Business

• Can you access your Home Directory on the web?
   – Test by going to the URL in your browser, not the file on
     your computer.
• Does your page point to the right resources?
   – The JavaScript and CSS elements must point to the right
     path
   – You can copy these resources into your directory if you
     want
• Does your jQuery code reference the right names?
   – Remember, the selectors must point to names that exist in
     the DOM
Review

• JavaScript is a programming language that is
  built into the web browser
   – Source code
   – Algorithmic
   – Input/output of data
• Variants exist
   – ActionScript (Flash)
   – Jscript (Internet Explorer)
   – ECMAScript (standard)
• jQuery is a library of JavaScript functions that
  makes hard things easier
Comments
Does JavaScript allow us to overcome mistakes in the
initial coding by setting the behavior to take care of
such problems? For example, if we have hundreds of
pages of marked-up content, it is quite possible that a
mistake will lead to a missing chapter number
somewhere. We can use JavaScript to make sure that
in such cases it should display “missing chapter
number” so that readers (including authors) are aware
of it. Therefore, is JavaScript ever used as a fail-safe, or
are problems usually taken care of in previous layers of
web design?

   Yes, in a sense. You can can JS for “web scraping”
 and other kind of post-processing where you don’t
  control the source. But usually you want to fix the
                                    source if you can.
Is there an easy way of proofreading markup language
for errors, or does the creator have to read through
every character in the file any time there is a problem?




            Yes – it’s called ‘debugging,’ and
            there are tools to help with that.
            There are debugging tools built
            into your browser.
The reason I am almost laughing about it now is that it’s
ridiculous to me that even when one seems to follow all
the “rules” of coding or using a computer, sometimes
inexplicable things come up that completely disrupt or
negate all your work. As much as we know about and
understand computers, we don’t always have rhyme or
reason for why computers do what they do.



Three engineers were aboard a stopped train …
Will there ever be an easier way to create digital
documents?


           Yes: blogs and wikis, for example,
           make page creation easy.

           But if you want to process lots of
           source data, or create HTML pages on-
           the-fly, you need to know the code.
I find that as we delve into more complex programming
languages, I am having a harder time grasping the
necessary steps. Should this be the case?



         YES.
Would it not be easier to control the structure, style, and
behavior of a web page with one markup language, in
one file?

What was the motivation for having all of these web
languages interact with each other?

It would be nice, but this is kind of like wishing
humans had one language. The web is a vast,
evolving system, and these languages were created
at different times to solve different problems.

One reason they are separated is because different
              people do the coding for each layer.
I don’t understand how we can insert a new language
into HTML using a new tag in the header, without it
being a part of the HTML?

HTML is a source code that can hold lots of
different content, including programming code.
But the code and the content are treated
differently by the browser in producing the
resulting page that you see.
Exercises

• Overview of JavaScipt
  – Follow along
  – Either copy my source code or write it as I
    demonstrates
• A simple footnote system

Más contenido relacionado

La actualidad más candente

Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introductionshaojung
 
javscript
javscriptjavscript
javscriptrcc1964
 
NJECC iWEB Tutorial DAndrea
NJECC iWEB Tutorial DAndreaNJECC iWEB Tutorial DAndrea
NJECC iWEB Tutorial DAndreaD'Andrea
 
Setting up your development environment
Setting up your development environmentSetting up your development environment
Setting up your development environmentNicole Ryan
 
handout_further_resources
handout_further_resourceshandout_further_resources
handout_further_resourcestutorialsruby
 
Fast Web Applications with Go
Fast Web Applications with Go Fast Web Applications with Go
Fast Web Applications with Go Eylem Ozekin
 
The beauty behind ebooks: CSS - ebookcraft 2015 - Iris Febres
The beauty behind ebooks: CSS - ebookcraft 2015 - Iris FebresThe beauty behind ebooks: CSS - ebookcraft 2015 - Iris Febres
The beauty behind ebooks: CSS - ebookcraft 2015 - Iris FebresBookNet Canada
 
CV-EntryLevelFrontEnd
CV-EntryLevelFrontEndCV-EntryLevelFrontEnd
CV-EntryLevelFrontEndCass Rodman
 
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...Matt Weaver
 
Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Matthew Mobbs
 
Behat & Automated Testing (Lightning Talk)
Behat & Automated Testing (Lightning Talk)Behat & Automated Testing (Lightning Talk)
Behat & Automated Testing (Lightning Talk)Rex Lorenzo
 
Ajax search function
Ajax search functionAjax search function
Ajax search functionNorifumi Irie
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8Derek Jacoby
 
Ebook Accessibility: Why, How, and What For - ebookcraft 2016 - Laura Brady
Ebook Accessibility: Why, How, and What For - ebookcraft 2016 - Laura BradyEbook Accessibility: Why, How, and What For - ebookcraft 2016 - Laura Brady
Ebook Accessibility: Why, How, and What For - ebookcraft 2016 - Laura BradyBookNet Canada
 
Firefox OS Application Development
Firefox OS Application DevelopmentFirefox OS Application Development
Firefox OS Application DevelopmentAnam Ahmed
 
Modern JavaScript Talk
Modern JavaScript TalkModern JavaScript Talk
Modern JavaScript TalkDerek Binkley
 

La actualidad más candente (19)

Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introduction
 
javscript
javscriptjavscript
javscript
 
NJECC iWEB Tutorial DAndrea
NJECC iWEB Tutorial DAndreaNJECC iWEB Tutorial DAndrea
NJECC iWEB Tutorial DAndrea
 
Setting up your development environment
Setting up your development environmentSetting up your development environment
Setting up your development environment
 
handout_further_resources
handout_further_resourceshandout_further_resources
handout_further_resources
 
Fast Web Applications with Go
Fast Web Applications with Go Fast Web Applications with Go
Fast Web Applications with Go
 
The beauty behind ebooks: CSS - ebookcraft 2015 - Iris Febres
The beauty behind ebooks: CSS - ebookcraft 2015 - Iris FebresThe beauty behind ebooks: CSS - ebookcraft 2015 - Iris Febres
The beauty behind ebooks: CSS - ebookcraft 2015 - Iris Febres
 
CV-EntryLevelFrontEnd
CV-EntryLevelFrontEndCV-EntryLevelFrontEnd
CV-EntryLevelFrontEnd
 
Web application intro
Web application introWeb application intro
Web application intro
 
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...
Ebooks without Vendors: Using Open Source Software to Create and Share Meanin...
 
Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010
 
Behat & Automated Testing (Lightning Talk)
Behat & Automated Testing (Lightning Talk)Behat & Automated Testing (Lightning Talk)
Behat & Automated Testing (Lightning Talk)
 
Artistic Web Applications - Week3 - Part 1
Artistic Web Applications - Week3 - Part 1Artistic Web Applications - Week3 - Part 1
Artistic Web Applications - Week3 - Part 1
 
Ajax search function
Ajax search functionAjax search function
Ajax search function
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8
 
Ebook Accessibility: Why, How, and What For - ebookcraft 2016 - Laura Brady
Ebook Accessibility: Why, How, and What For - ebookcraft 2016 - Laura BradyEbook Accessibility: Why, How, and What For - ebookcraft 2016 - Laura Brady
Ebook Accessibility: Why, How, and What For - ebookcraft 2016 - Laura Brady
 
Identity toolkit
Identity toolkitIdentity toolkit
Identity toolkit
 
Firefox OS Application Development
Firefox OS Application DevelopmentFirefox OS Application Development
Firefox OS Application Development
 
Modern JavaScript Talk
Modern JavaScript TalkModern JavaScript Talk
Modern JavaScript Talk
 

Destacado

Mdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databasesMdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databasesRafael Alvarado
 
Mdst3703 projects-2012-10-11
Mdst3703 projects-2012-10-11Mdst3703 projects-2012-10-11
Mdst3703 projects-2012-10-11Rafael Alvarado
 
Thatcamp2011 intro to-cm_ses
Thatcamp2011 intro to-cm_sesThatcamp2011 intro to-cm_ses
Thatcamp2011 intro to-cm_sesRafael Alvarado
 
Mdst 3559-01-25-data-journalism
Mdst 3559-01-25-data-journalismMdst 3559-01-25-data-journalism
Mdst 3559-01-25-data-journalismRafael Alvarado
 
Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3Rafael Alvarado
 
Mdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxisMdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxisRafael Alvarado
 
MDST 3703 F10 Seminar 11
MDST 3703 F10 Seminar 11MDST 3703 F10 Seminar 11
MDST 3703 F10 Seminar 11Rafael Alvarado
 
UVA MDST 3703 Marking-Up a Text 2012-09-13
UVA MDST 3703 Marking-Up a Text 2012-09-13UVA MDST 3703 Marking-Up a Text 2012-09-13
UVA MDST 3703 Marking-Up a Text 2012-09-13Rafael Alvarado
 

Destacado (9)

MDST 3703 F10 Seminar 6
MDST 3703 F10 Seminar 6MDST 3703 F10 Seminar 6
MDST 3703 F10 Seminar 6
 
Mdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databasesMdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databases
 
Mdst3703 projects-2012-10-11
Mdst3703 projects-2012-10-11Mdst3703 projects-2012-10-11
Mdst3703 projects-2012-10-11
 
Thatcamp2011 intro to-cm_ses
Thatcamp2011 intro to-cm_sesThatcamp2011 intro to-cm_ses
Thatcamp2011 intro to-cm_ses
 
Mdst 3559-01-25-data-journalism
Mdst 3559-01-25-data-journalismMdst 3559-01-25-data-journalism
Mdst 3559-01-25-data-journalism
 
Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3
 
Mdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxisMdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxis
 
MDST 3703 F10 Seminar 11
MDST 3703 F10 Seminar 11MDST 3703 F10 Seminar 11
MDST 3703 F10 Seminar 11
 
UVA MDST 3703 Marking-Up a Text 2012-09-13
UVA MDST 3703 Marking-Up a Text 2012-09-13UVA MDST 3703 Marking-Up a Text 2012-09-13
UVA MDST 3703 Marking-Up a Text 2012-09-13
 

Similar a UVA MDST 3703 JavaScript (ii) 2012-10-04

UVA MDST 3703 JavaScript 2012-09-27
UVA MDST 3703 JavaScript 2012-09-27UVA MDST 3703 JavaScript 2012-09-27
UVA MDST 3703 JavaScript 2012-09-27Rafael Alvarado
 
Publishing strategies for API documentation
Publishing strategies for API documentationPublishing strategies for API documentation
Publishing strategies for API documentationTom Johnson
 
Going native with html5 web components
Going native with html5 web componentsGoing native with html5 web components
Going native with html5 web componentsJames York
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
7 crazy tips that will help you
7 crazy tips that will help you7 crazy tips that will help you
7 crazy tips that will help youJessica Wilson
 
Monorepo: React + React Native. React Alicante
Monorepo:  React + React Native. React Alicante Monorepo:  React + React Native. React Alicante
Monorepo: React + React Native. React Alicante Eugene Zharkov
 
Instagram filters (8 24)
Instagram filters (8 24)Instagram filters (8 24)
Instagram filters (8 24)Ivy Rueb
 
Class 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurshipClass 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurshipallanchao
 
Apache Con 2008 Top 10 Mistakes
Apache Con 2008 Top 10 MistakesApache Con 2008 Top 10 Mistakes
Apache Con 2008 Top 10 MistakesJohn Coggeshall
 
Learning subjects for junior level developers at Skitsanos Inc.
Learning subjects for junior level developers at Skitsanos Inc.Learning subjects for junior level developers at Skitsanos Inc.
Learning subjects for junior level developers at Skitsanos Inc.Evgenios Skitsanos
 
The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018Amit Ashwini
 
Top 10 Scalability Mistakes
Top 10 Scalability MistakesTop 10 Scalability Mistakes
Top 10 Scalability MistakesJohn Coggeshall
 
Douglas - Real JavaScript
Douglas - Real JavaScriptDouglas - Real JavaScript
Douglas - Real JavaScriptd0nn9n
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
 
C# and java comparing programming languages
C# and java  comparing programming languagesC# and java  comparing programming languages
C# and java comparing programming languagesShishir Roy
 

Similar a UVA MDST 3703 JavaScript (ii) 2012-10-04 (20)

UVA MDST 3703 JavaScript 2012-09-27
UVA MDST 3703 JavaScript 2012-09-27UVA MDST 3703 JavaScript 2012-09-27
UVA MDST 3703 JavaScript 2012-09-27
 
Publishing strategies for API documentation
Publishing strategies for API documentationPublishing strategies for API documentation
Publishing strategies for API documentation
 
Going native with html5 web components
Going native with html5 web componentsGoing native with html5 web components
Going native with html5 web components
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
7 crazy tips that will help you
7 crazy tips that will help you7 crazy tips that will help you
7 crazy tips that will help you
 
Adv html
Adv htmlAdv html
Adv html
 
Adv html
Adv htmlAdv html
Adv html
 
Monorepo: React + React Native. React Alicante
Monorepo:  React + React Native. React Alicante Monorepo:  React + React Native. React Alicante
Monorepo: React + React Native. React Alicante
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
Instagram filters (8 24)
Instagram filters (8 24)Instagram filters (8 24)
Instagram filters (8 24)
 
Html
HtmlHtml
Html
 
Class 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurshipClass 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurship
 
Apache Con 2008 Top 10 Mistakes
Apache Con 2008 Top 10 MistakesApache Con 2008 Top 10 Mistakes
Apache Con 2008 Top 10 Mistakes
 
Learning subjects for junior level developers at Skitsanos Inc.
Learning subjects for junior level developers at Skitsanos Inc.Learning subjects for junior level developers at Skitsanos Inc.
Learning subjects for junior level developers at Skitsanos Inc.
 
The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018
 
Top 10 Scalability Mistakes
Top 10 Scalability MistakesTop 10 Scalability Mistakes
Top 10 Scalability Mistakes
 
Douglas - Real JavaScript
Douglas - Real JavaScriptDouglas - Real JavaScript
Douglas - Real JavaScript
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 
C# and java comparing programming languages
C# and java  comparing programming languagesC# and java  comparing programming languages
C# and java comparing programming languages
 

Más de Rafael Alvarado

Mdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collectionsMdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collectionsRafael Alvarado
 
Mdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-historyMdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-historyRafael Alvarado
 
Mdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertextMdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertextRafael Alvarado
 
Mdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-htmlMdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-htmlRafael Alvarado
 
Mdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-modelsMdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-modelsRafael Alvarado
 
Mdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signalsMdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signalsRafael Alvarado
 
Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2Rafael Alvarado
 
Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2Rafael Alvarado
 
Mdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-worldMdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-worldRafael Alvarado
 
UVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 IntroductionUVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 IntroductionRafael Alvarado
 
MDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to VisualizationMDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to VisualizationRafael Alvarado
 
Mdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genreMdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genreRafael Alvarado
 
Mdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-dataMdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-dataRafael Alvarado
 
Mdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-dataMdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-dataRafael Alvarado
 
Mdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-languageMdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-languageRafael Alvarado
 
Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2Rafael Alvarado
 
Mdst3705 2012-01-15-introduction
Mdst3705 2012-01-15-introductionMdst3705 2012-01-15-introduction
Mdst3705 2012-01-15-introductionRafael Alvarado
 
Mdst3703 graph-theory-11-20-2012
Mdst3703 graph-theory-11-20-2012Mdst3703 graph-theory-11-20-2012
Mdst3703 graph-theory-11-20-2012Rafael Alvarado
 
Mdst3703 maps-and-timelines-2012-11-13
Mdst3703 maps-and-timelines-2012-11-13Mdst3703 maps-and-timelines-2012-11-13
Mdst3703 maps-and-timelines-2012-11-13Rafael Alvarado
 

Más de Rafael Alvarado (20)

Mdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collectionsMdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collections
 
Mdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-historyMdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-history
 
Mdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertextMdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertext
 
Presentation1
Presentation1Presentation1
Presentation1
 
Mdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-htmlMdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-html
 
Mdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-modelsMdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-models
 
Mdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signalsMdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signals
 
Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2
 
Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2
 
Mdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-worldMdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-world
 
UVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 IntroductionUVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 Introduction
 
MDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to VisualizationMDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to Visualization
 
Mdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genreMdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genre
 
Mdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-dataMdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-data
 
Mdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-dataMdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-data
 
Mdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-languageMdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-language
 
Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2
 
Mdst3705 2012-01-15-introduction
Mdst3705 2012-01-15-introductionMdst3705 2012-01-15-introduction
Mdst3705 2012-01-15-introduction
 
Mdst3703 graph-theory-11-20-2012
Mdst3703 graph-theory-11-20-2012Mdst3703 graph-theory-11-20-2012
Mdst3703 graph-theory-11-20-2012
 
Mdst3703 maps-and-timelines-2012-11-13
Mdst3703 maps-and-timelines-2012-11-13Mdst3703 maps-and-timelines-2012-11-13
Mdst3703 maps-and-timelines-2012-11-13
 

UVA MDST 3703 JavaScript (ii) 2012-10-04

  • 1. JavaScript (ii) Prof. Alvarado MDST 3703/7703 4 October 2012
  • 2. Business • Midterms to be on Collab early this evening – They will be due next Thursday at Midnight • No readings over Fall Pause – But you may want to brush up on your HTML, CSS, and JavaScript – See the Resources Page on the course blog
  • 3. Business • Can you access your Home Directory on the web? – Test by going to the URL in your browser, not the file on your computer. • Does your page point to the right resources? – The JavaScript and CSS elements must point to the right path – You can copy these resources into your directory if you want • Does your jQuery code reference the right names? – Remember, the selectors must point to names that exist in the DOM
  • 4. Review • JavaScript is a programming language that is built into the web browser – Source code – Algorithmic – Input/output of data • Variants exist – ActionScript (Flash) – Jscript (Internet Explorer) – ECMAScript (standard) • jQuery is a library of JavaScript functions that makes hard things easier
  • 6. Does JavaScript allow us to overcome mistakes in the initial coding by setting the behavior to take care of such problems? For example, if we have hundreds of pages of marked-up content, it is quite possible that a mistake will lead to a missing chapter number somewhere. We can use JavaScript to make sure that in such cases it should display “missing chapter number” so that readers (including authors) are aware of it. Therefore, is JavaScript ever used as a fail-safe, or are problems usually taken care of in previous layers of web design? Yes, in a sense. You can can JS for “web scraping” and other kind of post-processing where you don’t control the source. But usually you want to fix the source if you can.
  • 7. Is there an easy way of proofreading markup language for errors, or does the creator have to read through every character in the file any time there is a problem? Yes – it’s called ‘debugging,’ and there are tools to help with that. There are debugging tools built into your browser.
  • 8. The reason I am almost laughing about it now is that it’s ridiculous to me that even when one seems to follow all the “rules” of coding or using a computer, sometimes inexplicable things come up that completely disrupt or negate all your work. As much as we know about and understand computers, we don’t always have rhyme or reason for why computers do what they do. Three engineers were aboard a stopped train …
  • 9. Will there ever be an easier way to create digital documents? Yes: blogs and wikis, for example, make page creation easy. But if you want to process lots of source data, or create HTML pages on- the-fly, you need to know the code.
  • 10. I find that as we delve into more complex programming languages, I am having a harder time grasping the necessary steps. Should this be the case? YES.
  • 11. Would it not be easier to control the structure, style, and behavior of a web page with one markup language, in one file? What was the motivation for having all of these web languages interact with each other? It would be nice, but this is kind of like wishing humans had one language. The web is a vast, evolving system, and these languages were created at different times to solve different problems. One reason they are separated is because different people do the coding for each layer.
  • 12. I don’t understand how we can insert a new language into HTML using a new tag in the header, without it being a part of the HTML? HTML is a source code that can hold lots of different content, including programming code. But the code and the content are treated differently by the browser in producing the resulting page that you see.
  • 13. Exercises • Overview of JavaScipt – Follow along – Either copy my source code or write it as I demonstrates • A simple footnote system