3-Tier architecure?

J

JS

As I understand a 3-Tier architecure contains:

1) Presentation layer (JSP sites)
2) Process management layer (where logic on userinput is made)
3) Database management layer

But what is the third layer? Does it only consist of the Database or does it
also include the interface that is made to make operations on the database?


As I understand it it is necessary to make an interface that works as a
connection between the process management layer and the database management
layer. If it is needed to change the database its only necessary to change
the interface. Based on this it does not make sense that the interface is
part of the third layer.

Where can I find more info on this? Have tried to search google but I only
found rather cursory information.
 
J

John C. Bollinger

JS said:
As I understand a 3-Tier architecure contains:

1) Presentation layer (JSP sites)
2) Process management layer (where logic on userinput is made)
3) Database management layer

But what is the third layer? Does it only consist of the Database or does it
also include the interface that is made to make operations on the database?

It consists of the classes by which the application obtains and modifies
its data. If the database itself is considered part of one of the tiers
then it is in the third tier, but the database is not the focus -- in
fact, the application is poorly designed if it is discernible above the
lowest layer that a database is in use at all.

The tier names vary, but I find these more descriptive:

1) Presentation
2) Business Logic
3) Persistence

You could as well call the third layer "Data management", but it
probably isn't conducive to a good mental model to call it "Data_base_
management".
As I understand it it is necessary to make an interface that works as a
connection between the process management layer and the database management
layer. If it is needed to change the database its only necessary to change
the interface. Based on this it does not make sense that the interface is
part of the third layer.

No, you have a misapprehension. The persistence (a.k.a data management)
layer provides everything that the business logic layer needs to access
and modify business data; all interfaces and API for this purpose are
part of the persistence layer. If an underlying database needed to be
changed (in a compatible way) then the data access interfaces and API
would NOT need to change, nor would any higher layer -- only the private
implementation of the persistence layer would change. There is no extra
interface in between layers 2 and 3. If there were, then that would
make it a 4-tier architecture.

A key here is that each layer should depend only on the layer below it
(where that means that the persistence layer depends only on the data
representation). The interfaces exposed by each layer should be kept as
stable as possible, but the internal implementation of each layer may be
more variable.
 
R

Remon van Vliet

The database isnt (shouldnt?) be an integral part of the data managment
layer. This layer simply offers an abstract interface to manage data,
regardless of how or where it is stored. Basically you'd tell this layer to
modify or retrieve data in some way, and depending on the implementation of
the interface, it'd talk to the database, a text file, a spreadsheet etc. In
other words, it hides the details of how the data is stored and managed from
the rest of the application.

Remon van Vliet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top