Jason's Stage 4 Notes

Lesson 1: Understanding Networks

Networks

A group of entities that can communicate even though they are not directly connected. There has to be at least three entities and there has to be a way that entities that are not directly connected can still communicate.

This Video does a good job of explaining it.

Servers

A server is a computer that interacts with a request we make to the computer. For example, whenever we type in "http://www.google.com", we are sending a request to Google's servers to return a website.

Get vs Post

Get parameters are included in the URL. Get requests are used for fetching documents. Get parameters have a max URL length. Get parameters are generally ok to cache. Get parameters should not change the server

Post parameters are included in the body. Post parameters are used for updating data or actually making changes. Post parameters have no max length. Post parameters are almost never cached. Post requests are usually destructive in nature.

Server Responses

When you send commands to the server the server will respond with different codes. There are 3 main server response types. 2xx codes indicate Success. 3xx codes indicate a Redirection. or action needs to be taken by the client in order to fulfill the request. 4xx and 5xx codes indicate Error The 4xx codes are intended for cases in which the client seems to have erred, and the 5xx codes for the cases in which the server is aware that the server has erred.

This websiteprovides a great explanation.

Lesson 2: Importance Of Validating Input

Checking Validation

Validation is verifying on the server that what we receive is what we expect to receive. If what we receive is different than what we expect we send a message notifying the user.

It is important that we validate the data and send the appropriate response so that the user knows what the problem is and potentially how to fix it going forward. This Video goes into more detail about this topic.

Handling Bad Data

We need to verify what the user enters and confirm if the data is bad. Using something like a drop-down is not enough to ensure that the user is not passing bad data to our form. It is important that we send appropriate responses or messages if the data is bad or incorrect.

This lesson covers this topic in detail.

Lesson 3: HTML Templates

Introducing Templates

Templates refer to a library used to build complicated strings (html). Jinja2 is a template library that was used to make this web page. Avoiding repetition is necessary when programming. You want to avoid having to rewrite the same code multiple times.

Variable Substitution

The syntax for substituting a variable in Jinja is a double curly brace. Substitution is basically just printing the variable. This is a handy way to substitute a string while maintaining cleaner code.

Template Inheritance

This is a great way to avoid repetition and makes your code more organized and easier to read. This lets you define a base template which you can later plug new HTML into. This is useful when, for example, you want to have a consistent header and footer across your app. Remember better organized code is more readable,easier to fix, easier to share, and harder to break.

Lesson 4: JavaScript

What is JavaScript?

JavaScript is the main programming language used with HTML and the Web. JavaScript can be used to create interactive effects within your web page.

This Wikipedia page has a great definition.

Where to use JavaScript?

If you are like me you are probably wondering how you can use JavaScript in your web page. According to this website. JavaScript can be placed in the body and head sections of an HTML page.

JavaScript Syntax

JavaScript syntax is a set of rules for how programs are constructed. JavaScript statements are separated by semicolons. There are two main types of values: Fixed values and variable values. Visit this page for more details about JavaScript syntax.



Login
anonymous@anonymous.com wrote:
A1lsgW http://www.LnAJ7K8QSpfMO2wQ8gO.com 2018-02-17 13:52:54.907490
anonymous@anonymous.com wrote:
Il4Atn http://www.LnAJ7K8QSpfMO2wQ8gO.com 2018-02-16 17:13:25.180450
anonymous@anonymous.com wrote:
The United States <a href=" http://www.china-crystals.com/html/product.htm ">estrace cream directions for use</a> Republic's chief executive officer Graham Smith said today: "We said from the start that the sovereign support grant was a bad deal for the taxpayers and no way to fund a public institution. Clearly we were right. 2018-02-16 07:01:36.873680
anonymous@anonymous.com wrote:
What do you do? <a href=" http://www.blogdojorgearagao.com.br/2015/06/19/ ">medical viagra generic name</a> "It is much simpler, there are some problems that arise nowof course in terms of getting the goods delivered because of thesituation on the ground and we deal only in euros but it iseasier to do business with the private sector rather than thegovernment," the Lebanese trader said. 2018-02-16 07:01:36.160360
anonymous@anonymous.com wrote:
An estate agents <a href=" http://www.china-crystals.com/html/product.htm ">estrace cream online</a> In contrast, larger rival Comcast said on Wednesday it added 187,000 high-speed Internet customers. Earlier this week, Time Warner Cable said it was raising its monthly rates customers pay to rent modems. 2018-02-16 07:01:35.064230
anonymous@anonymous.com wrote:
I'm originally from Dublin but now live in Edinburgh <a href=" http://www.lukelab.com/graphs#impact ">buy citalopram 10mg online</a> He said the meeting would be an opportunity for leaders to recognise the "contribution and sacrifice" made by the joint Nato-Isaf mission Afghanistan as "Nato draws down its forces and looks to help Afghanistan in different ways". 2018-02-16 07:01:34.332850
anonymous@anonymous.com wrote:
Other amount <a href=" http://www.lukelab.com/graphs#orchard ">celexa fda warning</a> &ldquo;I clutched hold of a woman but I was not able to keep hold of her. She fell into the water and I was saying &lsquo;grab hold of me&rsquo;. She looked at me and said nothing, she was exhausted. I saw her slide away, without even a cry, as she looked me in the eyes.&rdquo; 2018-02-16 07:01:33.264940
anonymous@anonymous.com wrote:
A law firm <a href=" http://www.bondcreative.com/our-services.html#irritated ">Cytoxan Generic</a> Unique among the latter is the tongue-in-cheek Concoursd'Lemons. It is a decidedly plebian event that displays andcelebrates some of the worst cars of all time. Examples includethe infamous Trabant from the former East Germany, the tiny andtinny Renault LeCar from the early 1980s and America's aptlynamed AMC Gremlin, which was introduced on April Fool's Day 1970and had a chopped-off design first sketched on the back of aNorthwest Airlines air-sickness bag. 2018-02-16 06:43:56.152160
anonymous@anonymous.com wrote:
Another service? <a href=" http://www.mens-app.es/humor-andrologico-arbol/ ">levitra aripi9razole</a> The arc of the modern human rights movement is born of the aftermath of World War II with the formation of the United Nations General Assembly and its adoption of the Universal Declaration of Human Rights. 2018-02-16 06:43:55.444690
anonymous@anonymous.com wrote:
We went to university together <a href=" http://www.mens-app.es/humor-andrologico-arbol/ ">emale impulseviagra</a> Marc Stears has known Ed Miliband longer than anybody on this list, except for the Labour leader&rsquo;s brother David. They studied PPE together at Corpus Christi College, Oxford where Miliband, then called Ted, led a rent strike as JCR President. Stears, a political theorist, became an Oxford academic but has now joined the Westminster wonks at the IPPR, where he is trying to put some policy content into the ideas of &lsquo;blue Labour&rsquo;. The mild-mannered Stears has kept a much lower media profile than allies like Maurice Glasman, but he is the person most trusted by the Labour leader. 2018-02-16 06:43:54.341400