Mizzou Wergles 2830 Final

Ace your homework & exams now with Quizwiz!

Cookies: 1. What are cookies, why do we use them, where are they stored, how do we clear them (there were 3 ways)

1. A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP, you can both create and retrieve cookie values. 2. unset($_COOKIE['Hello']); setcookie('userid', '', 1);

General Concepts (Use the w3Schools definition, since this is our book. No other definition will work): 1. Know what AJAX is and what it does 2. Know what JSON is and what it is used for 3. Know what HTTP stands for and what it is used for 4. What does SQL stand for and what is it used for 5. Know GET and POST well 6. Know what JavaScript is used for 7. What is version control (e.g. Git) and what is it used for 8. What is a Git Repository and what is it used for 9. Key thing is the different between Git and GitHub

1. AJAX = Asynchronous JavaScript And XML, AJAX allows web pages to be updated asynchronously by exchanging data with a web server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page. 2. JSON stands for JavaScript Object Notation, JSON is a lightweight format for storing and transporting data. JSON is often used when data is sent from a server to a web page. JSON is "self-describing" and easy to understand. 3. Hypertext Markup Language, Communication between client computers and web servers is done by sending HTTP Requests and receiving HTTP Responses. 4. Structured Query Language, SQL is a standard language for accessing and manipulating databases. 5. GET requests can be cached GET requests remain in the browser history GET requests can be bookmarked GET requests should never be used when dealing with sensitive data GET requests have length restrictions GET requests is only used to request data (not modify) POST requests are never cached POST requests do not remain in the browser history POST requests cannot be bookmarked POST requests have no restrictions on data length 6. It is used to program the behavior of the pages 7. A Github repository is a place to store a development project and can manage different users working on a project at the same time. 9. Git is the version control system for managing source code and Github is a hosting service for your repository.

CSS: 1. Correct CSS syntax 2. Know how to create a class vs. ID 3. Know the specificity of CSS such as Classes, IDs, Inline, Internal, External, which one called last, etc. 4. Which selector has higher priority Look at the examples from lecture 5. Calculating the physical width of the wrapper so that everything will fit perfectly inside 6. Know how to select a specifc HTML element with CSS selectors

1. CSS Syntax: selector {property: value; property; value} Class: .class {} ID: #id {}. CSS comments are like in C with /* */ only. 2. #id { } .class { } 3. inline > ID's > Classes > elements. If equal then latest applied. 4. Inline 5. Physical width is whole thing content width is inside. 6. use id/class

MySQL 1. Know what a database is and what a database contains (e.g. tables) 2. Know what a table contains (e.g. Fields and records) 3. Know what a row is called in a table 4. Know what a column is called in a table Good tutorial: https://www.tutorialspoint.com/sql/sql-rdbms-concepts.htm (Links to an external site.)Links to an external site. 5. Are SQL keywords case sensitive ? 6. Know the proper ordering of SQL statements, for example: https://www.w3schools.com/sql/sql_where.asp (Links to an external site.)Links to an external site. 7. You should at least know the basics like the SELECT, FROM, and WHERE clause.

1. Database is a collection of tables. 2. Field is a column and a row is a record. 3. Record/tuple 4. Field/Attribute 5. NO 6. SELECT attrs FROM table WHERE condition; INSERT INTO table (attr1, attr2) VALUES (1, 2); DELETE FROM table WHERE condition; UPDATE table SET col1 = val, col2 = val WHERE condition; 7. above

URLs: 1. Know what the URL looks like when using GET and the difference when using POST 2. Know how to access the public html directory on our amazon ec2 instances when given the Public DNS

1. Empty using post but get will look like index.php?content=1 2. /var/www/html/index.html

HTML: 1 The five required tags of a webpage, as shown in class 2 Correct place to put things, like External JavaScript, External Style Sheets, jQuery links, where does in-page CSS go, where does in-page JavaScript go, etc. 3 Know how to put images on a page, the "must have" attributes, if the image doesn't load then what will display aternate text 4 Know how to define IDs and Classes in HTML and the rules for each of these 5 Can you apply multple IDs 6 How can you apply multiple classes to one element

1. Five required tags: <DOCTYPE html><html><head><title><body>

Model-View-Controller (MVC): 1. Know what the model, view, and controller is in the MVC architecture 2. Why do we use MVC and what is the purpose? 3. What are the benefits 4. Know what the general concept is for MVC https://developer.chrome.com/apps/app_frameworks (Links to an external site.)Links to an external site.

1. Model is where the application's data objects are stored. The model doesn't know anything about views and controllers. When a model changes, typically it will notify its observers that a change has occurred. View is what's presented to the users and how users interact with the app. The view is made with HTML, CSS, JavaScript and often templates. This part of your Chrome App has access to the DOM. The controller is the decision maker and the glue between the model and view. The controller updates the view when the model changes. It also adds event listeners to the view and updates the model when the user manipulates the view. 2. It helps you write better organized, and therefore more maintainable code. 3. Faster web development, asyncronus working, multiple views, changes don't effect entire model. 4. above

