Wednesday, July 15, 2009

Design Enterprise Application with VS2008

Microsoft Visual Studio 2008 gives us easy way design an enterprise application. Here I will demonstrate step by step process of designing application using MS Visual Studio 2008.

Create a new application design project:
1. From File menu select New>Project.
2. From new project dialog box select Distributed System project type and Application Design from templates.
3. Put ERP in name and press OK button. Application design window opens.


Design the system:
1. From Toolbox drag an ASP.NetWebApplication to Application Design window.
Set the following properties:
Name: ERP
Project: ERP
Default Class Namespace: Erp.Web.UI
Language: Visual C#
Project Location Type: File System
Target Framework: .NET Framework 3.5
Template: ASP.NET Web Site
Web Content: Dynamic

2. Drag an ASP.NetWebService to Application Design window.
Set the following properties:
Name: POSService
Project: POSService
Default Class Namespace: POSService
Language: Visual C#
Project Location Type: File System
Target Framework: .NET Framework 3.5
Template: Empty Web Site
Web Content: Dynamic

3. Drag another ASP.NetWebService to Application Design window.
Set the following properties:
Name: ParserService
Project: ParserService
Default Class Namespace: ParserService
Language: Visual C#
Project Location Type: File System
Target Framework: .NET Framework 3.5
Template: Empty Web Site
Web Content: Dynamic

4. Drag a WindowsApplication to Application Design window.
Set the following properties:
Name: POSClient
Project: POSClient
Language: Visual C#
Target Framework: .NET Framework 3.5
Template: Windows Forms Application

5. Drag another WindowsApplication to Application Design window.
Set the following properties:
Name: ParserClient
Project: ParserClient
Language: Visual C#
Target Framework: .NET Framework 3.5
Template: Windows Forms Application

6. Drag an External Database and set name properties to ErpDB.

The design should look like the following figure:





























Now we will connect each application end point.

Connect ASP.NetWebApplication to Database:
1. Right click on ASP.NetWebApplication.
2. Select Connect. Create connection window appears.
















3. Select ErpDB from Application drop down list in Connect to panel and click OK.
4. SQL Server Connection Properties window will appear. Provide your connection information and click OK button. Connection to ERP and ErpDB will be established.

This way connect:
POSService to ERP ,
POSClient to POSService,
ParserService to ERP and
ParserClient to ParserService .

Match your design to following figure:






























Our design is OK. Now we will implement the design so that we get application framework.
Implement the design:
1. Right click on design window. Select Implement All Applications.
2. Confirm Application Implementation dialog box appears. Press OK button.

Notice that in Solution Explorer, you will see five new projects added. Now your framework is ready and go ahead with further coding.

No comments:

Post a Comment