Web Development Fundamentals

?
  • Created by: wreje035
  • Created on: 17-10-18 22:12
DAO Injection changed to main admin class
Now we have one place where the DAO instance gets created. Makes it easier to change from one dao to another. GUI classes now know nothing about which DAO is being used. ONLY KNOW ABOUT INTERFACE. Can now plass mocks to GUIs 4 component testing. flex
1 of 14
www
browser initiates connection with server and requests a resource. Server uses the same connection to send the response.
2 of 14
HTTP
hyper text transfer protocol. Each message has a set of headers and a message body. TCP sockets used for network transmission. Client side initiates socket connection.
3 of 14
HTTP1.1 Request
GET is the request method, then the target resource and the HTTP version. THe target host is specified and then the acceptable format for the response is defined.
4 of 14
What are cookies?
Web app can instruct web browser to store small key-value pairs. Web server adds a header to the HTTP response. Looks like Set-Cookie: Fav colour=blue. The web browsr now adds same key-val pair to headers in all subs requests.
5 of 14
More on Cookies:
Web clients can also create cookies.Cookies are a simple way of adding basic state to the HTTP protocol (to make it a little less stateless). Can be persistently stored in the browser.A web app cant trust cookies for anything important (malicious mo
6 of 14
What are Sessions?
Since HTTP is stateless & cookies cant be trusted, web apps need another way of storing info from related requests. A SESSION is a temp data store inside the web app.
7 of 14
More on sessions:
Stores info relating to a single user/account. Session object per active user. Can be accessed while processing any request from that user.
8 of 14
How does the web app know which session object to load for a request?
Session cookies (session tokens). Temp, short lived cookies. Long hexadecimal numbers generated by the web app. No payoff to modify own cookies.
9 of 14
HTML?
Hypertext Markup Language. Language that describes the structure of a page. HTTP response will be encoded in HTML if the requested resource was a web page.
10 of 14
HTML tags
A document is made of of a hierarchy of tags. Usually an opening and closing tag. Some tags have attributes <p id="attribute">
11 of 14
HTML forms
<form action="process form" method = "post"> Method refers to the HTTP request method
12 of 14
CSS
Cascading Style Sheets: HTML is about structure, CSS is about apply style. Seperated from HTML. More flexible to create the style in one place and link it to the html pages. Changes to style will be used by all the pages.
13 of 14
Applying CSS
Id (#) and Class(.) attributes can be used for styling. ID can only be used once in a single document (identifies a specific tag). Class can be used many times - identifies a class of tags that will be styled the same.
14 of 14

Other cards in this set

Card 2

Front

www

Back

browser initiates connection with server and requests a resource. Server uses the same connection to send the response.

Card 3

Front

HTTP

Back

Preview of the front of card 3

Card 4

Front

HTTP1.1 Request

Back

Preview of the front of card 4

Card 5

Front

What are cookies?

Back

Preview of the front of card 5
View more cards

Comments

No comments have yet been made

Similar ICT resources:

See all ICT resources »See all Web Development Fundamentals resources »