Sei sulla pagina 1di 6

1. Explain Tier-Architecture?

In software engineering, multi-tier architecture (often referred to as n-tier architecture) is a client-server architecture in which the presentation,
the application processing, and the data management are logically separate processes. For example, an application that uses middleware to service
data requests between a user and a database employs multi-tier architecture. The most widespread use of "multi-tier architecture" refers to three-
tier architecture.
The concepts of layer and tier are often used interchangeably. However, one fairly common point of view is that there is indeed a difference, and
that a layer is a logical structuring mechanism for the elements that make up the software solution, while a tier is a physical structuring
mechanism for the system infrastructure.

Single Tier
When automation first hit business, it was in the form of a huge "Mainframe" computer. Here, a central computer
served the whole business community and was accessed via dumb terminals. All processing took place on a single
computer - and therefore in one place. All resources associated with the computer (tape and disk drives, printers
etc.) were attached to this same computer. This is single tier (or 1-tier) computing. It is simple, efficient,
uncomplicated, but terribly expensive to run.

Figure 1 - Single Tier Architecture

Figure 1 shows a physical layout of a single tier environment. All users run their programs from a single machine.
The ease with which deployment and even development occurs makes this model very attractive. The cost of the
central machine makes this architecture prohibitive for most companies, especially as system costs and return on
investment (ROI) are looked at carefully nowadays.

Dual Tier Environments


In order to provide personal software which ran on personal computers, a model needed to be found where the enterprise could still share data.
This became known as the client/server model. The client (on the personal computer) would connect to a central computer (server) and request
data. This model is also quite easy to implement. All you need is an RDBMS, such as MS-SQL Server 2000, running on Windows 2000 Server
and a PC running TCP/IP. You application connects to the database server and requests data. The server just returns the data requested.

Figure 2 - Client Server Physical Model Figure 3 - Logical View of a 2-Tier Architecture

3-Tier architecture:
With the advent of the Internet, many people jumped to the conclusion that the days of the mainframe were back.
Client/Server had obviously failed, personal computers had failed and, above all, Windows was on its way out. A
host of "thin client" applications were developed usually by overzealous IT managers hoping to wrest computing
control back from the users. TCO - Total Cost of Ownership was the watchword of the day and everyone was
consumed by downsizing the client. Thus 3-tier applications were born. These applications run the traditional
client/server model but from a web server.

Figure 4 3-Tier Thin Client Architecture Figure 5 - Logical 3-Tier View

The client only displays the user interface and data, but has no part in producing the results. Figure 4 shows the
physical representation of such architecture, whilst Figure 5 gives a logical view.This architecture presents one
advantage over the former: a well implemented web server can manage and pool database connections as well as
running the applications. The disadvantage is that the web server is quickly overwhelmed by requests and must
either be clustered or upgraded.

Overview of an N-Tier System

The Data Layer

The data layer can usually be split into two separate layers. The first will consist of the set of stored procedures
implemented directly within the database. These stored procedures will run on the server and provide basic data
only

.
Figure 6 - N-Tier Logical Model

The next layer consists of a set of classes which call and handle the stored procedures. You will need one class per
group of stored procedures which will handle all Select, Insert, Update, and Delete operations on the database.
Each class should follow OO design rules and be the result of a single abstraction - in other words handle a single
table or set of related tables. These classes will handle all requests to or from the actual database and provide a
shield to your application data. All requests must pass through this layer and all concurrency issues can and must
be handled here. In this way you can make sure that data integrity is maintained and that no other source can
modify your data in any way.If your database changes for any reason, you can easily modify your data layer to
handle them without affecting any other layers. This considerably simplifies maintenance.

Business Rule Layer

This layer is implemented in order to encapsulate your business rules. If you have followed best practices, you will have created a set of
documents which describe your business. In the best of cases, you will have a set of use-cases describing your business in precise detail. From
this you will have been able to create a class association diagram which will help you create your business layer.
Workflow Layer

This is one of the optional layers and deals with data flow to and from your system. It may or may not interact
directly with the user interface, but always deals with external data sources.For instance, if you send or receive
messages from a messaging queue, use a web service for extra information, send or receive information to another
system, the code to handle this would be in this layer. You may wish to wrap your whole application in XML so that
the choice of presentation layer can be expanded. This would also be handled in the Workflow Layer.

Presentation Layer

