CS102: Monsoon 2015
1 Course updates Quiz later today Deadline for personal home page - - PowerPoint PPT Presentation
1 Course updates Quiz later today Deadline for personal home page - - PowerPoint PPT Presentation
CS 102 Human-Computer Interaction Lecture 14: Web Research and Semantic Web CS102: Monsoon 2015 1 Course updates Quiz later today Deadline for personal home page now Monday Oct 26 (not a graded assignment) Submit idea logs Monday Oct 26
CS102: Monsoon 2015
Course updates
Quiz later today Deadline for personal home page now Monday Oct 26 (not a graded assignment) Submit idea logs Monday Oct 26 Design studio class Monday Oct 26 (probably) Additional meeting times?
2
CS102: Monsoon 2015
Course mid-point
Reflections/comments so far?
3
CS102: Monsoon 2015
Javascript
4
CS102: Monsoon 2015
Javascript functions
Functions are first-class objects: they can be passed and returned to other functions Functions can be nested Closures retain state after a function returns function a() { var x = 1; return function() { console.log (x); } }
5
CS102: Monsoon 2015
Javascript debugging
“use strict” In-browser inspector Object.observe()
6
CS102: Monsoon 2015
JS Frameworks
Backbone, Angular, Ember, … Object.observe Follow the MVC paradigm Useful for single-page apps (e.g. Gmail)
7 https://www.airpair.com/js/javascript-framework-comparison
CS102: Monsoon 2015
Angular example
<div ng-app=""> Enter Name : <input type="text" ng-model="username" > <br/> Hello {{username}} </div>
- bject.username can be changed from JS and automatically
updates {{username}} in the view
8
CS102: Monsoon 2015
`
9
CS102: Monsoon 2015
Reprogramming the Web (examples)
10
CS102: Monsoon 2015
Relations, cards & templates
11 Link to Video
CS102: Monsoon 2015
Bookify
http://mobisocial.stanford.edu/bookify
12 12
CS102: Monsoon 2015
Chickenfoot
Scripting web interaction in the browser
13 13 http://groups.csail.mit.edu/uid/chickenfoot/index.php
CS102: Monsoon 2015
The semantic web
14
CS102: Monsoon 2015
The semantic web
Web pages are designed for humans to read, not for computer programs to manipulate meaningfully Semantic web envisages structured information: all items are marked up semantically e.g. date, people names, addresses, … (much more) Allows powerful queries across web sites Championed by Tim Berners Lee
15 15 http://www.cs.umd.edu/~golbeck/LBSC690/SemanticWeb.html
CS102: Monsoon 2015
Semantic web technologies
Resource Description Framework: (RDF) Triples of the form: <Subject> <Predicate> <Object> Allows flexible structure unlike relational databases URI: Uniform Resource Identifer (ISBN:9780465003945) SPARQL: Query language, like SQL
16 16
CS102: Monsoon 2015
Semantic web challenges
Consistent ontology Speed Inference
17 17
CS102: Monsoon 2015
Semantic web technologies
select ?studentName where { ?student studentOf ?university . ?university name “Ashoka University” . ?student name ?studentName } Each clause is of the form <Subject> <Predicate> <Object>
18 18
CS102: Monsoon 2015
Semantic databases
DBpedia YAGO Freebase Google Knowledge Graph …
19 19
mined from
CS102: Monsoon 2015
Quiz time
20
CS102: Monsoon 2015
Have a good break!
21