uva mdst 3703 javascript 2012-09-27

18
JavaScript Prof. Alvarado MDST 3703/7703 27 September 2012

Upload: rafael-alvarado

Post on 21-Nov-2014

535 views

Category:

Documents


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: UVA MDST 3703 JavaScript 2012-09-27

JavaScript

Prof. AlvaradoMDST 3703/7703

27 September 2012

Page 2: UVA MDST 3703 JavaScript 2012-09-27

Business

• Directories page– Make sure you have the MDST3703 directory, with

no spaces– Naming is important! Allows us to link to each

others’ work• Resource page– Links to helpful pages so you can teach yourself

Page 3: UVA MDST 3703 JavaScript 2012-09-27

Home Directory Tip

• You can access your Home Directory via SFTP– SFTP is more robust but not integrated with your

desktop (i.e. no mounted drive)• Steps– Install the FTP plugin in JEdit …

Page 4: UVA MDST 3703 JavaScript 2012-09-27

Go to Plugins > FTP > Connect to FTP Server …

Page 5: UVA MDST 3703 JavaScript 2012-09-27

… and enter the following info:

Page 6: UVA MDST 3703 JavaScript 2012-09-27

Review

• CSS is the language used to add style to HTML pages– HTML (used properly) defines structure

• Styles are associated with elements by means of selectors– Selectors point to element by means of location in

the DOM, classes, and IDs• Specific styles are added by means of

key/value pairs

Page 7: UVA MDST 3703 JavaScript 2012-09-27
Page 8: UVA MDST 3703 JavaScript 2012-09-27

"I feel that most of the things that we are learning how to do are by trial and error basis .... You can’t just expect to code something right away and get it right. It takes time and patience -- A LOT of patience -- before actually almost throwing your computer out the window because you have no idea why your code doesn’t work and then you come to find out you are missing a semicolon somewhere in hundreds of lines of C++ code!!!! >:("

Computers are stupid! And: To grow, fail early and often

Page 9: UVA MDST 3703 JavaScript 2012-09-27

"Today’s studio has me thinking more about how there are so many possible variances in logical pathways that defining computer logic has so many inherent variances across the different text programing languages. Is there a system that can read all of them? Regardless, it is important to note that any logic possessed in any machine first extended from a human mind."

"I wonder what tool or language will allow us to connect our pages and create a

cohesive unit?"

Page 10: UVA MDST 3703 JavaScript 2012-09-27

"Does the fact that the two are often separated (as we separated our persuasion.html file from its link to the default.css file.) allow for a more descriptive CSS?"

"It has me thinking that the entire system of the computer is founded upon a system of layers."

Page 11: UVA MDST 3703 JavaScript 2012-09-27

"I wonder if most thematic collections I see are coded by hand, or if most scholars use webpage creating software?"

"What do you do if you want to use a layout element that does not exist in the current CSS language? Will there ever be a way to write style, content, and structure with a single language?"

"It is crazy to think that our exercise only involved working with one page, whereas creators of Thematic Research Collections have to mark-up thousands of pages of research. I wonder how much time and resources such tasks take up."

Page 12: UVA MDST 3703 JavaScript 2012-09-27

"[W]e created a digital representation of the text with HTML but used CSS to make it resemble its original analog form. Don’t you think we are limiting ourselves by doing so?"

Page 13: UVA MDST 3703 JavaScript 2012-09-27
Page 14: UVA MDST 3703 JavaScript 2012-09-27

A programming language built into your browser

Allows you to create applications in web pages

Allows you to add behavior to web pages

Has a built-in awareness of the DOM

DOM = Document Object Model = the way HTML pages are viewed by the computer

Page 15: UVA MDST 3703 JavaScript 2012-09-27

JavaScript has nothing to do with Java …

Page 16: UVA MDST 3703 JavaScript 2012-09-27

The DOM represent HTML as a tree structure

Page 17: UVA MDST 3703 JavaScript 2012-09-27

We will be using jQuery, which makes it easy to do powerful things with

JavaScript

Page 18: UVA MDST 3703 JavaScript 2012-09-27

Another layer to our stack …

CONTENT | utf8STRUCTURE | html

STYLE | cssBEHAVIOR | javascript