Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

Browser Persistent Data with PHP Course (How To)

via Treehouse

Overview

With smartphones, smartwatches and even smart appliances, the internet of things has brought us into a world to rival sci-fi novels. We're no longer content with a simple search. We want context. We expect our devices to know our locations, preferences, desires and goals. We expect tailored suggestions, reminders and announcements. Most of the time we don't even realize how much our devices or websites are setup to assist us until our connection is broken or we try to use a different device, and all of a sudden our history and setting aren't there and it's so much harder to do or find anything. Users have come to expect so much and it's just getting worse.

So what does that mean to you as a programmer? How can you make your own applications "user aware"? It starts with data persistence.

What you'll learn

  • Data Persistence
  • Forms
  • URL Parameters
  • Sessions
  • Cookies

Syllabus

Data Persistence on the Web

Data persistence is the means of storing information for a prolonged period of time. We can make applications that are "user aware" by using that information to set user preferences or show use input. We'll cover three ways to persist data in a browser. Forms, Sessions and Cookies. You can also combine these methods with a database or other file system for server based persistence.

Chevron 10 steps
  • Types of Persistence

    3:27

  • Using Forms for Persistence

    5:37

  • Data Persistence

    5 questions

  • Reading, Writing and Destroying Sessions

    5:27

  • Checking for Sessions

    2 objectives

  • Writing Cookies

    4:56

  • Reading and Deleting Cookies

    7:14

  • Cookies

    1 objective

  • Wrapping It All Up

    1:12

  • Browser Persistence

    10 questions

  • Extra Credit

    • Implement Code Challenges
      • Check session for all 5 words, redirect to missing word
      • Don't allow blank words
    • If not starting over, show the last word they entered
    • Set up a prompt to ask the user if they really want to delete the story.
    • Write additional stories that use the same 5 words we utilized for the original story.
    • Create a bank of different stories and save the entire story instead of the
    • Use the language tool api to make sure the word conforms to the part of speech requested http://wiki.languagetool.org/public-http-api

Reviews

Start your review of Browser Persistent Data with PHP Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.