Click here to Skip to main content
14,022,555 members
Click here to Skip to main content
Add your own
alternative version


190 bookmarked
Posted 21 Sep 2010
Licenced CPOL

Enterprise Application Architecture: Designing Applications and Services in .NET - Part I

, 27 Sep 2010
Rate this:
Please Sign up or sign in to vote.
A guided tour of the distributed enterprise application design in .NET


This article is an attempt to show how to implement distributed application in .NET Framework from scratch. Indeed I can share my experience which I hope will be useful for architects (obviously beginners in architecture design) or a lead developer wants to become an architect to start with. The application will contain a simple web client CustomerOrderManagement System with our own distributed application platform.

The application will cover the following parts:

  • Part 1 (Distributed Application Layers with project details): Learn about what is layered design in distributed environment and how we are going to name it while implementing the actual app.
  • Part 2 (Database and Library Design): Learn about database design and implementing library which interacts with Edmx container.
  • Part 3 (Engine and Service Managers design): Learn how to implement the engine which has core business logic and implementing the actual WCF service with service contracts, and also how to test the service using test client.
  • Part 4 (Client implementation): Learn how to implement the actual client with MVVM pattern which invokes services.

I will try to post the remaining parts ASAP.


In order to run WCF service, Database design and Silverlight application, you need the .NET Framework version 3.0, or greater. Windows Vista has the .NET Framework v3.0 installed by default, so you only need to install it if you have Windows XP SP2. To develop distributed enterprise applications, you should have Visual Studio 2008 or a later version of Visual Studio, SQL Server Management Studio Express 2005 and also the Windows SDK. Article source uses VS2010 and SQL Server Management Studio Express 2005.

Why Should I Read This Article?

You can ask this question when you read the title of the this article. If you are an architect or a lead developer who aspires to architect solutions, spend some time on this (sorry to take your valuable time). When you complete this article, you will feel that you can design any complex application very easily. I am pretty sure about this. However I am not going to talk about design principles in depth. If you want, you can learn it from Microsoft site which describes everything very clearly. In my view, describing the concepts theoretically again and again without practical implementation doesn’t make sense. So I will describe directly what, why and how to do that in real time. I always like action instead of reading action story:). Designing complex application is not an easy task. As everyone knows, many decisions need to be taken at the architecture, design, and implementation levels. These decisions will have an impact on the abilities of the application security, scalability, maintainability, and availability. This article will help you to design your application with clear separation between the layers such as Data Layer, Business Layer, Service Layer and Presentation Layer from scratch. Let’s start with action.

What Are These Layers and What Should They Provide?

Let's start by visiting each of these layers and discuss what these layers should provide and what they should not. Figure 1 shows the simplified logical component layers that this article uses to design the architecture. I am not going to include many components here again. Just see figure 1 and understand the purpose of this article right away.


(Figure 1 – Enterprise Application Layers)
  • Presentation Layer - Contains user related functionality for managing user interaction with the system, and generally consists of service calls for communicating with business logic through service layer.
  • Service Layer - Consists of service contracts and message types to communicate with the business logic to separate the business layer as an independent layer. Also this layer can be located on different tiers, or they may reside on the same tier.
  • Business Layer - This layer implements the core functionality of the system, and encapsulates the relevant business logic. It generally consists of components, some of which may expose service interfaces that other callers can use.
  • Data Access Layer – This layer communicate with database to retrieve and save the data in database using its own context. This data access layer exposes generic interfaces that the components in the business layer can consume.
  • Data Layer – This layer contains the actual business raw data. DBA can design and maintain this layer.

How Do We Implement and By Using What Technologies?

Let’s take figure 1 and add another figure along with that to describe how to implement customer order management enterprise application from scratch. Before I start discussing, I will consider some component from the layers as platform. Because this platform can be hosted anywhere and client can consume whatever they need through network. This is called distributed environment. Here we will consider our business layer, service layer and data access layer as a single platform. So those multiple client platforms (Mobile, Web, etc) can utilize our COMS(CustomerOrderManagement System). This is the major advantage of our COMS. See figure 2 and get an idea about how we are going to implement our COMS platform with technology details.

Note: Please note that COMS refers to the CustomerOrderManagement System throughout the article.

AppLayerWithProjectDetails.png - Click to enlarge image

(Figure 2 – Enterprise Application Layers With Project Details)
  • Service Libraries (Data Access Layer) - This interacts with entity framework through edmx entity container and also provides data to the service engines. We will talk more about this when we come to the library implementation.
  • Service Engines (Business Layer) – This contains core business logic implementation and it interacts with service library to get the actual database without contacting database directly. All the business validation should be implemented here for extensibility. We will talk more about this when we come to the engine implementation.
  • Service Managers (Service Layer) - This layer exposes all the COMS system functionality as WCF service which can be accessed by client from any platform. Manager never interacts with database or library directly. Because business layer contains all the validation which needs to be invoked before sending the response to the client. We will talk more about this when we come to the service manager’s implementation.
  • Client (Presentation layer) – The actual user interface which calls services. This can be any rich client, web client or mobile client or another service call. I am going to use Silverlight for implementing web client in this article. If it’s possible, I will try to post some mobile UI implementation also for testing our COMS platform as part of this article.

