- Client - Scripts that enhance the usability of the site and run on the client interface
- Presentation - Objects that display the data in HTML or in a Winform
- Communication - Objects that expose or consume services so the application can be spread across multiple physical or virtual servers.
- Business Logic - Objects that contain the working data and enforce the business rules.
- Data Access - Objects that interact with the database
- Data - The database server
The manditory layers for a web application are Presentation, and Data but if you neglect to include layers in between them you will probably regret it.
If you have a single object that interacts with the web page, enforces the business rules and interacts with the database:
- What are you going to do when you need to expose that information via a web service?
- What will you do if you need to optimize for performance and cache the information in a session variable?
- Or what if you need to add another web server to handle the volume of user demand?
No comments:
Post a Comment