Visual Studio Team System 2008

Visual Studio 2008 offers developers a complete environment for creating applications with support for .NET 3.5. With VS2008, Microsoft introduced several editions, from stand-alone versions to those that provide complete software live-cycle management. The latter versions are known as Visual Studio Team System, and it includes tools for source code management, design, project collaboration, and a lot more. VSTS 2008 is available in editions targeted to specific purposes in a large team environment, or as an all-in-one. The versions of VSTS 2008 are:

· VSTS 2008: Team Suite: includes all the tools

· VSTS 2008 Architecture Edition: includes tools specific to creating and validating distributed application designs

· VSTS 2008 Database Edition: includes tools for working with databases

· VSTS 2008 Development Edition: includes tools for code optimization and unit testing

· VSTS 2008 Test Edition: includes tools for comprehensive testing

· VSTS 2008 Team Foundation Server: includes version control and collaboration tools

In practice, most of the VSTS editions have the same base toolset, allowing all the usual code development, testing, and compilation as traditional Visual Studio 2008 editions. The differences in the four "specialty" editions is at first glance subtle, but there are notable and important tools and capabilities in each that helps tailor Visual Studio to their roles. The Team Suite edition includes all the tools in the four separate editions, these comment apply to the Team Suite edition too.

Visual Studio Team System does not provide any intrinsic programming language, but does allow for the use of several supported programming languages from Microsoft, and new languages can be added. New languages and new features can be added to VSTS through the use of packages, which, when installed as part of the Visual Studio environment, allows new functionality to be available as a service to Visual Studio. There are three services provided with the IDE itself by default. The SVsUIShell package provides the VS user interface, including toolbars, icons, tabs, and so on (which also allows this interface to be heavily customized, if desired). The SVsSolution package provides project functionality. Finally, SVsShell allows new packages to be integrated into VSTS. Languages are added to VSTS using the Language Service VSPackage. Each language has its own package that defines the way Visual Studio supports the language from a coding point of view, including which syntax is color-coded, statement-completion rules, brace matching rules, and so on. The language package does not provide the compiler, but defines the way Visual Studio handles the language itself, and the language service can be defined with as native code or as managed code.

A common misconception is that Visual Studio provides source code control support as part of the basic distribution, which is not the case. However, Visual Studio does support the Microsoft Source Code Control Interface (MSSCCI) which defines how a source code control system can be integrated directly with Visual Studio. VSTS is often used with Visual SourceSafe, for example, which was implemented through MSSCCI.

The Visual Studio environment is composed of a number of tools that work together with an integrated interface. The main tools in VSTS are the code editor, debugger, and the designer. One useful feature of Visual Studio is background compilation, which performs compilation while code is being written to allow on-the-fly warnings to be displayed while code is being developed. Most errors detected are marked with a red wavy underline, while most warnings are displayed with a green underline, making it easy to locate errors and warnings in code.

The code editor supports language-specific features such as code completion and syntax highlighting (using colors to visually identify syntax keywords), all based on a VSPackage definition. Code completion is handled by a feature called IntelliSense, which allows for all possible completions for a partial word or structure to be displayed in a pop-up list dialog. More advanced code editor features include bookmarks (for fast navigation through large files), expandable and collapsible code blocks, multi-file search and replace capabilities, and several others. The debugger provides both source-level debugging as well as machine-level debugging. During a build of an application, a debugging module can be attached to the executable to allow for monitoring of a running application. The debugger allows breakpoint and setpoints, as well as watchpoints. The Visual Studio designers are a set of different visual design tools that help you code forms, classes, web pages, and more, using similar (but separate) tools.

VSTS 2008 Architecture Edition

The VSTS 2008 Architecture Edition is designed for architects who have to design distributed applications, especially those that have multiple components as part of a large project. With a set of enhanced tools in the Distributed System Design toolkit, the Architecture Edition is designed to make the design task easier.

