Lecture 18
1. Web Servers: Imagine a web server as a computer that's like a waiter in a restaurant,
serving up web pages instead of food. Any regular computer can become a web server by
installing special software and connecting it to the internet.
2. Relational Databases: Think of a relational database like a big organized collection of
information stored in tables, kind of like how you organize data in a spreadsheet. Each
table has a name, and it's made up of columns and rows. Each column has a name too.
3. Front end and Back end: Websites usually have two parts: the part you see and interact
with (front end), and the part that's hidden on the server and handles behind-the-scenes
stuff (back end). They need to work together smoothly.
4. Back end Development: This is all about creating and managing the hidden part of the
website. It involves things like connecting to databases to get information and keeping
track of user sessions.
5. Server-side Processing: When you hear this term, it's mainly about handling requests
and generating responses on the server rather than on the user's device. There are
different tools and technologies for this, like CGI Scripts, Servlets, Server-Side Scripts,
and Database drivers (like JDBC/ODBC).
6. CGI Scripts: CGI (Common Gateway Interface) scripts are programs that run on the
server and handle requests from web pages. They can be written in languages like C, C+
+, or Perl. When you click a link on a webpage, it might trigger a CGI script to fetch data
from a database and send it back to your browser as a webpage.
7. Structured Query Language (SQL): SQL is a language used to interact with databases.
It's like giving instructions to the database on what information you want to retrieve or
modify. You can use it to fetch specific data or add new data into the database.
8. ASP, JSP, and PHP: These are different technologies used for server-side scripting.
They help generate dynamic web pages. ASP (Active Server Pages) is from Microsoft,
JSP (Java Server Pages) is from Sun Microsystems, and PHP is from Apache. They allow
embedding code within HTML to generate dynamic content.
9. Servlets: Servlets are fast Java applications running on the server. They're like little
programs that can talk to databases directly.
10. ODBC/JDBC: These are tools used to connect to databases from programs or scripts
running on the server.
11. Comparison of CGI Scripts, ASP, JSP, etc.: Each technology has its pros and cons.
Some compile code into machine language for faster execution, while others interpret
code line by line. Servlets, for example, remain active in server memory for faster
responses.
12. ASP: ASP (Active Server Pages) is a technology from Microsoft that's often used with
Internet Information Server (IIS) on Windows computers. It's good for creating dynamic
web pages and handling user input.
Maintaining State in a Stateless System: Lecture 19
HTTP is stateless, meaning it doesn't remember past interactions. So, in e-commerce,
where you need to remember steps like registration, item selection, and order
confirmation, you have to get creative.
One way is to use temporary files on the server, storing information as users go through
each step. At the end, this info can be saved into a database.
Another method involves using cookies on the client-side. Information like registration
details and selected items can be stored in cookies, then sent back to the server when
needed.
Hidden form fields are also used. For example, when a user selects items to add to their
cart, the item details are stored as hidden fields in a form. This data is then passed to the
server for further processing.
Client-Server Architecture Tiers:
In a 1-tier architecture, all processing happens in one place, like a mainframe.
Alternatively, each terminal might handle its processing, with a central file server just
storing files.
2-tier architecture involves processing HTML code on the client side and handling web
page requests on the server side.
In a 3-tier architecture, the database management system or application software might be
on a different tier than the web server.
You can have even more tiers, like a 4-tier architecture where payment processing is on a
separate tier.
Web Servers:
Web servers are like machines that serve up web pages to clients on the internet. They
can be a mix of hardware and software.
They run on operating systems like Windows NT Server, Linux, or Unix-based systems,
with Unix-based servers being more popular and secure.
Common web server software includes Apache HTTP server, Microsoft Internet
Information Server (IIS), and Sun ONE web server.
Web server hardware typically has more memory, faster processors, and larger disk
drives than regular PCs.
E-commerce Software:
E-commerce software is essential for online stores. It includes features like catalog
display, shopping cart, and transaction processing.
Catalog displays can be static (simple HTML lists) or dynamic (with information stored
in a database).
Shopping carts allow customers to select and view items, add or remove them, and place
orders.
Transaction processing is where customers complete their orders, including payment
processing and calculating taxes and shipping costs.
Advanced functions of e-commerce software include middleware for connecting to
existing systems, application integration, and web services for communication between
different applications over a network.