Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out...
Transcript of Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out...
![Page 1: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/1.jpg)
•Out of 100 points
• points off for not following directions
• Name in wrong place
•Wrong dimensions in image or html
• no name, weird links
• Linking to whatever page had a picture on it
• Bad link
-4
-35
- late penalty
Grading for Assignment #1
Wednesday, October 5, 11
![Page 2: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/2.jpg)
Grading for Assignment #1
Wednesday, October 5, 11
![Page 3: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/3.jpg)
Grading for Assignment #1
Wednesday, October 5, 11
![Page 4: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/4.jpg)
Grading for Assignment #1
Wednesday, October 5, 11
![Page 5: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/5.jpg)
Grading for Assignment #1
Wednesday, October 5, 11
![Page 6: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/6.jpg)
Grading for Assignment #1
Wednesday, October 5, 11
![Page 7: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/7.jpg)
Grading for Assignment #1
Wednesday, October 5, 11
![Page 8: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/8.jpg)
Grading for Assignment #1
Wednesday, October 5, 11
![Page 9: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/9.jpg)
User Interaction:XML and JSON
Asst. Professor Donald J. PattersonINF 133 Fall 2011
9Wednesday, October 5, 11
![Page 10: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/10.jpg)
• HTML, XML and JSON
• Structured Data Formats that evolved with the web
• Text with a syntax applied
• They can represent a huge variety of information
• They enable data transport
• Different systems and technologies and programming languages depend on the syntax being standardized
Wednesday, October 5, 11
![Page 11: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/11.jpg)
XML w3schools.com
Wednesday, October 5, 11
![Page 12: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/12.jpg)
XML w3schools.com
bookstore
book
title
Everyday Italian
author
Giada De Laurentiis
year
2005
price
30.00
book
title
Harry Potter
author
J K. Rowling
year
2005
price
29.99
book
title
Learning XML
author
Erik T. Ray
year
2003
price
39.95
• How is XML extensible?
Wednesday, October 5, 11
![Page 13: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/13.jpg)
• JSON
• also structured text
• also with a syntax applied
• it can also represent a huge variety of information
• It also enables data transport
• Across systems, languages, and networks
• So what does JSON look like?
JSON
Wednesday, October 5, 11
![Page 14: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/14.jpg)
JSON
Wednesday, October 5, 11
![Page 15: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/15.jpg)
•What is JSON?
• JSON stands for “JavaScript Object Notation”
• JSON was designed to pass data around between browsers and servers
• JSON has no tags, only data
• JSON has no meta-data
JSON
Wednesday, October 5, 11
![Page 16: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/16.jpg)
• JSON also does not DO Anything
• It is a data format
• A program must be written to manipulate the data
• To search the data
• To display the data
• To change the data
JSON
Wednesday, October 5, 11
![Page 17: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/17.jpg)
• JSON was developed by people who thought that the meta-data in XML was
• unnecessary
• too big
• too hard to maintain
• not that valuable
JSON
Wednesday, October 5, 11
![Page 18: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/18.jpg)
• Details
• Two basic structures
• object:
• name/value pairs
• think Map
• array
• list of values
• think List
JSON http://json.org/
Wednesday, October 5, 11
![Page 19: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/19.jpg)
• Details
• The basic type is a value which can be
• a string
• a number
• an object
• an array
• “true”
• “false”
• “null”
JSON http://json.org/
Wednesday, October 5, 11
![Page 20: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/20.jpg)
• Details
•Object
• Delimited by curly braces
• name/values are separated by colons
• elements are separated by commas
• names are always strings
• values are always values
JSON http://json.org/
Wednesday, October 5, 11
![Page 21: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/21.jpg)
• Details
• Array
• Delimited by square braces
• elements are separated by commas
• elements are always values
JSON http://json.org/
Wednesday, October 5, 11
![Page 22: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/22.jpg)
• Details
• String
• is UNICODE
• is always in double quotes
• uses \ escape sequences
JSON http://json.org/
Wednesday, October 5, 11
![Page 24: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/24.jpg)
• Details
•White space outside of quotes is ignored
JSON http://json.org/
Wednesday, October 5, 11
![Page 25: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/25.jpg)
JSON
Wednesday, October 5, 11
![Page 26: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/26.jpg)
• Supported languages
• ASP, ActionScript, C, C++,C#,ColdFusion, D, Delphi, E, Eiffel, Erlang, Fan, Flex, Haskell, haXe, Java, JavaScript, Lasso,Lisp,LotusScript, Lua, Objective C, Objective CAML, OpenLaszlo, Perl, PHP, Pike, PL/SQL,PowerShell, Prolog, Python, R, Realbasic, Rebol, Ruby, Squeak, Tcl, Visual Basic, Visual FoxPro
JSON http://json.org/
Wednesday, October 5, 11
![Page 27: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/27.jpg)
•On beyond JSON
• JSON validation tools are easy to find
• No defined schema language
• No built-in namespaces (no meta-data!)
• No built-in transformation languages
JSON
Wednesday, October 5, 11
![Page 28: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/28.jpg)
• XML is like a Ferrari
• A Ferrari will get you to Las Vegas faster
• JSON is like a good bicycle
• A bicycle can go off-road
• XML is beautiful and powerful
• XML is well-engineered and well-researched
• JSON is much lighter weight
• JSON is easier to just get going fast
XML vs JSON
Wednesday, October 5, 11
![Page 29: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/29.jpg)
• JSON is like XML
• They are both human-readable text
• They are both hierarchical/ tree-structured
• Both can be parsed and used in many languages
• Both can be passed in AJAX requests
• (despite the X in AJAX)
JSON vs XML http://www.secretgeek.net/json_3mins.asp
Wednesday, October 5, 11
![Page 30: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/30.jpg)
• JSON is different than XML
• JSON does not have tags
• JSON is less verbose
• quicker to write
• quicker to read
• quicker to transport
• JSON can be parsed trivially using the eval() procedure in Javascript
• JSON has arrays, XML does not
• XML is extensible JSON usually isn’t
JSON vs XML http://www.secretgeek.net/json_3mins.asp
Wednesday, October 5, 11
![Page 31: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/31.jpg)
• Using either looks like:
• get the JSON/XML string
• convert it to a data structure
• JSON -> eval()
• XML -> some parse function (lib dependent)
• Use the data
• Do not process either type of data by “hand”.
• input: Use a library to parse the data
• output:
• Create the data in native data structures
• Use a program or method to output the data structure in JSON/XML
JSON vs XML http://www.secretgeek.net/json_3mins.asp
Wednesday, October 5, 11
![Page 32: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/32.jpg)
Example
class
INF 221
program
"search engine"
INF 133
quiz
"Crossword puzzle"
Assignment
XML
• Represent this as
• XML
• JSON
• There is not an absolutely correct answer to how to interpret this tree in the respective languages.
• There are multiple ways to interpret what this tree means.
Wednesday, October 5, 11
![Page 33: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/33.jpg)
Example
Wednesday, October 5, 11
![Page 34: Wrong dimensions in image or html Linking to whatever page ...djp3/classes/2011_09_INF... · •Out of 100 points •points off for not following directions •Name in wrong place](https://reader033.fdocuments.in/reader033/viewer/2022050219/5f652f3a5c232f23a2755718/html5/thumbnails/34.jpg)
Wednesday, October 5, 11