logo
IPND Projects
Course 4: Allow Comments
 Lesson 1: Introduction to Networks

Network

It is a group of entities that can communicate, even though they are not all directly connected. To make a network, it should have:
  • A way to encode and interpret messages
  • A way to route messages
  • Rules for deciding who gets to use resources

Latency

Time it takes message to get from source to destination. (secs)

Bandwidth

Amount of information that can be transmitted per unit time. (bits per sec)

Bit

The smallest unit of information.

Protocol

Define rules as to how the client talks to the server.

 Lesson 2: Make the Internet Work for You

HTML Documents

HTML is the language used to create webpages. It is made of doctype which is the first line that defines what type of contents the document contains and the tags which are made of the following:
  • <html> - which contains both <head> and <body> tags
  • <head> - which contains metadata, title, CSS, Javascript and links
  • <body> - which contains the actual documents.

URL - Uniform Resource Locator

The human readable locator that resolves to a numerical IP Address and represents the location of the physical machine which has the document that we want to fetch. It contains:
  • Protocol
  • Host
  • Path

HTTP - HyperText Transfer Protocol

The main protocol of the Web. The main purpose of the Server is to respond to HTTP requests. It begins with a 'HTTP Request' from a browser which is composed of a request line, followed by a number of headers like Host, User-Agent, etc. The request line is made up of three (3) parts:
  • Method - defines what type of request is made to the server. Commonly known as GET and POST
  • Path - the actual document that is being requested on the server
  • Version - the format of the request to the server

When the server receives the request from the browser, the server issues a 'HTTP Response' which is similar to the HTTP Request. It is made up of a status line followed by headers such as Date, Server, Content-Type, Content-Length, etc. The status line is also made up of three (3) parts:
  • Version - the format of the request from the server
  • Status code - some of the popular codes are 200-OK which means document is found, 302-Found which means document is located somewhere else, 404-Not Found which means document was not found and 500-Server Error which means the server broke in trying to handle the request
  • Reason phrase - an english language description of the Status code

And finally the two (2) main classification types of server responses are:
  • Static - pre-written files such as images
  • Dynamic - made on the fly by a program that is running via web application

 Lesson 3: Forms

HTML Forms

Form on a web page that allows a user to enter data that is sent to a server for processing. There are various form elements available such as:
  • Text
  • Textarea
  • Password
  • Checkbox
  • Radio button
  • Drop down
  • Label

 Lesson 4: Modulus & Dictionaries

The Modulus Operator

It is a percentage sign (%) and yields the remainder after division of one number by another. This is an operator (e.g. +, -, *, or /) that every programming language has.

Dictionary

Another type of a data structure that uses curly brackets {}. Used to map or associate things you want to store to keys which can be either a number or string. Remember, "mapping" or "associating" is the key concept in a dictionary.

 Lesson 5: Working with App Engine

Google App Engine

Often referred to as GAE or simply App Engine; it is a platform as a service (PaaS) cloud computing platform for developing and hosting web applications in Google-managed data centers. Applications are sandboxed and run across multiple servers. Able to use the Software Development Kits (SDKs) for App Engine including libraries and deployment tools.

Difference between GET and POST

GET - Usually used for retrieving documents in the server. Form submission using GET as a method constructs a URL by taking the value of the action attribute, appending a ? to it, then appending the form data set. The browser then process this URL as if following a link. Then the browser divides the URL into parts and recognizes a host, then send to that host a request with the rest of the URL as argument. Then the server takes it from there. This method is less secure and form data are restricted to ASCII codes only. The following are some of the characteristics of GET method:
  • Parameters in URL
  • Used for fetching documents
  • Maximum URL length
  • OK to cache
  • Shouldn't change the server

POST - Usually used to update data in the server. Form submission using POST method causes a request to be sent, using value of the action attribute and form data set which is enclosed in the body of the request message. The request is then transmitted to the server. POST is a little safer than GET because the parameters are not stored in browser history. Some characteristics of POST method are as follows:
  • Parameters in body
  • Used for updating data
  • No maximum length
  • Not OK to cache
  • OK to change the server

 Lesson 6: Validation

Validation

It means verifying on the server side that what we receive is what we expected to receive. A valid users can have a warning message in case an error occurs during input validation. On the other hand, the software application need to be protected from any malicious users who are always looking for opportunity how to attack and steal important databases. That why it is very important to test all input to protect against a future potential security hole and vulnerabilities. Proper approach will be as follows:
  • Verify the user's input
  • On error, render form again
  • Include error message

 Lesson 7: Templates

