BrainDump
  Home arrow BrainDump arrow Page 2 - Developing an Object Oriented Business Com...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

Developing an Object Oriented Business Component Using WCF and Visual Studio 2008
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 16
    2007-10-31

    Table of Contents:
  • Developing an Object Oriented Business Component Using WCF and Visual Studio 2008
  • Understanding the WCF Business Component
  • Understanding the WCF Business Component: Source Code for Entity classes
  • Understanding the WCF Business Component: Source Code for Business Logic
  • Understanding the WCF Business Component: Source Code for “DBHelper”

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Developing an Object Oriented Business Component Using WCF and Visual Studio 2008 - Understanding the WCF Business Component


    (Page 2 of 5 )

    The object oriented approach followed in this article is simple and yet powerful. Let us try to understand the classes included as part of the component.

    The class “Product” (Product.vb) is specially created to hold one row of the “Products” table (of the “Northwind” database) in the form of an object. It is also called an “Entity” class. This is the basic unit of the Business Component to hold the data (which can be passed through tiers).

    The “Products” class (Products.vb) is mainly used to hold more than one row of the “Products” table in the form of a collection. It is also called an “Entity Collection” class. When we need to have a set of rows grouped together as a single object, this class helps us a lot.

    Next comes the “IProductService” interface (IProductService.vb). This defines the skeleton of all services (or operations) offered by our WCF Business Component. Each of these operations works as an interface between the consumer (WCF consumers) and our component. These operations generally interact with databases (or even other business components). As it is an interface, it doesn’t contain any implements of those operations.

    When it comes to implementing the “IProductService” interface, the  “ProductFactoryService” class (ProductFactoryService.vb) enters the picture. It implements each and every operation declared in “IProductService.” This is the true “Business Logic Implementation” class which may include data validations, computations and business calculations, transactions, interaction with databases, populating entity objects, and so forth.

    Database interactions can be directly included as part of “ProductFactoryService.” But it is always better to separate data access into a different class. This approach of separation not only gives you a great advantage as far as scalability (say you wanted to access Microsoft Enterprise Library in future), but also acts as a common data access gateway for all of your business logic implementation classes.

    Now that you understand the object oriented structure implemented as part of WCF Business Component, it is time to go through the code.

    More BrainDump Articles
    More By Jagadish Chaterjee


       · Hai,This is my next contribution following a series on WCF programming using...
     

    BRAINDUMP ARTICLES

    - Introduction to Office Live Workspace
    - Using MS Excel for One-way Analysis of Varia...
    - Comparing Data Sets Using Statistical Analys...
    - Import Blogger Posts into WordPress Using Wi...
    - Download WordPress from an FTP Server and Ru...
    - Install and Run WordPress in XAMPP Local Host
    - What Windows 7 Brings to the Table
    - Virtualization and Sandbox Detection
    - Advanced Firebug Techniques in Windows XP Ho...
    - Editing CSS with Firebug in Windows XP Home
    - Using Firebug in Windows XP Home
    - Migrating to Exchange Server 2007
    - Using System Restore on a Non-Bootable PC
    - Finding Logged on Users and More Scripting S...
    - Developing Macro Commands in MS Excel





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT