1 / 11

Libraries, Sessions & Cookies Michael McCreary

Libraries, Sessions & Cookies Michael McCreary. Talk aims: Introduce concept of libraries, sessions & cookies Demonstrate applications and uses Implement using revServer Provide items for further investigation. Libraries, Sessions & Cookies.

hung
Download Presentation

Libraries, Sessions & Cookies Michael McCreary

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Libraries, Sessions & CookiesMichael McCreary

  2. Talk aims: Introduce concept of libraries, sessions & cookies Demonstrate applications and uses Implement using revServer Provide items for further investigation Libraries, Sessions & Cookies

  3. In computer science, a library is a collection of related subroutines that provide functionality aiding the development of software. In Rev, this can be seen as a collection of handlers that are made available to relevant parts of your stack. What is a Library?

  4. Abstraction! Code organization Code reuse Use other developers code You only need to know what a library does, not how it does it. Why Use Libraries?

  5. Loading a library: include "my_library.irev" Path relative to current script Handlers in library now in message path Creating a library Like a normal revServer script Omit closing “?>” tag Libraries in revServer

  6. Textual data stored on users machine Part of HTTP Accessed via name Limited to a URL Active for a set period Implemented differently in each browser What is a Cookie?

  7. Remembering a user Storing user data Passing data between web pages Login systems Shopping carts Cookies Uses

  8. Library built by John Craig http://www.splash21.on-rev.com/ Creating - setCookie pName, pValue, pExpires, pPath Deleting - deleteCookie pName Accessing - COOKIES[“cookie_name”] Always set/delete before header sent Cookies in revServer

  9. Like cookies – stores data communicated between user and server Data stored on server, not user's machine Data need not be textual More secure – not user editable No limits on data stored Much greater scope Sessions

  10. Library built by John Craig Implemented using cookies and database Accessed via variable SESSION[] updateSessionVars must be called at end of script Session in revServer

  11. “User States - Logins, Accounts, Permissions”, John Craig, Tomorrow 2pm “revServer: jQuery, AJAX”, James Cant, Tomorrow 3pm “revServer: Building a Web Store”, Andre Garzia, Tomorrow 4pm Further Information

More Related