SlideShare a Scribd company logo
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

More Related Content

PPT
Lecture 6 Data Driven Design
PPT
Accessibility Usability Professional Summry
ODP
The Augmented Wiki
PPT
Lecture 9 Professional Practices
PDF
Web dev syllabus
PPTX
Week 1 - Intro to the Internet
PPT
Useful Software Presentation from NHLA
PPTX
Writing code for others
Lecture 6 Data Driven Design
Accessibility Usability Professional Summry
The Augmented Wiki
Lecture 9 Professional Practices
Web dev syllabus
Week 1 - Intro to the Internet
Useful Software Presentation from NHLA
Writing code for others

What's hot (19)

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

Viewers also liked (9)

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

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

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

More from Rafael Alvarado (20)

PPTX
Mdst3703 2013-10-08-thematic-research-collections
PPTX
Mdst3703 2013-10-01-hypertext-and-history
PPTX
Mdst3703 2013-09-24-hypertext
PPTX
Presentation1
PPTX
Mdst3703 2013-09-12-semantic-html
PPTX
Mdst3703 2013-09-17-text-models
PPTX
Mdst3703 2013-09-10-textual-signals
PPTX
Mdst3703 2013-09-05-studio2
PPTX
Mdst3703 2013-09-03-plato2
PPTX
Mdst3703 2013-08-29-hello-world
PPTX
UVA MDST 3703 2013 08-27 Introduction
PPTX
MDST 3705 2012-03-05 Databases to Visualization
PPTX
Mdst3705 2013-02-26-db-as-genre
PPTX
Mdst3705 2013-02-19-text-into-data
PPTX
Mdst3705 2013-02-12-finding-data
PPTX
Mdst3705 2012-01-22-code-as-language
PPTX
Mdst3705 2013-01-24-php2
PPTX
Mdst3705 2012-01-15-introduction
PPTX
Mdst3703 graph-theory-11-20-2012
PPTX
Mdst3703 maps-and-timelines-2012-11-13
Mdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-09-24-hypertext
Presentation1
Mdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-17-text-models
Mdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-03-plato2
Mdst3703 2013-08-29-hello-world
UVA MDST 3703 2013 08-27 Introduction
MDST 3705 2012-03-05 Databases to Visualization
Mdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-12-finding-data
Mdst3705 2012-01-22-code-as-language
Mdst3705 2013-01-24-php2
Mdst3705 2012-01-15-introduction
Mdst3703 graph-theory-11-20-2012
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