software studio structure of the web Daniel Jackson 1 resources resource has › name › location › representation 2 URI, URN, URL? what do they mean? › URL: uniform resource location › URN: uniform resource name › URI: uniform resource identifier URI = URL ∪ URN does this matter? › strictly speaking, browser gives server a URI › content negotiation may turn it into a URL my opinion › just as in programming languages, names can expose representation and location 3 URI structure http://sdg.csail.mit.edu/projects.html scheme domain name file path http://bank.com/dep?acct=12&amt=10 action 4 query string HTML and CSS markup languages › SGML was the earliest (1974) › separation of semantics & presentation HTML added › interaction: fields, forms, scrollbars, etc › hypertext: links 5 links and anchors anchor › a resource or an element within a document link › connection from a source to a destination anchor 7 link graphs of the web mit.edu 8 csail.mit.edu from: http://www.aharef.info relative URIs relative URI › no scheme › no domain name › relative path type in a JavaScript console: console.log(document.baseURI) base URI › used to resolve it examples › base URI: http://www.acme.com/intro.html › <a href="suppliers.html">Suppliers</a> › resolves to http://www.acme.com/suppliers.html who resolves? browser or server? 9 MIT OpenCourseWare http://ocw.mit.edu 6.170 Software Studio Spring 2013 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.