Chapter 1: Introducing Visual Studio 2005


In this chapter, we'll provide a brief overview of Microsoft® Visual Studio® 2005. We'll show you some of the features of the integrated development environment (IDE) to provide some context for the extensibility and customization discussion throughout the rest of the book. And finally, we'll discuss the extensibility features that make Visual Studio 2005 an extremely attractive tool for programmers who are looking to customize and extend their development environment.

What Is Visual Studio 2005?

Visual Studio 2005 is the latest version of Microsoft's Visual Studio line of development tools. Visual Studio 2005 has a long lineage, running from its early roots as the IDE that hundreds of thousands of Microsoft Visual Basic® developers used on Microsoft Windows® starting in the early 1990s. A second ancestor, Microsoft Visual C++® 1.0, was released in 1993 and became the standard platform for C++ developers worldwide. These two IDEs were finally united in Microsoft Visual Studio .NET 2002 and Visual Studio .NET 2003. Visual Studio .NET 2002 was the first IDE for the Microsoft .NET platform and was used to develop applications for the 1.0 version of that product. Visual Studio .NET 2003 was used to build .NET Framework 1.1 applications and added a number of enhancements to the original product.

Visual Studio 2005 uses the .NET Framework 2.0 as the class library and runtime for applications built in the managed languages that ship with the IDE. These languages include Visual Basic 2005, Microsoft Visual C#® 2005, Visual C++ 2005, and Microsoft Visual J#® 2005. In the case of Visual Basic, Visual C#, and Visual J#, all applications built with Visual Studio 2005 require the .NET Framework 2.0 common language runtime (CLR), though it is possible to target an application to a previous version of the CLR. Visual C++ 2005 can be compiled as a managed .NET Framework application, requiring the CLR, or it can be compiled as a native application, meaning that no runtime is required for the application to run in Windows.

The .NET Framework and the CLR offer a number of features that developers can take advantage of when building programs. These include an extremely large and rich class library from which you can build applications, a runtime that takes care of memory management through efficient garbage collection, and a flexible security model that allows administrators to control the execution of code deployed to corporate networks and the Internet.

Developing for .NET

One purpose of the .NET Framework is to simplify application development and deployment. This extends to applications that are run locally or remotely or that are distributed over the Internet. This simplification is achieved through a CLR that provides a managed execution environment available to any language that targets the runtime. The functionality this execution environment provides is made available to these languages through the .NET Framework class library.

The Common Language Specification (CLS) specifies what a .NET-compliant language must provide to the system. The common type system (CTS) ensures that any types created by a language conforming to the CLS can be consumed by any other CLS-compliant language.

Languages that target the CLR are compiled to Microsoft intermediate language (MSIL). These applications are compiled as PE (portable executable) files and DLLs, so to users they look just like any Windows-based applications. The MSIL code in these files is then JIT-compiled to machine instructions locally at run time. All of this means that any CLS-compliant language that targets the CLR will look like any other language to the runtime and can act and be treated as a first-class citizen. For example, a Visual Basic program will have the same base functionality as a Visual C# program or even a managed C++ program.

Tip 

For a detailed look at the architecture of .NET, take a look at Applied Microsoft .NET Framework Programming by Jeffrey Richter (Microsoft Press®, 2002).

The managed CLR environment provides some other significant advantages. It's designed to help eliminate versioning conflicts. It's designed to provide an environment that ensures that code is executed safely. And finally, it's designed with an API that is targetable from both Windows-based and Web-based applications.

You don't need to think about the .NET Framework as a monolithic virtual machine that requires constant care and feeding. The .NET Framework provides an environment that can be hosted by unmanaged components. The unmanaged components (such as Microsoft Internet Explorer and the Microsoft ASP.NET runtime) load the CLR and execute the managed code. The managed CLR provides garbage-collection services and security on a number of levels.

For corporate developers, this runtime solves a huge problem. In many shops, the Visual Basic programmers, the C/C++ programmers, and the COBOL programmers are all segregated. They meet to figure out how to functionally interoperate, but in a number of ways they work as individual teams inside the same space. In a shop that targets the CLR, development becomes a little more manageable. The same .NET Framework class library is available across languages. The CTS in the class library ensures that components can be easily shared between .NET languages, as shown in Figure 1-1. These components can even be exposed as Web services.

image from book
Figure 1-1: .NET allows different languages to target a managed environment and to interoperate securely and efficiently.

The CLR provides a target that's available from most of the major programming languages used today. Visual Studio 2005 allows you to build .NET applications in the languages mentioned previously. You can also add support for a number of languages that are available from third-party software vendors, including COBOL, Eiffel, Python, and Perl.

Building Native Applications

In addition to building top-of-the-line .NET Framework applications, Visual Studio 2005 ships with arguably the best C++ compiler in the world. The compiler allows developers to build high-performance native applications that can take advantage of the latest hardware features shipping today. Most native applications on Windows are built using the C++ libraries in addition to the system libraries in Windows. Native applications are often built using the Microsoft Foundation Classes (MFC) and the Abstract Template Library classes (ATL). In Visual Studio 2005, these libraries are version 8.0 and are compiled using the updated security and performance features of the Visual C++ compiler.

.NET Framework and native describe only the base functionality of the applications that you can build using Visual Studio 2005. In either case, you can create running applications with Notepad and the Command Window. The power of Visual Studio 2005 lies in its ability to empower users to build, test, and debug powerful applications quickly and easily.




Working with Microsoft Visual Studio 2005
Working with Microsoft Visual Studio 2005
ISBN: 0735623155
EAN: 2147483647
Year: 2006
Pages: 100

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