0% found this document useful (0 votes)
20 views10 pages

Unit-2 Issue of Web Technology

The document discusses web technology issues, focusing on the architectural layers of web applications, including the web layer (HTML, CSS, JavaScript), tier technology (1-Tier, 2-Tier, 3-Tier, N-Tier), and their respective functionalities. It highlights the advantages and disadvantages of 3-Tier architecture, such as improved scalability and security, while also addressing the complexities and potential performance issues. Additionally, it provides definitions for web, application, database, and cache servers, along with when to use N-Tier architecture.

Uploaded by

angelmgrl135
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views10 pages

Unit-2 Issue of Web Technology

The document discusses web technology issues, focusing on the architectural layers of web applications, including the web layer (HTML, CSS, JavaScript), tier technology (1-Tier, 2-Tier, 3-Tier, N-Tier), and their respective functionalities. It highlights the advantages and disadvantages of 3-Tier architecture, such as improved scalability and security, while also addressing the complexities and potential performance issues. Additionally, it provides definitions for web, application, database, and cache servers, along with when to use N-Tier architecture.

Uploaded by

angelmgrl135
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Unit-2: Issues of Web Technology

Architectural Issue of Web Layer:


The web layer is also referred to as the UI layer. The web layer is primarily
concerned with presenting the user interface and the behavior of the application.
The three layers within the Web Layer are:

● HTML-The Content Layer: The content layer is where you store all the
content that your customers want to read or look at. This includes text and
images as well as multimedia. It is also important to make sure that every
aspect of your site is represented in the content layer.

● CSS- The Styles Layer: Store all your styles for website in an external style
sheet. This defines the way the pages should look, and you can have separate
style sheets for various media types. Store your CSS in an external style
sheet so that you can get the benefits of the style layer across the site.

● Javascript- Behaviour Layer: Javascript is the most commonly used


language for writing the behaviour layer; ASP, CGI and PHP can also
generate web page behaviours. However, when most developers refer to the
behaviour layer, they mean that layer that is activated directly in the web
browser- so Javascript is nearly always the language of choice. You use this
layer to interact directly with the DOM or Document Object Model.

When you are creating a web page, it is important to keep the layers separate.
Using external style sheets is the best way to separate your content from your
design. And the same is true for using external Javascript files.

Some of the benefits of separating the layers are:

● Shared resources: When we write an external CSS file or Javascript file,


we can use that file by any page on our website. There is no duplication of
effort and whenever the file changes, it changes for every page that uses it
without you making more than one change.

● Faster downloads: Once the script or style sheet has been downloaded by
customer the first time, it is cached. Then every other page that is
downloaded loads more quickly in the browser window.

By Lec. Teksan Gharti Page 1


● Multi-purpose teams: If we have more than one person working on a
website at once, we can divide up the workload without worrying about
permissions or content management.

● Accessibility: External style sheets and script files are more accessible to
more browsers, because they can be ignored more easily, and because they
provide more options. For example, you can set up a style sheet that is
displayed only for screen readers or a script library that only used by people
on cell phones.

● Backwards compatibility: When you have a site that is designed with the
development layers, it will be more backwards compatible because browsers
that can use technology like CSS , Javascript can still view HTML.

Tier Technology:
A tier technology is a software architecture in which different software
components, organized in tiers (layers), provide dedicated functionality. Three
layers involved in the application namely Presentation Layer, Business Layer and
Data Layer are discussed below:

● Presentation Layer: It is also known as Client layer is the top most layer of
an application. This is the layer we see when we use software. By using this
layer we can access the web pages. The main functionality of this layer is to
communicate with Application layer. This layer passes the information
which is given by the user in terms of keyboard actions, mouse clicks to the
Application layer. For example: login page of Gmail where an end user
could see text boxes and buttons to enter user id, password and to click on
sign-in.

● Application Layer: It is also known as Business Logic Layer which is also


known as logical layer. As per the Gmail login page example, once user
clicks on the login button, Application layer interacts with Database layer
and sends required information to the Presentation layer. This layer acts as a
mediator between the Presentation and the Database layer.

By Lec. Teksan Gharti Page 2


● Data Layer: The data is stored in this layer. Application layer
communicates with Database layer to retrieve the data. It contains methods
that connect the database and performs required action eg: insert, update,
delete, etc.