PHP: 1. Know how to create variables in PHP and how to asssign values to them 2. Know what sessions are in PHP and how would you start and resume sessions 3. Know what the purpose of sessions are 4. Looking at PHP code, given a particular associative array, and looking at a for loop, what will the output be. You can look at this example: https://www.w3schools.com/php/php_arrays.asp (Links to an external site.)Links to an external site. https://www.w3schools.com/php/showphp.asp?filename=demo_array_assoc_loop (Links to an external site.)Links to an external site. 5. Know about variable scope in PHP, what are global variable, what are local variables, and how would you call global variables inside of a function 6. What is the purpose of templates in PHP 7. How could you get things for the $_POST array and how do you change values in the $_POST array using PHP 8. Know how ternary operators work and what the value will be 9. Look at the examples from the lecture notes where we would check to see if the $_POST array was empty for a particular value and then return a default value if it is or get the actual value if it isn't 10. How return statements work in PHP functions and how many variables they can return

1. Use dollar sign $color = 'red'; 2. session_start(); session_unset() and session_destroy(): stored on users computer 3. They are used to store information about a user across different pages 4. $age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43"); foreach($age as $x => $x_value) { echo "Key=" . $x . ", Value=" . $x_value; echo "<br>"; } 5. Can't call global variables in a function unless you use "global $x, $y; Can't call function variables outside of function. 6. . In order to prevent writing the code over an over again, you can create your own template and have the server (PHP) fill in the content of the page for you. That way, if more data accumulates in the database, it will show up on the webpage automatically without changing any code. 7. $_POST['name'], $_POST['name'] = 'hi'; 8. c = (a < b) ? a : b; 9. $user = empty($_POST['user']) ? 'bob' : $_POST['user']; 10. A function can only return one value using return $x;

AJAX: 1. How to specify that AJAX is submitted using GET or POST method 2. Know what GET and POST are and the difference between them

1. function() { $.post('login.php', { action: 'login', username: $('#username').val(), password: $('#password').val() }, function(data) { $('#stage').html(data); }); 2. Described above

Closures: https://www.w3schools.com/js/js_function_closures.asp (Links to an external site.)Links to an external site.

1. var add = (function () { var counter = 0; return function () {counter += 1; return counter} })();

Amazon EC2: 1. What is the default landing page location for the linux amazon ec2 instance 2. What is the default landing page name for our linux amazon ec2 instance 3. Think about challenge 7, when we created our hello world page, what did you need to name the page so the server automatically opens the file up without specifying the name. http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html (Links to an external site.)Links to an external site. 4. Know the directory structure of an amazon ec2 instance and how to access that directory in the browser. So for example, lets say you have your public html directory, and inside that directory you have a directory called challenge7 and challenge8. What would the URL look like when accessing challenge7 and challenge8 in the browser ? 5. Do you need to specify where the public html directory is or put the absolute path in the browser ?

1. var/www/html 2. index.html 3. above 4. http://ec2-18-222-221-198.us-east-2.compute.amazonaws.com/challenge7 5. NO

DOM 1. Know about the DOM, what it is, what functionality it has, why we use it, https://www.w3schools.com/js/js_htmldom.asp (Links to an external site.)Links to an external site. https://www.w3schools.com/js/js_htmldom_methods.asp (Links to an external site.)Links to an external site. https://www.w3schools.com/js/js_htmldom_document.asp (Links to an external site.)Links to an external site. https://www.w3schools.com/js/js_htmldom_elements.asp (Links to an external site.)Links to an external site.

When a web page is loaded, the browser creates a Document Object Model of the page. The HTML DOM model is constructed as a tree of Objects In the DOM, all HTML elements are defined as objects. A property is a value that you can get or set (like changing the content of an HTML element). A method is an action you can do (like add or deleting an HTML element). The HTML DOM is a standard for how to get, change, add, or delete HTML elements. DOM is the object modified by JavaScript document.getElementById("demo").innerHTML = "Hello World!"; DOMContentLoaded event - DOM is ready, so the handler can lookup DOM nodes, initialize the interface. load event - additional resources are loaded, we can get image sizes (if not specified in HTML/CSS) etc. beforeunload/unload event - the user is leaving: we can check if the user saved the changes and ask them whether they really want to leave. If you call DOM API too early you won't be able to interact with elements because they don't exist.


Related study sets

Financial Planning 1.03 Study Guide

View Set

Week 9 Sherpath: Corticosteroid Therapy

View Set

Interpersonal Communications Chap 2

View Set

Chapter 2: Types of Life Policies

View Set