Expert C# Business Objects by Rockford Lhotka - Chapter 1 - Distributed Architecture

Expert C# Business Objects by Rockford Lhotka - Chapter 1 - Distributed Architecture

----

I will be providing a chapter by chapter summary of Expert C# Business Objects by Rockford Lhotka (Amazon) as well as any thoughts and commentary when appropriate. Enjoy.

Chapter 1 essentially introduces terms, concepts, and a layered architecture that will be used to build a framework, called CSLA (component-based, scalable, logical architecture).

----

In chapter 1, the author introduces us to the concepts and issues surrounding distributed, object-oriented architecture.

Rockford describes n-tier architecture from both a logical and physical perspective. When most people talk about n-tier applications, they're talking about physical models in which the application is spread across multiple machines and different functions: a client, a web server, an application server, a database server, and so on.

A logical n-tier architecture (personally I call this a layered architecure) is about spreading different types of functionality.  The most common logical separation is into a UI tier, a business tier, and a data tier that may exist on a single maching, or on three separate machines - the logical architecture doesn't define those details.

After discussing the impact different logical and physical n-tier architectures have on application complexity, performance, security, scability, etc., Rockford describes the Five Logical Tiers and the Roles They Provide:

  • Presentation - Renders display and collects user input
  • UI - Acts as an intermediary between the user and the business logic, taking use input and providing it to the business logic, then returning results to the user.
  • Business logic - Provides all business rules, validation, manipulation, processing, and security for the application.
  • Data access - Acts as an intermediary between the business logic and data management. Also encapsulates and contains all knowledge of data-access technologies (such as ADO.NET), databases, and data structures.
  • Data storage and management - Physically creates, retrieves, updates, and deletes data in a persistent data store.

Typically in an application, one ends up duplicating the business logic in several logical tiers. You can't trust the browser (for a web application), so one re-checks the business rules in the business layer. You can't trust the business layer, so one re-checks the business rules in the data access area.  After much discussion on where to put the business logic in a distributed application, it is decided that the business logic tier definitely still remains a separate concept from the other tiers, but it's directly used by and tied into both the UI and the data-access tiers.

Once the ideal logical architecture is known, Rockford begins to briefly discuss Business Objects and OOP as well as the concepts of Anchored Objects and Unanchored objects.

  • Anchored object - When an anchored object is "passed" from one machine or process to another, only a pointer, or reference, is passed, not the object itself.
  • Unanchored object - When an unanchored object is "passed" from one machine or process to another, the object is physically copied and passed by value.

Rockford then concludes the chapter by describing how the use of anchored and unanchored objects impact the other tiers, which get us ready for Expert C# Business Objects by Rockford Lhotka - Chapter 2, Framework Design.

posted on Saturday, September 11, 2004 7:01 AM

Main

News

Green Tea

.NET Development

Enterprise Library

Patterns & Practices