Web Instruments Lesson 5 - 2015v3
Web Instruments Lesson 5 - 2015v3
PART 2: Web
Technologies and DB
Lesson 5- Dynamic
Websites
Created by Vladimir Poddukin, 2019
1
Version 4.0
We learn in Part 2 of the course:
2
We will learn in this lesson:
3
Web Applications
Static - content on the server is static and provides a set of
already defined files (images, video, audio, applets)
embedded into HTML.
Dynamic – the content is generated by server depending on
some variables defined in HTTP request.
4
Static Websites
Web Applications
5
Static vs. Dynamic Architecture
7
Web Sessions
Fact: HTTP is stateless, but can keep connections alive.
Connection TTL = Min(browser_timeout, server_timeout)
Definitions:
A session is an instance of the interaction between a user
and an application
A web session is a data structure that an application uses to
store temporary data that is useful only during the time a
user is interacting with the application, it is also specific to
the user
Tip: avoid confusion between HTTP 1.1 connections and web
sessions
8
Web Sessions vs. HTTP 1.1 Persistent
Connections
Web Session
9
How sessions are established?
10
How is session ID kept on the client?
URL based session ID’s:
Example:
http://www.example.com/news.asp?article=27781;sessionid=IE60012219
Cookies
Example: Within the plain text of the HTTP server response –
Set-Cookie: sessionID=”IE60012219”; path=”/”;
domain=”www.example.com”; expires=”2003-06-01 00:00:00GMT”;
version=0
11
Cookies
12
Cookies: between Myths and Reality
Myths:
Cookies are like worms/viruses and can erase data from the user's
hard disk;
Cookies are a form of spyware and can steal your personal
information;
Cookies generate popups and spam;
Cookies are only used for advertising.
Facts:
Cookies are only data, not program code;
Cookies cannot erase or read information from the user's computer;
Cookies are usually anonymous (do not contain personal
information);
Cookies CAN be used to track your viewing habits on a particular
site.
13
Structure of a session
A session is a key-value
pair data structure.
Think of it as a
hashtable where each
user gets a hashkey to
put their data in. This
hashkey would be the
“session id”. A session
data structure would
look like this :
14
PART 1 of Lesson 5: we have passed
• General principles of how dynamic content is generated
• The limitations with static web sites that are solved by web server data
processing, examples
• Several workshops
Enable/disable cookies, Web sessions, Killing a web Session by Deleting a cookie.
15
We will learn in this lesson:
16
Web Traffic Analyzing Products
Wireshark
Firebug
Fiddler
17
Web Traffic Debugging System - Fiddler
Web debugging
Performance Testing
Security Testing
Eric Lawrence, The Creator of
18 Fiddler
Fiddler vs. HP UFT
19
PART 2 of Lesson 5: we have passed
21
ASP - briefly
Write output HTML depending on the session state, database data, request variables like
cookies, URL embedded value
Server
Usage: Allows connections to databases (ADO), filesystem, and use of components
installed on the server
Request
Usage: Allows reading the data sent by the client browser
Response
Usage: Can send information to the client, such as the text on a page or HTTP Cookie
(Write method to write output HTML)
Application
Usage: Stores global variables
Session
Usage: Stores variables accessible only to a single visitor
Error
Usage: Allows error management
24
ASP disadvantages
25
Other Technologies
Perl was a highly used language on the early web and still is very
much alive today. Large websites using Perl include Amazon.com,
LiveJournal.com, Ticketmaster.com and IMDb.com.
A programming language that keeps gaining popularity.
Some projects that use Python are the Zope application
server, YouTube and Google has mentioned that they use
Python extensively.
Most likely the most used server-side scripting language in the
world. Over 19 million internet domains are currently hosted
on servers with PHP installed. Examples of popular server-side
PHP applications include phpBB, WordPress, and MediaWiki.
26
Other Technologies – sample scripts
27
MVC – Model-View-Controller
Ruby-on-Rails is an open
source web application
framework written in
Ruby. Rails is a full stack
framework
28
Revolution in WEB – Asynchronous updates
Classic Web: AJAX: (Asynchronous JavaScript and
User enters a page and clicks the button XML)
Browsers sends HTTP Request User enters a page and clicks the
Server generates or simply returns new page button
Browser reloads the page JavaScript defines what part of page
to be renewed
Browser sends the respective request
Server returns just a part of the
document which is renewed
JavaScript changes the page according
to Server response
Central object: XmlHttpRequest
Implementations: jQuery, AngularJS, many
others
NOTE: HTML 5.0 must be used for async calls
29
PART 3 of Lesson 5: we have passed
30
We will learn in this lesson:
31
Web Servers
Web servers are able to map the path component of a Uniform Resource Locator
(URL) into:
A local file system resource (for static requests)
An internal or external program name (for dynamic requests)
32
Web Servers features and facts
33
Web Servers: TOP 3
nginx
34
Web Servers: Market Share
35
Web Servers: Comparison Criteria
IPv6 Support
36
LAMP
37
Workshops
38
PART 4 of Lesson 5: we have passed
Web Server – main definitions and functions, algorithms of
processing dynamic and static content
40
Thank you for your attention.
Q&A: [email protected]
YM: v_poddukin
41