This layer handles everything to do with the presentation of your system. This does not just include your windows
or web forms (or your user interface), but also all the classes which will help you present your data.

2. Explain Client-Server Para diagram?


Client-server describes the relationship between two computer programs in which one program, the client program, makes a service request to
another, the server program. Standard networked functions such as email exchange, web access and database access, are based on the client-
server model.

OVERVIEW

Server program sends copies of documents on request.


Requires computer on Internet and server software always running.
Client program sends message to server to request copy of document
Clients and servers communicate via TCP/IP
Client and server may establish "persistent connection" so that all pages after first arrive more quickly

Clients:
Initiate communication.
Are often easier to built than servers since they usually do not require special system privileges.

Server:
Any program that waits for incoming communication requests from a client and performs the requested service.
Usually require system privileges, so when designing them, you must be careful not to pass those privileges on to
the client.
The client-server model has become one of the central ideas of network computing. Many business applications being written today use the
client-server model. So do the Internet's main application protocols, such as HTTP, SMTP, Telnet, DNS.

3. Implement a Library-Management System By using XM(Tree –Based Structure and Module)

The Library Management System is designed & developed for a receipt and issuance of books in the library along with the student’s details. The
books received in the library are entered in Books Entry form and the new student is entered in the student entry form. When the student wants to
get the desired book the same is issued on the availability basis to the student. The issuance and due date for the returning of the book is also
entered into the Book Issue form under third menu Book Issue. The student has to pay the fine if any on the basis of no. of days delayed deposit
of the book in the library. . We can issue the books to the students and maintain their records and can also check how many books are issued and
stock available in the library

TABLE DESIGN
Account : Table

S.No. Field Name Data Type

1 Accno Number

2 Total_limit Number

3 Books_left Text

4 Status Text

Issue : Table

S.No. Field Name Data Type

1 Bno Number

2 Id Number

3 Issue_date Date/time

4 Due_date Date/time

5 Copies_available Number

User : Table

S.No. Field Name Data Type

1 Id Number

2 Roll_no Number
3 Name Text

4 Branch Text

Book : Table

S.No. Field Name Data Type

1 B_no Number

2 ISBN Number

3 Subject Text

4 Name Text

5 Author Text

6 Publisher Text

7 Editor Number

8 Copies Number

9 Cost Number

Issue_return : Table

S.No. Field Name Data Type

1 B_no Number

2 Id Number

3 Issue_date Date/Time

4 Due_date Date/Time

5 Return_date Date/time

6 Fine Number

7 Copies_available Number

4. Use of CSS using proper example?

Style sheets exist, above all, to enable the following principle to be put into practice.
Web pages should separate content from appearance.

• The traditional HTML approach was to "hardcode" all of the appearance information about a page. So you want all your headings in
courier, and at different point sizes to the sizes built into browsers? Then, for every heading, in every page, set the font size and face
properties. You've got more than 100 pages? That is a lot of editing, and a lot of re-editing if you decide to modify the appearance of
your pages later. And with all of that editing there is plenty of possibility for introducing errors.
• With CSS, you can decide how headings should appear, and enter that information once. Every heading in every page that is linked to
this style sheet now has that appearance. Want to make every heading of level 3 more obviously different from those of level 2? Edit
the style sheet, and every such heading now has the altered appearance.
• With cascading style sheets, whole organizations can share a small number of style sheets, ensuring consistency across the site with no
need for constant updating and editing to accommodate changes
Think of a style sheet as a set of instructions, suggesting to a web browser how to draw a page. Note that I say "suggest" not "tell", because CSS
does not force a browser to display a page in particular way, it merely suggests to the browser how the page should be displayed. This is an
important distinction.

Here is a simple example.


body
{
font-family: Verdana, "Minion Web", Helvetica, sans-serif;
font-size: 1em;
text-align: justify
}
h1
{
font-family: Verdana, sans-serif;
font-size: 1.3em
}
code
{
font-family: Courier, sans-serif;
font-size: 1em
}
.note
{
background-color: #003333;
border-width: thin;
border-color: black;
border-style: ridge;
color: white;
font-family: Verdana, Geneva, sans-serif;
font-size: .9em;
vertical-align: text-bottom
}
Like an HTML document, a Cascading Style Sheet is just a simple text file. But unlike an HTML document, you don't need a special declaration
at the top of the file to say that this is a style sheet. The name of the file should however end with a .css suffix.

00000000-0000-0 False

Potrebbero piacerti anche