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


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

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

  1. 1. JavaScript (ii) Prof. AlvaradoMDST 3703/77034 October 2012
  2. 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. 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. 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
  5. 5. Comments
  6. 6. Does JavaScript allow us to overcome mistakes in theinitial coding by setting the behavior to take care ofsuch problems? For example, if we have hundreds ofpages of marked-up content, it is quite possible that amistake will lead to a missing chapter numbersomewhere. We can use JavaScript to make sure thatin such cases it should display “missing chapternumber” so that readers (including authors) are awareof it. Therefore, is JavaScript ever used as a fail-safe, orare problems usually taken care of in previous layers ofweb 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. 7. Is there an easy way of proofreading markup languagefor errors, or does the creator have to read throughevery 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. 8. The reason I am almost laughing about it now is that it’sridiculous to me that even when one seems to follow allthe “rules” of coding or using a computer, sometimesinexplicable things come up that completely disrupt ornegate all your work. As much as we know about andunderstand computers, we don’t always have rhyme orreason for why computers do what they do.Three engineers were aboard a stopped train …
  9. 9. Will there ever be an easier way to create digitaldocuments? 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. 10. I find that as we delve into more complex programminglanguages, I am having a harder time grasping thenecessary steps. Should this be the case? YES.
  11. 11. Would it not be easier to control the structure, style, andbehavior of a web page with one markup language, inone file?What was the motivation for having all of these weblanguages interact with each other?It would be nice, but this is kind of like wishinghumans had one language. The web is a vast,evolving system, and these languages were createdat different times to solve different problems.One reason they are separated is because different people do the coding for each layer.
  12. 12. I don’t understand how we can insert a new languageinto HTML using a new tag in the header, without itbeing a part of the HTML?HTML is a source code that can hold lots ofdifferent content, including programming code.But the code and the content are treateddifferently by the browser in producing theresulting page that you see.
  13. 13. Exercises• Overview of JavaScipt – Follow along – Either copy my source code or write it as I demonstrates• A simple footnote system
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.