information organization lab
play

INFORMATION ORGANIZATION LAB INFORMATION ORGANIZATION LAB SEPTEMBER - PowerPoint PPT Presentation

INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 INFORMATION ORGANIZATION LAB INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 LAST TIME ON IOLAB INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 GIT GUI CLIENTS MAC GitX GitT ower


  1. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 INFORMATION ORGANIZATION LAB

  2. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 LAST TIME ON IOLAB

  3. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 GIT GUI CLIENTS • MAC • GitX • GitT ower • PC • SmartGit • T ortoiseGit

  4. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 TODAY • Project 1 Tips & More • jQuery • Callbacks • AJAX • Web Standards/Practices & HTML5 • Semantic HTML & Accessibility • HTML5 • Open Lab: Group Time / Proj 1 Q&A

  5. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 SOME TIPS FOR PROJECT 1 • Make a drawing or sketch of what you want to do. • Write the HTML first, then the JavaScript. • When you are writing the JavaScript code, first write comments in plain English describing what you want to do. • If it doesn’t work, ask questions!

  6. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 JQUERY: GET AND SET <a id="linkToCal" href="http:// berkeley.edu">UC Berkeley</a> $(‘a’).text(); //get $(‘a’).text(‘Hello world’); //set $(‘a’).attr(‘href’); $(‘a’).attr(‘href’, ‘http://google.com’); Complete list at http://api.jquery.com/category/attributes/

  7. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 JQUERY: FORMS <input id="name" type="text" value="John"> $(‘#name’).val(); $(‘#name’).val(‘Mary’); $(‘#name’).attr(‘value’); $(‘#name’).attr(‘value’, ‘Mary’); Complete list at http://api.jquery.com/category/forms/ See the documentation for .val() in particular: http://api.jquery.com/val/

  8. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 CALLBACKS AND TIMING function mySandwich(param1, param2, callback) { alert('Started eating my sandwich.\n\nIt has: ' + param1 + ', ' + param2); $('#sandwich').animate({ opacity: 0 }, 5000, function() { // Animation complete. }); if (callback && typeof(callback) === "function") { callback(); } } mySandwich('ham', 'cheese', function() { alert('Finished eating my sandwich.'); }); From: http://www.impressivewebs.com/callback-functions-javascript/ Example: http://jsbin.com/abimob/141/edit

  9. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 AJAX AND CROSS-SITE SCRIPTING Web 2.0 FTW

  10. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 AJAX WHAT? A synchronous J avascript a nd X mlHttpRequest (XHR)

  11. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 AJAX WHAT? A synchronous J avascript a nd J avascript

  12. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 AJAX WHAT? ¡ ¡ ¡ $ .get('http://gmail.com', ¡ function (xml){ ¡ ¡ ¡ ¡ ¡ ¡console .log (xml); ¡ ¡ ¡}); Further reading: http://en.wikipedia.org/wiki/Ajax_(programming)

  13. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 XSS (Cross-site scripting)

  14. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 XSS (Cross-site scripting) Further reading: http://en.wikipedia.org/wiki/Cross-site_scripting

  15. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 SAME-ORIGIN POLICY (Alas, no cross-site scripting!) Further reading: http://en.wikipedia.org/wiki/Same_origin_policy

  16. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 WORKAROUNDS (Cross-site scripting, yay!) • Proxy server • JSONP

  17. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 WEB STANDARDS Semantic HTML & Web Accessibility

  18. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 SEMANTIC HTML Meaning, not Presentation <div id= 'sidebar' > <div id= 'left' > <p class= 'caution' > <p class= 'yellow' > <span class= 'bigFont' > <h1>, <h2>, <h3>, etc.

  19. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 SEMANTIC HTML Meaning, not Presentation <div id= 'sidebar' > <div id= 'left' > <p class= 'caution' > <p class= 'yellow' > <span class= 'bigFont' > <h1>, <h2>, <h3>, etc.

  20. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012

  21. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 NEW TAGS & FEATURES • header, footer • localStorage • menu, nav • GeoLocation API • section, article • web video • figure • web audio • new input types • 3D, graphics, effects • placeholder text • web sockets

  22. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 BROWSER SUPPORT So when can we use all this cool stuff? Now! (mostly.) Good places to check: • http://caniuse.com/ • http://html5readiness.com/

  23. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 OPEN LAB Project 1 Group Time / Open Q&A

  24. INFORMATION ORGANIZATION LAB SEPTEMBER 17, 2012 FOR NEXT TIME HTML5 & CSS3 feature demos & exercises Homework 1 feedback out today via email Course Feedback Survey You can find links to help with all of these on the course website at http://courses.ischool.berkeley.edu/290ta-iol/f12

Recommend


More recommend