Presentation layer depends on ????

R

rbg

Hi,

I am trying to understand the layering concept with the ASP.NET 2.0
apps.

I have a ASP.NET 2.0 Web app which has 3 layers

Presentation layer which contains UI elements and Input validation
logic

Business layer which contains Business Rules, Business Objects and
Business Workflow

DataTier which contains database tables and stored procedures

I understand that each layer is a independent entity and can be
considered a blackbox by all other layers. Thus each layer can be built
independently of the other layers.

But in the above scenario can somebody tell me does the Presentation
layer depend on the Business layer only or does it depend on the
DataTier as well since there is Input validation involved in the
Presentation layer????

Also does the Business layer depend on the DataTier???

Thanks
 
J

Jeeran

Hello rbg,

I am not sure what you mean exactly by "depend on", but simply put, the Presentation
Layer "uses" the business layer, which in turn uses the "Data Layer".

The Presentation layer should never communicate directly with the Data layer,
if it does, then you should re-think your architecture. The business layer
should be the is the only one that communicates directly with both as it
carries user input and commands from the presentation layer to the data layer
and sends back the resulting data from the Data layer to the presentation
layer. The business layer also functions as the thinking part of your application
with some functions not needing any database access, like calculations, business
logic descision making, data conversions and manipulation, file access ...etc

The presentation layer is best reserved for receiving and validating user
input in addition to formatting the output on the screen.

I hope this helps.
 

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

Top