The tools exclusive to the Architecture Edition (and Team Suite, of course) include a set of modeling tools for application design (either top-down or bottom-up), the ability to generate ASP.NET Web application projects with a new template property, the ability to define .NET Web service endpoints using Web Services Description Language (WSDL), and a few other features such as the ability to create and share custom prototypes. To create diagrams, Visual Studio Architecture Edition uses a modification of the Visio modelling system, allowing UML-based (Unified Modeling Language) visual representations of the architecture of an application.

The modeling tools included with VSTS Architecture Edition help designers create local and distributed applications through the use of included modeling tools. The Distributed Design Toolkit is not the more traditional UML-based visual tools, but instead are tied to Microsoft's new Dynamic Systems Initiative. There are a number of tools included in the Architecture Edition, including the Application Designer, System Designer, Class Designer, Logical Data Center Designer, and Deployment Designer, all lumped under the title "Distributed System Designers". All these design tools are integrated, allowing a model to build in stages, using the tools in sequence, then evaluated against a deployment design. The final aspect allows you to synchronize the application design diagrams with the source code being built by developers, keeping the design current and reducing obsolete design components.

These design tools are intended to be used in sequence, although in practice most users will bounce around between the tools. The design process starts with the Logical Data Center Designer, which models the servers used for the distributed application. The output from the Logical Data Center Designer is intended to be used by a network architect to model the server and network environment for the application. Each end point between servers is defined, and zones of servers (separated by any criteria you choose such as physical location, logical function, or logical location in the larger network) can be created as needed. From the Logical Data Center Designer, the application itself can start to be modeled using the Application Designer and System Designer.

The Application Designer lets an architect model database or Web-based applications, as well as Web services. The Application Designer output is an application design overview, as well as configuration settings for the application. From this architectural design, a starting project code can be created automatically for developers to use as a base. The Application Designer works through a graphical interface that lets you drag applications from the toolbox and then use connectors to define data interactions between the components:

arch1.png

To properly generate code from this Application Designer model, connection details can be provided as part of the model. For example, when connecting to an external database the database connection strings can be embedded as a property of the connection, so the generated code has this information already in place. Alternatively, these details can be left out to provide a generic design, or if the information is not available.

The System Designer groups two or more applications together to create a larger application, with each piece defined in the Application Designer but integrated together in the System Designer. For example, an architect may use the Application Designer to create a Web Service, a database application, and a Web site separately, and then tie all three into a larger application in the System Designer.

The Deployment Designer lets you validate your architecture by testing against the Logical Data Center design, ensuring the components of the architecture can communicate with each other properly. The Deployment Designer also allows you to validate the architecture against the constraints of the server and network, complying with any constraints imposed in those components.

The final step in the Architecture design tools is the Class Designer, which takes the application design and generates classes from that design. These classes can then be used as a base for the development process, and, with the synchronization aspect of the Architecture tools, any changes to the classes can be passed back to the design diagrams to ensure it is always current.

The tasks provided in the Architecture Edition are often ignored in application development, but using the set of tools including in the system does help reduce the amount of design churn later in the development cycle. It also allows for a clear scope assessment for a distributed application early in the process, including evaluating the network and server architecture required to support the application.

Visual Studio Team System 2008 Architecture Edition now allows architects to create a top-down design. Visual Studio 2005 forced designers and architects to create a bottom-up design, aggregating them into larger system diagrams. This approach requires a complete understanding of the application components in order to produce a workable design, and was not intuitive or useful for most design purposes. The ability to design top-down allows for increasing levels of complexity in the design, building on the framework at each step, and leading to a complete system design that can be created more easily than previously possible.

The Visual Studio Team System 2008 Architecture Edition you can define the larger system approach, deferring details until later. To create a top-down design, a new System Design template has been added which includes all the files needed for a top-down design. When used, a set of application design files (*.ad) are created, along with a system design (*.sd) file.