1-Tier Architecture:

For instance, we have an application which is having only 2 layers. Examples are
Excel files, MS word, etc. In order to work with these applications, users don’t
need the internet. When the user opens the file and fills it with some data and saves
it, it will be saved in a file system. It’s saved in the file system on a computer hard
drive.

So, here, there are only two components in the architecture namely client computer
and file server which is nothing but a hard drive. Since the whole process takes
place inside a single computer, it’s called 1-Tier architecture.

Fig: One Tier Architecture

By Lec. Teksan Gharti Page 3


2-Tier Architecture:

This architecture consists of 2 layers namely the Client layer and the database
layer. When the user opens the form through the client and saves it after
inserting/modifying it, the changes happen in the database layer. Since the client
and database servers are in different systems, it’s called 2-Tier architecture. Not
only there can be one client but also many clients can be connected to the same
database server. In this also no need for a network just LAN is enough. Usually, in
banks, this kind of architecture is followed (At the end of the day the stored
transactions in the local server will be moved to the main server).

Fig: 2-Tier Architecture

The client-side (or simply, client): it is the application that runs on the end-user
computer; it provides a user-interface (UI) that handles what the application feels
and looks like and how it interacts with end-user. It may employ and consume
resources on the user's machine (computing device) such as temporary and local
storage, etc.

The server-side (or simply, server): it is the application that receives requests
from the clients, and contains the logic to send the appropriate data back to the
client. Instead of user-interface, the server usually has an application programming
interface (API). Moreover, the server often includes a database, which will
persistently store all of the data for the application.

By Lec. Teksan Gharti Page 4


3-Tire Architecture:

Whenever the web application came into the market, this architecture became
popular. In this, we have a client layer which is nothing but a browser, a database
server where all the data gets stored, and in between both, there will be another
layer named the business logic layer.

As soon as the user sends the request through a client (browser), the corresponding
business logic will get executed. The business logic layer contains business logic in
the form of programs. Depending on the request corresponding business logic gets
triggered and will be sent to the database server. Business logic will give the
response to the client which comes from the database server.

API testing depends on the business logic layer. Usually, this layer is known as an
application server or web server, and the client layer is known as the presentation
layer. The Internet is needed for this type of architecture.

In this architecture, the entire application is organized into three computing tiers

 Presentation tier
 Application tier
 Data-tier

Fig: 3-Tier Architecture

Presentation Tier (Client Tier): It is the user interface and topmost tier in the
architecture. Its purpose is to take request from the client and displays information
to the client. It communicates with other tiers using a web browser as it gives
output on the browser. If we talk about Web-based tiers then these are developed
using languages like- HTML, CSS, JavaScript.

By Lec. Teksan Gharti Page 5


Application Tier (Logic Tier): It is the middle tier of the architecture also known
as the logic tier as the information/request gathered through the presentation tier is
processed in detail here. It also interacts with the server that stores the data. It
processes the client’s request, formats, it and sends it back to the client. It is
developed using languages like- Python, Java, .Net, C#, PHP, etc.

Data Tier (Database Tier): It is the last tier of the architecture also known as the
Database Tier. It is used to store the processed information so that it can be
retrieved later on when required. It consists of Database Servers like- Oracle,
MySQL, DB2 (Developed by IBM), SQLite, MangoDB, etc. The communication
between the Presentation Tier and Data-Tier is done using middle-tier i.e.
Application Tier.

Advantages of Three-Tier Architecture:


 The key three-tier benefit is improved scalability, since the application
servers can be deployed on many machines. Also, the database does not
make longer connections with every client – it only requires connections
from a smaller number of application servers.
 It improves data integrity. Here, all the updated information goes through the
second tier. The second tier can ensure that only important information is
allowed to be updated in the database and the risk of unreliable client
applications corrupting information is removed.
 Security is improved since the client does not have direct access to the
database; it is more difficult for a client to obtain unauthorized data.
Business logic is more secure because it is stored on a secure central server.
 Balancing of load is much easier with division of core business from the
server of the database.
 High performance, lightweight, persistent object.
 Better to re-use.
 Scalability: each item can scale horizontally.
 Performance: Because the presentation tier can cache request, network
utilization is minimized the load is reduced.
 Easy to maintain and modification.
 Improve data integrity.
 Improve security