Template

A template library is a library to build complicated strings (html). A template contains variables and/or expressions, which get replaced with values when a template is rendered; and tags, which control the logic of the template. The main objective is to separate the data, logic and presentation of the web pages. It helps to develop and deploy applications that are flexible and easily maintainable. Another advantages of using a template are reusability and possibility to work separately on design and code by different people at the same time.

Escaping

HTML Escaping in templates avoid the risk that a variable will include characters that affect the resulting HTML.

Inheritance

Template inheritance allows you to build a base 'skeleton' template that contains all the common elements of your site and defines blocks that child templates can override. It helps avoid code repetition using the same set of templates. As an example, all my projects from Stage 1 to Stage 4 were included and used the same set of templates for all notes and in the comment section.

Helpful Tips
  • Always automatically escape variables when possible
  • Minimize code in templates
  • Minimize html in code

Using Templates
  • Separate different types of code
  • Make more readable code
  • More secure websites
  • Html that is easier to modify

 Lesson 8: Databases

Databases

A program that stores and retrieves an organized collection of data. It contains a table with rows and columns. A row is one instance of an element in a table. A column is a set of data values of a particular simple type, one for each row of the table. The set of properties that guarantee that database transactions are processed reliably are:
  • Atomicity - all parts of a transaction succeed or fail together
  • Consistency - the database will always be consistent
  • Isolation - no transaction can interleave with another's
  • Durability - once the transaction is committed, it won't be lost

Top
Comments





Posted Comments
Martinafug:
Defense of the final qualifying work is one of the forms of the State Final Attestation (State Final Attestation) of students completing their studies at universities. female viagra sildenafil <a href="https://mysildenafilkr.com/">sildenafil 100mg tablets</a> viagra 100 mg For evaluation by a co
Martinafug:
buy sildenafil citrate online <a href="https://mysildenafilkr.com/">amazon viagra</a> over the counter viagra substitute walmart
VlkCG:
Наткнулся в интернете на полезный портал спортивный тематики. https://1-xbet-zerkalo.ru Скорее стоит посмотреть!
OuoKO:
Недавно начал пользоваться букмекерской Мостбет и мне как новичку бк понравилась. Оформление красивое и понятное сразу разобрался что к чему. Делать ставки удобно есть все необходимые инструменты, большой выбор различных игр. Тех. поддержка отвечает на вопросы быстро, отличный бк. <a href="https:/
GakQA:
Ich habe eine interessante Seite gefunden. Gut fur Sportler. <a href="https://www.info-vysocina.cz/show.php?id=916240 ">Anavar kaufen</a> Sehenswert. Allen viel Gluck!
MakVS:
Ich habe im Internet etwas Interessantes gefunden. Nutzliches medizinisches Material. <a href="https://www.mobypicture.com/user/Simon11 ">Anavar kaufen</a> Ein Blick lohnt sich. Viel Gluck an alle!
BakPB:
Stolperte uber interessantes Material. Gut fur Sportler. <a href="https://www.onlex.de/_gbuch.php?username=Braun2152&action=view ">Anavar kaufen</a> Nicht verpassen. Haben Sie einen schonen Tag, jeder!
Buster:
I'm training to be an engineer https://journal.heinz.cmu.edu/?s=Australia%20Online%20Pharmacy%20%E2%AD%90%20www.HealthMeds.online%20%E2%AD%90%20Cialis%20Rx%20Australia%20-%20Cialis%20Generic%20Australia cialis generic australia TOKYO, Oct 24 (Reuters) - Asian shares fell in volatiletrade on Thursd
Alexander:
I'd like to send this letter by https://linguistics.mit.edu/?s=Australia%20Online%20Pharmacy%20%E2%AD%90%20www.HealthMeds.online%20%E2%AD%90%20Levitra%20Buy%20Australia%20-%20Levitra%20Online%20Australia levitra buy australia Conversely, Apple thinks simple. Its smartphone doesn't pretend to be an
Camila:
I'd like to cancel this standing order http://compgen.unc.edu/wp/?s=Australia%20Online%20Pharmacy%20%E2%AD%90%20www.HealthMeds.online%20%E2%AD%90%20Buy%20Online%20Cheap%20Kamagra%20Australia%20-%20Kamagra%20Oral%20Jelly%20Australia%20Paypal buy online cheap kamagra australia Facing public anger ove