position
Web Building : Web Applications
Business Tier

Business Rules and Logic

The business tier implements business logic.

The following diagram shows one of the many possible structures of a business tier.

“Business Abstraction” is the translation of a reality into programming objects.

For instance, here is how one would express “I’d like to order 5 bananas” in the C# programming language:

com.torrentuniverse.shopping.OrdermyOrder;
com.torrentuniverse.shopping.ItemmyItem;
myOrder=newcom.torrentuniverse.shopping.Order();
myItem=newcom.torrentuniverse.shopping.Item();
myItem.ProductId="Bananas";
myItem.Quantity=5;
myOrder.Add(myItem);

Here, the classes named “Order” and “Item” replicate the behavior of a shopping cart and a purchasable good.

Note that once the concepts of orders and items are expressed in a computer language, they can be re-used and applied to different processes (not just buying bananas).

“XML Serialization” is the action of converting business data into XML markup and back again in order to ease data exchange among different components on different platforms.

The order mentionned in the preceding example would look as follows:

<Order>
<Item>
<ProductId>Bananas</ProductId>
<Quantity>5</Quantity>
</Item>
</Order>