In use, a high level system design is created by adding blocks for each functional component. Each component has its own system design entry in the Solution Explorer and a block on the system higher-level system design diagram. Then, each system design can be drilled down to more details. Applications are added to the system design by selecting the type of application from a pop-up menu. Details can be left vague, as simple as a name, to allow for expansion later in the design process. Connections between components are drawn using endpoints.

To expand on details in a system design, each system's properties are defined. This is an application design step, and mirrors that of the earlier release of Visual Studio 2005 Team Architect Edition. The choice of a target framework and support for ASP.NET Web applications is added to VSTS 2008. Constraints can be defined as part of the application design which can then be rolled up into overall designs.

As part of the top-down focus in Visual Studio Team System 2008 Architecture Edition, a new feature called 'delegation' has been added. Delegation allows an architect to define a system using a high level of abstraction, then refine the level of detail progressively down through the design. The behavior of a component can be delegated through the endpoints it shares with other components, essentially copying the endpoint details and creating proxy endpoints.

A useful new feature in Visual Studio Team System 2008 Architecture Edition is the ability to use WSDL (Web Service Definition Language) files. When defining an architecture, a "Conform to WSDL" selection is available that allows WSDL files to be used to define properties. The advantage to using WSDL in a design is that as an application is developed, changes in the Web service implementation (methods, classes, signatures, etc) can be automatically reflected in the design without forcing manual modifications to the business logic.

A change in the way designs are created in Visual Studio Team System 2008 Architecture Edition employs the use of architectural roles. Roles allow architects to add metadata to application diagrams, system diagrams, and logical datacenter diagrams which describe the responsibilities each object has within a design. In the simplest cases, these roles will be short labels that describe the role of the component, but it can also include comprehensive details of the responsibilities. As a nice feature, Visual Studio Team System 2008 Architecture Edition allows you to embed documents and links within the metadata descriptions, making access to details of a component and its design specifications easier. The use of roles in a system architecture diagram depends on the designer, but one important use will be for the architect to provide guidance and details to the developers about the specifics of a component.

If there is a flaw in the Architecture Edition implementation, it is the lack of any unit test capabilities. This is a curious omission since unit test was added to the Team Suite Edition, and should be available to all the four smaller Editions. There is also a downloadable "Power Tools" pack for the Architecture Edition. This includes some new class library capabilities for architects and system designers.

VSTS 2008 Database Edition

The VSTS Database Edition us used to manage database interactions better than previous releases of Visual Studio, which required the installation of a separate Database Edition on top of Team Editions. The new additions to the VSTS Database Edition include a lot of user-requested features from the earlier release. These include better processes for defining and managing files, filegroups, tables, and indexes, as well as the ability to specify table and index options directly in their definitions. In addition cross-database references are now supported in the Database Edition, allowing the creation, management, and renaming of these references.

The major change in development practice introduced with the Database Edition is the ability to manage the databases directly as part of the application development process inside Visual Studio, instead of existing VS and using a database tool externally. This allows much better integration between the application and database development efforts, and ensures changes in schema are carried through properly. This also applies to much larger applications, where the database developers and application developers may be distinct and separate roles. By providing a common environment in VS 2008, issues between the two development groups can be reduced. The traditional application-database development process of creating an isolated database, building a project to interact with that database, modify both database and application code iteratively, and deploying both database and application separately can now be more tightly integrated under one development and deployment platform as a single project, greatly simplifying the process. The iterative development environment allows for the database and application code to evolve simultaneously, instead of in isolation from each other. This also greatly enhances the value of daily application builds, since changes in application are immediately made in database (and vice versa).

A Database Project Creation wizard is now added to the Visual Studio interface. While this wizard doesn't really create any application for you, it does provide all the background tasks that used to be done manually with the previous release of Visual Studio. You can define importation of schemas as part of the wizard, as well as database connection strings.