To be frank, I don’t know about Mobile app implementation, so I will learn and explain in one part how to make use of our COMS platform services in mobile platform. But you have to trust me and wait for a couple of weeks:).


  • Initial version of this article created on 09/20/2010
  • Published on 09/21/2010
  • Part-II link updated on 09/27/2010


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior) Logitech Engineering & Design (India) Pvt. Ltd.
India India
Venugopal works as a Senior Software Engineer in Logitech Engineering & Design (India) Pvt. Ltd. He hold a Masters in Computer Applications and has 4+ years experience in C#, XAML, Silverlight & WPF.

Venugopal firmly believes "technology is impermanent, change is not"!. While he has strong technical inclination towards MS technologies, he is deeply passionate about pursuing his career in Windows7-WPF and Silverlight Technology.

Venu engages in a wide gamut of temperamental hobbies ranging from making friends, traveling, helping his friends studies. To murmuring songs and watching movies in leisure time.

You may also be interested in...

Comments and Discussions

PraiseThank You! Pin
Priyanka Kale14-Mar-18 20:01
memberPriyanka Kale14-Mar-18 20:01 
GeneralMy vote of 5 Pin
Rakesh690612-Mar-14 3:48
memberRakesh690612-Mar-14 3:48 
GeneralMy vote of 5 Pin
Nikhil_S11-Oct-12 0:19
professionalNikhil_S11-Oct-12 0:19 
GeneralMy vote of 4 Pin
ecunha4-Oct-12 1:10
memberecunha4-Oct-12 1:10 
GeneralMy vote of 5 Pin
Kanasz Robert28-Sep-12 7:10
memberKanasz Robert28-Sep-12 7:10 
Generalthanks for sharing - have 5 Pin
Pranay Rana17-Jan-11 1:40
professionalPranay Rana17-Jan-11 1:40 
GeneralThird part posted. Pin
venugopalm15-Nov-10 0:13
membervenugopalm15-Nov-10 0:13 
GeneralMy vote of 4 Pin
ak_netchat1-Nov-10 6:48
memberak_netchat1-Nov-10 6:48 
GeneralRe: My vote of 4 Pin
venugopalm8-Nov-10 2:34
membervenugopalm8-Nov-10 2:34 
GeneralMy Vote of 5 Pin
Member 381239618-Oct-10 9:00
memberMember 381239618-Oct-10 9:00 
GeneralMy vote of 5 Pin
Member 381239618-Oct-10 8:55
memberMember 381239618-Oct-10 8:55 
GeneralRe: My vote of 5 Pin
venugopalm8-Nov-10 2:34
membervenugopalm8-Nov-10 2:34 
GeneralMy vote of 1 Pin
t_rex10-Oct-10 12:41
professionalt_rex10-Oct-10 12:41 
GeneralRe: My vote of 1 Pin
venugopalm8-Nov-10 2:33
membervenugopalm8-Nov-10 2:33 
GeneralMy vote of 4 Pin
maxtyrann29-Sep-10 3:35
membermaxtyrann29-Sep-10 3:35 
GeneralRe: My vote of 4 Pin
venugopalm8-Nov-10 2:35
membervenugopalm8-Nov-10 2:35 
GeneralI'd like to see more on when to use this architecture Pin
shteff25-Sep-10 20:34
membershteff25-Sep-10 20:34 
GeneralRe: I'd like to see more on when to use this architecture Pin
venugopalm27-Sep-10 2:39
membervenugopalm27-Sep-10 2:39 
GeneralMy vote of 1 Pin
Simon Dufour24-Sep-10 5:41
memberSimon Dufour24-Sep-10 5:41 
GeneralRe: My vote of 1 Pin
venugopalm27-Sep-10 1:07
membervenugopalm27-Sep-10 1:07 
NewsSecond part almost ready [modified] Pin
venugopalm23-Sep-10 5:39
membervenugopalm23-Sep-10 5:39 
NewsRe: Second part almost ready Pin
venugopalm27-Sep-10 1:09
membervenugopalm27-Sep-10 1:09 
Generalgood start, but I want more Pin
60webgun22-Sep-10 14:32
member60webgun22-Sep-10 14:32 
GeneralRe: good start, but I want more Pin
venugopalm22-Sep-10 19:22
membervenugopalm22-Sep-10 19:22 
GeneralMy vote of 3 Pin
Praveen Nair (NinethSense)22-Sep-10 4:27
memberPraveen Nair (NinethSense)22-Sep-10 4:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.190417.4 | Last Updated 27 Sep 2010
Article Copyright 2010 by venugopalm
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid