1 00:00:04,748 --> 00:00:05,719 Welcome back. 2 00:00:05,719 --> 00:00:08,320 Did you enjoy working with databases? 3 00:00:08,320 --> 00:00:08,880 Welcome back. 4 00:00:08,880 --> 00:00:11,880 I am glad you decided to keep working hard. 5 00:00:11,880 --> 00:00:15,870 I know that last course took longer than usual to get through. 6 00:00:15,870 --> 00:00:19,030 Hello and welcome, I am Elena, a PHP programmer for 7 00:00:19,030 --> 00:00:22,140 over 15 years, and a teacher here at Tree House. 8 00:00:22,140 --> 00:00:25,280 I'll be your guide through this journey into PHP. 9 00:00:25,280 --> 00:00:28,450 I'm glad you've chosen to allow tree house to help you reach your goals. 10 00:00:29,530 --> 00:00:33,610 Doesn't it make you feel special when contents speak directly to you? 11 00:00:33,610 --> 00:00:36,860 And it makes it so much easier to find things on our phones and 12 00:00:36,860 --> 00:00:40,490 computers seem to know what we are looking for, even before we ask. 13 00:00:41,580 --> 00:00:44,540 Which is to expect our phones to know our locations, when we are looking for 14 00:00:44,540 --> 00:00:47,700 a local service or trying to get directions. 15 00:00:47,700 --> 00:00:51,770 Websites like Amazon make suggestions of things we may like to see, and 16 00:00:51,770 --> 00:00:54,510 tell us when our favorite authors are releasing their latest books. 17 00:00:55,870 --> 00:01:00,600 If you plan a trip using Expedia, the website keeps track of recent searches for 18 00:01:00,600 --> 00:01:02,470 you in a scratch pad. 19 00:01:02,470 --> 00:01:06,610 This makes it easy to jump back to view different choices for the trip. 20 00:01:06,610 --> 00:01:10,410 This scratch pad is available without requiring users to be logged in. 21 00:01:11,830 --> 00:01:14,820 Most of the time, we don't even realize how much our devices or 22 00:01:14,820 --> 00:01:19,360 websites are set up to assist us until we try to use a different device or 23 00:01:19,360 --> 00:01:23,650 a new phone and all of a sudden, our history and settings aren't there anymore. 24 00:01:23,650 --> 00:01:27,100 And it's so much harder to do or find anything. 25 00:01:27,100 --> 00:01:31,620 Users have come to expect so much and it's just getting worse. 26 00:01:31,620 --> 00:01:33,850 So, what does that mean to you as a programmer? 27 00:01:33,850 --> 00:01:37,500 How can you make your own applications user aware? 28 00:01:37,500 --> 00:01:40,030 It starts with data persistence. 29 00:01:40,030 --> 00:01:43,770 The idea of storing information for a prolonged period of time. 30 00:01:45,070 --> 00:01:50,790 HTTP, the protocol for exchanging data on the internet, is a stateless protocol. 31 00:01:50,790 --> 00:01:51,630 This means, 32 00:01:51,630 --> 00:01:56,060 that web servers don't normally keep track of who's visiting each page on a site. 33 00:01:57,140 --> 00:02:01,440 Servers also don't keep track of visitors as they click from page to page. 34 00:02:01,440 --> 00:02:07,300 For example, say I visited a sites welcome page, and then I visited the contact page. 35 00:02:07,300 --> 00:02:10,240 The server doesn't keep track of that progress and 36 00:02:10,240 --> 00:02:12,090 doesn't know that I was just on the welcome page. 37 00:02:13,570 --> 00:02:17,420 There are a number of different options for working with persistent data. 38 00:02:17,420 --> 00:02:19,210 If you've worked with a database or 39 00:02:19,210 --> 00:02:23,940 any file-based data storage, you've already worked with persistent data. 40 00:02:23,940 --> 00:02:28,330 Multiple pages can access and know about this same information. 41 00:02:28,330 --> 00:02:33,380 This form of persistance works well when we want data to be stored long term or 42 00:02:33,380 --> 00:02:36,070 be utilized by multiple users. 43 00:02:36,070 --> 00:02:41,560 We can also make use of a users browser to keep track of specific information and 44 00:02:41,560 --> 00:02:43,020 tailor the users experience. 45 00:02:44,250 --> 00:02:47,360 In this course, we'll put together a story building game 46 00:02:47,360 --> 00:02:51,480 that will utilize different types of browser-based persistence. 47 00:02:51,480 --> 00:02:55,437 The games steps the user through multiple pages that ask the user for 48 00:02:55,437 --> 00:02:56,975 specific types of words. 49 00:03:06,958 --> 00:03:11,833 Those words will be used in predefined locations of the string to create an often 50 00:03:11,833 --> 00:03:14,110 comical or nonsensical story. 51 00:03:14,110 --> 00:03:18,115 At the end, a user will be able to save a story to re-read later. 52 00:03:22,460 --> 00:03:25,870 A user can also play the game again as many times as they'd like.