Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar © 2017 Pearson.

Slides:



Advertisements
Presentaciones similares
ANTE TODO It is a misunderstanding to think that ¿Qué? always translates as What?, and that ¿Cuál? and ¿Cuáles? always translate as Which? ¿Qué? and ¿Cuál?
Advertisements

Pronombres de objetos directos … …dónde los ponemos y como los usamos.
Starter: stars and wishes. Learning objectives: To use a writing frame to construct new language and memory strategies to remember it Outcome: Approximately.
Gustar What is pleasing to you?.
Leading in Learning – Spanish Collective Memory. Plenary 1 Did you know any of the words already? If so, which? Why are the colours significant do you.
Hoy es lunes, el 9 de febrero. ESPONJA: ¿Qué significa? 1. Hay que estudiar para las pruebas. 2. Yo siempre preparo mi tarea, pero mis amigos solo preparan.
Mi dormitorio My bedroom
Digital Photography: Selfie Slides By: Essence L. Thomas.
¿Qué haces en la escuela? Question words, objects, yo-go’s.
Indirect Object Pronouns
Las Preguntas (the questions) Tengo una pregunta… Sí, Juan habla mucho con el profesor en clase. No, Juan no habla mucho en clase. s vo s vo Forming.
Digital Photography: Selfie Slides Anaiyah holiday 10/23/2014 6th.
Spanish Sentence Structure How can we make better sentences?
Hagan ahora 1. Necesita una hoja de papel. 2. Escribe tu nombre en el papel. 3. Escribe la fecha en el papel 4. Escribe el titulo: “Items for Quiz and.
-go Verbs There is a small but very important group of verbs that we call the “-go” verbs. These verbs are: Conocer : to know (people) Hacer: to make/do.
Hacer Ahora. Usa saber o conocer para completar las oraciones.
Essential ?: How do I use these irregular verbs? How are they different than the verbs I already know?
Indirect Object Pronouns Original PowerPoint was by Ms. Martin of Tri-Center Community Schools.
Los objetos directos. Essential Questions: What do direct object pronouns communicate to the listener? What do direct object pronouns imply? Where do.
Antes de empezar – ¿Cómo se llaman estos quehaceres? (Necesito la tarea.)
English Language II (2). English Language I (2) Warm-up.
Spanish I Week 16. Para Empezar 7 de diciembre Por favor responde a la pregunta en español. Please respond to the question in Spanish ¿Qué llevas hoy?
Welcome! Conversation Classes. Remembering Names Everyone Stand! Introduce yourself to class and give your name an action! Go around the class and try.
Ser vs. Estar Señora Ramos.
*TIENES 5 MINUTOS* Objective: Vocab/Ideas: Vámonos:
Español 3 24 de febrero de 2017.
Gustar V. Encantar.
My Spanish 2 classes are 2nd and 3rd periods
Las clases de Sra. Schwarz Realidades 1
Martes, el 9 de octubre Toma la hoja de “estar” en la mesa.
Español 1 11 de mayo de 2017 Good morning, thank you for taking my classes today. For the most part the kids are really great. Here is my schedule for.
Día número 3 Español 1—Acelerado
Getting to know you more!
Introduction & Agenda Introduction to Microchip Device Blocksets Introduction to MATLAB Plug-In in MPLAB®IDE Creating a SIMULINK model with Microchip.
Español 2 3 de marzo de 2017.
use me gusta to say you like something
First Grade Dual High Frequency Words
El Imperfecto Español 2.
Egg Baby Project Spanish II.
El tiempo Weather #onfleek.
Antes de empezar – escribe 5 quehaceres (chores) que haces en tu casa (in English)
La diferencia entre los verbos saber y conocer
Ser y Estar To be or….to be?
Recetas 3 Objetivo: Hacer preguntas Hablar sobre la comida
Quasimodo: Tienes que hacer parte D de la tarea..
“To Be” or not “To Be” Ser vs. Estar.
Forming questions.
“HACE + TIME + QUE” EXPRESSIONS
Bellringer 10/29 Put this in your NOTES!!! Using questions that you know in Spanish, figure out what the following question words mean. If you can’t.
Proyecto: Mi horario Nombre Hora Fecha.
Assignment Log Sheet Chapt. 1 Nombre
Hoy es miércoles el doce de septiembre
Meta: I can recall some vocab about classes and classroom objects
Día número 166—español 1 El 21 de mayo
Indirect Questions First Day on the Job 11 Focus on Grammar 4 Part X, Unit 28 By Ruth Luman, Gabriele Steiner, and BJ Wells Copyright © Pearson Education,
Question Formation Spanish I Page 52.
Indirect Object Pronouns
Estar Ch. 2B.
Tapas Listen to the dialogue and answer the questions. Write down all the information that you hear first, then answer the questions. 1. What.
Development of the concert programme
Quasimodo: What do you remember about Direct Objects from last chapter? What do you remember about Indirect Objects from English classes you’ve taken before?
Spanish I Chapter 1 Gramática 1-2 Page 24
How to use “Gustar”.
My life Name: benjamín Aravena barrios Thicher: Alexis fernandes DATE: 26|06|2018 COURSE: 7°BASICO.
Quasimodo: Check your homework!
How to write my report. Checklist – what I need to include Cover page Contents page – with sections Introduction - aims of project - background information.
Astronomy has really big numbers. Distance between Earth and Sun meters kilometers This is the closest star.
Globalization Politics and the preservation of nation state.
a. Which job do you think pays more? I think an assistant chef earns more, as he spends all day working, while the dog walker earns according to the dogs.
Las Preguntas (the questions) Tengo una pregunta… Sí, Juan habla mucho con el profesor en clase. No, Juan no habla mucho en clase. s vo s vo Forming.
Transcripción de la presentación:

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar © 2017 Pearson Managing State Chapter 16

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter The Problem of State in Web Applications Passing Information via Query Strings Passing Information via the URL Path Cookies SerializationSession State 7 HTML5 Web Storage 8 Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter 16 cont. 9 Summary 8

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter The Problem of State in Web Applications Passing Information via Query Strings Passing Information via the URL Path Cookies SerializationSession State 7 HTML5 Web Storage 8 Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar The Problem of State in Web Applications

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar The Problem of State in Web Applications What the server sees

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar The Problem of State in Web Applications What the user wants

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar The Problem of State in Web Applications Solution Query Strings Cookies Sessions

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter The Problem of State in Web Applications Passing Information via Query Strings Passing Information via the URL Path Cookies SerializationSession State 7 HTML5 Web Storage 8 Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Passing Information via Query Strings Remember POST and GET

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter The Problem of State in Web Applications Passing Information via Query Strings Passing Information via the URL Path Cookies SerializationSession State 7 HTML5 Web Storage 8 Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Passing Information via the URL Path Dynamic URLs (i.e., query strings) are a pretty essential part of web application development. Static URLs the appearance of search terms within the URL does seem to improve its relative position. Another benefit to static URLs is that users tend to prefer them. Can use URL rewriting to make static URLs be dynamic

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Passing Information via the URL Path URL Rewriting in Apache and Linux

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter The Problem of State in Web Applications Passing Information via Query Strings Passing Information via the URL Path Cookies SerializationSession State 7 HTML5 Web Storage 8 Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Cookies How Do Cookies Work?

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Cookies <?php // add 1 day to the current time for expiry time $expiryTime = time()+60*60*24; // create a persistent cookie $name = "Username"; $value = "Ricardo"; setcookie($name, $value, $expiryTime); ?> Setting a Cookie

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Cookies <?php if( !isset($_COOKIE['Username']) ) { //no valid cookie found } else { echo "The username retrieved from the cookie is:"; echo $_COOKIE['Username']; } ?> Reading a Cookies

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Cookies Persistent Cookie Best Practices

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter The Problem of State in Web Applications Passing Information via Query Strings Passing Information via the URL Path Cookies SerializationSession State 7 HTML5 Web Storage 8 Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Serialization Application of Serialization

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter The Problem of State in Web Applications Passing Information via Query Strings Passing Information via the URL Path Cookies SerializationSession State 7 HTML5 Web Storage 8 Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Session State How Does Session State Work?

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Session State Accessing session state <?php session_start(); if ( isset($_SESSION['user']) ) { // User is logged in } else { // No one is logged in (guest) } ?>

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Session State Checking session existence <?php include_once("ShoppingCart.class.php"); session_start(); // always check for existence of session object before accessing it if ( !isset($_SESSION["Cart"]) ) { // session variables can be strings, arrays, or objects, but // smaller is better $_SESSION["Cart"] = new ShoppingCart(); } $cart = $_SESSION["Cart"]; ?>

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Session State How does it all work

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Session State Session Storage and Configuration

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter The Problem of State in Web Applications Passing Information via Query Strings Passing Information via the URL Path Cookies SerializationSession State 7 HTML5 Web Storage 8 Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar HTML5 Web Storage Web Storage Writer if (typeof (localStorage) === "undefined" || typeof (sessionStorage) === "undefined") { alert("Web Storage is not supported on this browser..."); } else { sessionStorage.setItem("TodaysDate", new Date()); sessionStorage.FavoriteArtist = "Matisse"; localStorage.UserName = "Ricardo"; document.write("web storage modified"); } Go to web storage reader Using Web Storage - Writing

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar HTML5 Web Storage Web Storage Reader if (typeof (localStorage) === "undefined" || typeof (sessionStorage) === "undefined") { alert("Web Storage is not supported on this browser..."); } else { var today = sessionStorage.getItem("TodaysDate"); var artist = sessionStorage.FavoriteArtist; var user = localStorage.UserName; document.write("date saved=" + today); document.write(" favorite artist=" + artist); document.write(" user name = " + user); } Using Web Storage - Reading

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar HTML5 Web Storage Why Would We Use Web Storage?

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter The Problem of State in Web Applications Passing Information via Query Strings Passing Information via the URL Path Cookies SerializationSession State 7 HTML5 Web Storage 8 Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Caching Page Output Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Caching Not always prudent to cache entire pages (think customizations for logged in users) Nice to programmatically place commonly used collections of data that require time-intensive queries from the database or web server into cache memory, and then other pages that also need that same data can use the cache version rather than re-retrieve it from its original location Read about memcache. Application Data Caching

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Chapter 16 cont. 9 Summary 8

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Summary application data caching cache cookies HttpOnly cookie page output caching persistent cookies serialization session cookie session state URL rewriting web storage Key Terms

Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Summary Questions?