By Lec. Teksan Gharti Page 6


 The client is ‘thin’. This is the reason behind the use of less expensive
hardware.
 Change management is easier and faster to execute, because program
logic/business logic is implemented on the centralized server.
 The added modularity makes it easier to modify or replace one tier without
affecting the other tier.

Disadvantages of Three-Tier Architecture:


 It is more complex than the 2-tier client-server computing model, because it
is more difficult to build a 3-tier application compared to a 2-tier application.
The points of communication are doubled.
 The client does not maintain a persistent database connection.
 A separate proxy server may be required.
 Network traffic will be increased if a separate proxy server is used.
 The physical separation of application servers containing business logic
functions and database servers containing databases may be something that
affects performance.
 Improve complexity or effort.

N-Tier Architecture (Multi-Tier)


N-tier architecture (with N more than 3) is really 3 tier architectures in which the
middle tier is split up into new tiers. The application tier is broken down into
separate parts. What these parts are differs from system to system.

Tiers are physically separated, running on separate machines. A tier can call to
another tier directly, or use asynchronous messaging (message queue). Although
each layer might be hosted in its own tier but that's not required. Several layers
might be hosted on the same tier. Physically separating the tiers improves
scalability and resiliency, but also adds latency from the additional network
communication.

By Lec. Teksan Gharti Page 7


Fig: N-Tier Architecture

Web Browser: A web browser is application software for accessing the World
Wide Web or a local website. When a user requests a web page from a particular
website, the web browser retrieves its files from a web server and then graphically
renders the page on the user's

Web Server: A Web server handles the HTTP protocol. When the Web server
receives an HTTP request, it responds with an HTTP response, such as sending
back an HTML page. To process a request, a Web server may respond with a static
HTML page or image, send a redirect, or delegate the dynamic response generation
to some other program such as CGI scripts, JSPs (JavaServer Pages), servlets,
ASPs (Active Server Pages), server-side JavaScripts, or some other server-side
technology. Whatever their purpose, such server-side programs generate a
response, most often in HTML, for viewing in a Web browser.

Application Server: An application server is a server that hosts applications or


software that delivers a business application through a communication protocol.
An application server framework is a service layer model. It includes software
components available to a software developer through an application programming
interface

Database Server: A database server is a server which uses a database application


that provides database services to other computer programs or to computers, as
defined by the client–server model.

Cache Server: A cache server is a dedicated network server or service acting as a


server that saves Web pages or other Internet content locally. By placing

By Lec. Teksan Gharti Page 8


previously requested information in temporary storage, or cache, a cache server
both speeds up access to data and reduces demand on an enterprise's bandwidth.
Cache servers also allow users to access content offline, including Rich media files
or other documents. A cache server is sometimes called a "cache engine."

DBMS: It is the software to create and manage databases, allowing users to create,
read, update and delete data in a database.

When to use this architecture?


N-tier architectures are typically implemented as infrastructure-as-service (IaaS)
applications, with each tier running on a separate set of VMs. However, an N-tier
application doesn't need to be pure IaaS. Often, it's advantageous to use managed
services for some parts of the architecture, particularly caching, messaging, and
data storage.

Consider an N-tier architecture for:

 Simple web applications.


 Migrating an on-premises application (local application) to Azure (Cloud
computing platform to host the websites created and operated by Microsoft)
with minimal refactoring.
 Unified development of on-premises and cloud applications.

N-tier architectures are very common in traditional on-premises applications, so it's


a natural fit for migrating existing workloads to Azure.

Benefits
 Portability between cloud and on-premises, and between cloud platforms.
 Less learning curve for most developers.
 Natural evolution from the traditional application model.
 Open to heterogeneous environment (Windows/Linux)

Challenges
 It's easy to end up with a middle tier that just does CRUD operations on the
database, adding extra latency without doing any useful work.
 Monolithic design prevents independent deployment of features.

By Lec. Teksan Gharti Page 9


 Managing an IaaS application is more work than an application that uses
only managed services.
 It can be difficult to manage network security in a large system.

Assignment:

1. Explain Tier Technology with Example.


2. Explain N-Tire Architecture with its benefits.
3. Critically analyze the pitfalls of 3-Tire Architecture compare to N-Tire
architecture.

End of Unit-2

By Lec. Teksan Gharti Page 10

You might also like