Getting Started with Visual Studio .NET


Three different versions of Visual Studio .NET 2003 are available: Enterprise Architect, Enterprise Developer, and Professional. The examples and templates in this book require Visual Studio .NET Enterprise Architect or Enterprise Developer. Most concepts and examples work with the Professional version but will be incomplete.

Exploring the New Solution Options

In Visual Studio .NET, application source code is grouped into two entities: projects and solutions. Projects implement a specific business function, and solutions are collections of projects (similar to the workspace concept in Visual Studio 6.0). As each chapter progresses, you will implement a small piece of the overall enterprise application. The source code for each chapter will be packaged as projects within the IssueTracker solution.

To begin, start Visual Studio .NET 2003 and click the New Project button in the Projects tab. The New Project dialog box presents several templates related to creating an enterprise application. Expand the Other Projects tree node and select the Enterprise Template Projects node (see Figure 1-7).

click to expand
Figure 1-7: The New Project dialog box

The following project templates become available:

Visual C# Distributed Application: This template creates a C# version of the standard Distributed Application solution. This template consists of seven layers , allowing for multiple projects of different programming languages within each layer of the application. This creates either a Windows application or a Web application.

Visual C# Simple Distributed Application: This template is a simpler version of the standard Distributed Application template. This template creates applications that have a simpler structure than the Visual C# Distributed Application template. Each application layer has only a single language project. This creates both a Windows application and a Web application.

Visual Basic Distributed Application: This template is a Visual Basic version of the standard Distributed Application template. This template consists of seven layers, allowing for multiple projects of different programming languages within each area of the application. It includes both a project that produces a Windows user interface and a project that produces a Web user interface.

Visual Basic Simple Distributed Application: This template is a simpler version of the standard Distributed Application template. This template creates applications that have a simpler structure than the Visual Basic Distributed Application template. Each application layer has only a single language project. This template includes a project that produces a Windows user interface and a project that produces a Web user interface.

Distributed Application: This template provides the same structure as the C# and Visual Basic Distributed Application templates but without the initial language projects. This template creates large-scale, mixedlanguage applications by adding building blocks (projects) to each layer. Conversely, when you select the C# or Visual Basic Distributed Application template, each layer already includes a C# or Visual Basic project.

Enterprise Templates Project: This is an empty template that does not include any language projects or associated policy. Architects can use it to create their own templates.

As mentioned, each enterprise project is composed of multiple layers. Each layer is implemented as a separate project that abstracts a specific enterprise function. These layers include the following:

Business Facade: This project is often used to provide a consistent interface to the underlying business objects and to isolate the client from changes to the underlying business logic. It lives either between the client and the business logic or between the Web service projects and the business logic layers. You abstract application functionality into high-level methods exposed within this layer.

Business Rules: This project contains the business objects themselves and the rules applied to them. They implement the business entities or objects of the system. The business rules of the system are coded within these objects; however, some of the business rules might actually be coded in the database within stored procedures and triggers.

Data Access: This project performs the function of retrieving data from and sending data to the database. It accomplishes this using ADO.NET data access objects and SQL Server stored procedures.

System Frameworks: This project manages the parts of the application that provide system service, system infrastructure functionality, or other shared functionality. This functionality might not be specific to any given application.

ASP.NET Web Service: The Web Service project provides public Web interfaces that are accessible to Web service clients. It can be present independent of the type of user interface (such as a Web client or a Windows client), if any, used in your application. It is one of the ways of remoting application servers. This project is similar to the Business Facade layer except that other Web service clients access its methods, which means it is not limited to being accessed by other parts of the application.

WebUI: This project implements a Web application that renders Web pages to present data, capture user input, perform data validation, provide task guidance to users, send user input to the Business Facade project, and receive results from the Business Facade project.

WinUI: This project implements a Windows form application that renders a user interface to present data, capture user input, perform data validation, provide task guidance to users, send user input to the Business Facade project, and receive results from the Business Facade project.

Implementing the Solution

Select Enterprise Template Projects from the Project Types list box. Next , select Visual C# Simple Distributed Application from the Templates list. Finally, enter IssueTracker in the Name box (as shown previously in Figure 1-7), and click the OK button. Visual Studio .NET will prompt you for a Uniform Resource Locator (URL) that points to an Internet Information Server (IIS) location, as illustrated in Figure 1-8. In most cases, the default localhost setting is fine.

click to expand
Figure 1-8: Visual Studio .NET can store Web projects on any accessible IIS Web server.

Visual Studio .NET will quickly generate the new solution in different locations. The bulk of the source code will appear within the following location:

 \My Documents\Visual Studio Projects\IssueTracker 

The generated Web service project code will appear within the following location:

 \inetpub\wwwroot\IssueTracker\IssueTracker_WebService 

The generated Web application project code will appear within the following location:

 \inetpub\wwwroot\IssueTracker\IssueTracker_WebUI 

The IssueTracker solution contains seven projects that implement the business facade, business rules, data access, system framework access, Web user interface, and desktop user interface. As the development of the IssueTracker application continues, new projects will appear within the same solution. Visual Studio .NET displays each project in the Solution Explorer, as illustrated in Figure 1-9.

click to expand
Figure 1-9: The empty enterprise solution in Visual Studio .NET

Once the solution has been created, development of the IssueTracker enterprise application can begin. Over the next few chapters, you will fill in the individual projects under this solution that handle database access, directory services accessibility, messaging, business process automation, e-mail support, and the user interface. Each project will be complete with source code and a test utility.




Developing. NET Enterprise Applications
Developing .NET Enterprise Applications
ISBN: 1590590465
EAN: 2147483647
Year: 2005
Pages: 119

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net