Professional Documents
Culture Documents
Chapter 1
Chapter 1
11. Deployment:
- Choose a hosting provider and deploy your web application. Common choices include
cloud services like AWS, Azure, or Heroku. Configure your server and database for optimal
performance and scalability.
12. Monitoring and Analytics:
- Implement monitoring tools and analytics to track user behavior, identify issues, and gather
insights for future improvements.
13. Optimization:
- Continuously optimize your web application for performance, scalability, and user
experience. Address any bottlenecks and implement improvements based on user feedback.
14. Maintenance and Updates:
- Regularly update your application to fix bugs, introduce new features, and adapt to
changing requirements. Provide ongoing support to address user issues and ensure the
application's sustainability.
15. Documentation:
- Document your code, architecture, and any other relevant information to facilitate
collaboration and future development.
In this diagram:
- The "Client" represents the user interface, which could be a web browser or a desktop
application.
- The "Server" represents the backend where data processing, business logic, and data storage
occur.
- Communication between the client and server is typically facilitated through protocols like
HTTP.
In a two-tier architecture, the client and server components are tightly coupled, meaning that
changes to one may affect the other. This architecture is simple and suitable for small to
medium-sized applications, but for larger and more complex systems, a three-tier or n-tier
architecture might be preferred for better scalability and maintainability.
In this diagram:
- The "Presentation Tier" represents the user interface, which could be a web browser, mobile
app, or desktop application.
- The "Application Server" represents the application tier, where the business logic and
application processing take place.
- The "Data Storage" represents the data tier, which can include databases or other data
storage systems.
In N-tier architecture, each tier has its own specific responsibilities, making the system more
modular and scalable. This separation allows for easier maintenance, upgrades, and scalability,
making it suitable for larger and more complex applications.
Server-Side Components:
1. Server: - The server is a computer or a cluster of computers that hosts the web application,
processes requests from clients, and sends back responses. It handles the business logic,
interacts with databases, and performs other server-side operations.
2. Back-End Frameworks: - Frameworks like Express.js (for Node.js), Django (for Python),
Ruby on Rails, and Flask, which provide a structured way to build server-side applications.
They handle routing, middleware, and other server-related tasks.
3. Database: - A system for storing and retrieving data. This can be a relational database (like
MySQL or PostgreSQL) or a NoSQL database (like MongoDB). The server communicates with
the database to store and retrieve information.
4. Server-Side Scripting Languages:- Languages such as Node.js (JavaScript), Python, Ruby,
and Java that are used for server-side development. These languages handle server logic,
process requests, and generate dynamic content to be sent to the client.
5. Application Logic: - The code and algorithms that define the functionality of the application.
This includes authentication, authorization, data processing, and any other business-specific
logic.
6. APIs (Application Programming Interfaces):- Endpoints or interfaces that allow
communication between the client and server. RESTful APIs or GraphQL are common
approaches for defining how data can be requested and exchanged between the client and
server.
7. Server-Side Security:- Measures implemented on the server to ensure the security of the
application. This includes encryption, input validation, and protection against common web
vulnerabilities.
1.5 Networks
In the realm of web technology, networks refer to the interconnected infrastructure that enables
communication and data exchange between devices. These devices can include computers,
servers, routers, and other hardware components. Networks can be classified into various types,
such as local area networks (LANs), wide area networks (WANs), and the Internet.
1.6 Protocols:
Protocols are a set of rules and conventions that define how data is transmitted and received
over a network. In the context of web technology, several protocols play crucial roles in
ensuring seamless communication and data exchange. Here are some key protocols:
1. HTTP (Hypertext Transfer Protocol):
- HTTP is the foundation of data communication on the World Wide Web.
- It defines how messages are formatted and transmitted, and how web servers and browsers
should respond to various commands.
- The secure version, HTTPS (Hypertext Transfer Protocol Secure), adds a layer of
encryption using SSL/TLS to protect data during transmission.
2. TCP/IP (Transmission Control Protocol/Internet Protocol):
- TCP/IP is a suite of protocols that governs how data is transmitted over the Internet.
- TCP ensures reliable and ordered delivery of data, while IP handles the addressing and
routing of the data packets.
3. DNS (Domain Name System):
- DNS translates human-readable domain names (e.g., www.example.com) into IP addresses
that computers use to identify each other on a network.
- It facilitates user-friendly web browsing by eliminating the need to remember numerical IP
addresses.
4. SMTP (Simple Mail Transfer Protocol) and POP/IMAP:
- SMTP is used for sending emails, while POP (Post Office Protocol) and IMAP (Internet
Message Access Protocol) are used for retrieving emails from a mail server.
- These protocols enable the functioning of email services on the web.
5. FTP (File Transfer Protocol):
- FTP is used for transferring files between computers on a network.
- It enables the upload and download of files to and from web servers, facilitating the
management of website content.
6. WebSocket:
- WebSocket is a communication protocol that provides full-duplex communication channels
over a single, long-lived connection.
- It is used for real-time applications, such as chat applications and online gaming.
• The Model
➢ The model is the central component of the pattern. It expresses the application's
behavior in terms of the problem domain, independent of the user interface. It directly
manages the data, logic and rules of the application.
➢ The model is responsible for managing the data of the application. It responds to the
request from the view and it also responds to instructions from the controller to update
itself.
• The View
➢ A view can be any output representation of information, such as a chart or a diagram.
Multiple views of the same information are possible, such as a bar chart for
management and a tabular view for accountants.
➢ It means presentation of data in a particular format, triggered by a controller's decision
to present the data. They are script-based templating systems like JSP, ASP, PHP.
• The Controller
➢ The third part or section, the controller, accepts input and converts it to commands
for the model or view.
➢ The controller is responsible for responding to the user input and perform interactions
on the data model objects. The controller receives the input, it validates the input and
then performs the business operation that modifies the state of the data model.
Interactions
In addition to dividing the application into three kinds of components, the model–view–
controller design defines the interactions between them.
• The model is responsible for managing the data of the application. It receives user input
from the controller.
• The view means presentation of the model in a particular format.
• The controller is responsible for responding to the user input and perform interactions on
the data model objects. The controller receives the input, optionally validates the input
and then passes the input to the model.