Database schema changes can now be managed through Visual Studio, allowing schema changes to be more rapidly assessed. Changes to a database schema can be managed under version control, just as with application code, allowing rollback in case of problems with changes. With the new development approach in VSTS Database Edition, you can create a new schema (or import an existing one) and the new schema is presented as separate scripts for each database object. A Schema View pane provides a different view of the database from the more typical Solution Explorer view, using the same presentation format as SQL Server itself. A created schema can be deployed to a SQL Server system (either online or private offline instances of all supported SQL Server versions) with a few keystrokes. Alternatively, all the small scripts created by VSTS Database Edition can be merged into one larger script, allowing a schema to be manually created at the SQL Server system. A useful ability is provided by the refactoring wizard, which makes it almost trivial to rename database tables or contents. The wizard will search all code (views, columns, etc) and manage the replacement automatically or under user control.

vsts1.png

VSTS 2008 Database Edition does employ background validation routines (like background compilation) to detect common errors. For example, if you mistype a column name, the code editor can position itself directly at the mistyped entry. Curiously, there is no color coding of the error as there is with language-specific issues. There are several useful tools for comparing databases, for example, as well as schema validation, that makes common errors with tables to be located easily.

Unit test capabilities have been incorporated for database applications with VSTS Database Edition. There is the ability to automatically create suitable unit tests for database objects, as well as the ability to provide (and execute) load tests. Load testing can use random data created y the test case to stress-test a database table. A "Power Tools" downloadable expansion is available for the Database Edition that adds some new features, expanding on the Power Tools that were available for the earlier Visual Studio 2005 for Database Professionals version. There are a few useful additions to the Power Tools package worth noting including the ability to do static code analysis execution to be integrated into a build, a file-based database generator, and a checksum condition unit test.

One useful feature that can be installed as part of the Power Tools release for Visual Studio Team System 2008 Database Edition is the ability to provide T-SQL static code analysis both at build time and directly from a command line. After the code analysis has been run, a DOS console window shows the result file directly.

Also part of the Power Tools add-in is the File Bound Generator. The File Bound Generator can move through a directory and its subdirectories, matching files based on some search criteria you specify, and scan those files. The contents of the files can then be read into a column in a table automatically, either as text or as binary content. The File Bound Generator can be used quickly and can create tables of information that would otherwise require elaborate importation scripts.

Wrap Up

Both the architecture and database editions of Visual Studio Team System 2008 are targeted at specific audiences, but they can, of course, be used by any developer without leveraging the special additions. For developers who regularly work with databases or applications that will access a database, though, the VSTS Database Edition makes the task easier and removes common sources of errors. With the extended capabilities of the Visual Studio Team System 2008 Database Edition, even simpler applications that need a database access component will be created faster, and with fewer errors. Although targeted primarily at SQL Server, the Visual Studio Team System 2008 Database Edition can work with any queryable database product. If that database is SQL-compliant, then all the better. The ability to work with the database itself at the same time as the application is a major advantage, and one database developers will appreciate immediately (no more bouncing from window to window, trying to keep synchronization between table structures and application code!).

The audience for the Visual Studio Team System 2008 Architecture Edition is more limited, targeting as it does designers and architects, but the tools included with the edition make even smaller distributed applications easier to design and, subsequently, develop. Creating a top-down view of an application consisting of several parts is a considerable time-saver over the earlier design-code iteration that resulting in functional and product specifications being no more than a guideline. With proper usage, the Visual Studio Team System 2008 Architecture Edition can save a small team time, effort, and money by reducing code churn and ensuring everyone is on the same design from the start. Even for those without extensive architecture backgrounds, the Visual Studio Team System 2008 Architecture Edition tools lead to a solid product specification that can be used as a code target. The level of detail included in the design is left to the user, but more complete designs up front inevitably mean less churn and effort at the back end.

In this article we've looked at the new Visual Studio 2008 release, with a concentration on the Architecture Edition and Database Edition. In the second article in this series we'll look at the Developer and Test Editions in more detail. These two editions are designed to provide a developer and a tester more features than the standard edition of Visual Studio can include.