Presentation is loading. Please wait.

Presentation is loading. Please wait.

October 7 th, 2010 SDU Webship. What did we learn last week? jQuery makes it really easy to select elements and do stuff with them. jQuery can process.

Similar presentations


Presentation on theme: "October 7 th, 2010 SDU Webship. What did we learn last week? jQuery makes it really easy to select elements and do stuff with them. jQuery can process."— Presentation transcript:

1 October 7 th, 2010 SDU Webship

2 What did we learn last week? jQuery makes it really easy to select elements and do stuff with them. jQuery can process data, create visual effects, and add other interactive elements to your websites All of this could be done with plain Javascript, but it would take about 20x longer. https://developer.mozilla.org/en/JavaScript/Guide

3 How to remember things HTTP (HyperText Transfer Protocol) is a stateless protocol. This means that it has no memory of any past queries. What can we do if we want our webpage to remember users? Cookies!

4 What is a cookie? A cookie is a string of text with a name which is sent and called by a webpage. Cookies are “set” (stored in the memory of your browser) using the HTTP protocol. Cookies are retrieved by a browser request May have expiration date; if not, will be stored until cookies are cleared. Cookies cannot be executed, but can be used as spyware.

5 Graphically:

6 What are cookies used for? Session management Personalization Tracking

7 Setting and retrieving cookies $.cookie("example", "foo"); $.cookie("example", "foo", { expires: 7 }); alert($.cookie("example") ); $.cookie("example", null);

8 Ajax Asynchronous Javascript and XML Used to send and retrieve data without reloading the page. XMLHttpRequest object (to exchange data asynchronously with a server) JavaScript/DOM (to display/interact with the information) CSS (to style the data) XML (often used as the format for transferring data)

9 Why use it? Improves interaction – pages don’t need to reload every time data changes. Added functionality – chat, suggestions, etc.

10 Demo time! http://www.ajaxdaddy.com/

11 Whatsitlooklike? http://jquery.com/demo/ajax/

12 Ajax and interaction Non-jQuery implementation: http://www.albertwavering.com/ajaxsample.html jQuery http://jquery.com/demo/ajax/

13 Next week: Applied AJAX (send/receive) HTML, CSS, and Javascript review After we review the basics, we will move onto more advanced topics.

14 Homework Review slides from previous weeks Email us or come to office hours if you have questions – we want to be sure that you understand everything before we move on!


Download ppt "October 7 th, 2010 SDU Webship. What did we learn last week? jQuery makes it really easy to select elements and do stuff with them. jQuery can process."

Similar presentations


Ads by Google