• subscribe
January 24, 2002 12:00 AM

Set Sail with Visual Studio .NET

SQL Server Pro
InstantDoc ID #23457

The .NET Framework compiler then combines your source code and the .NET class references into an object called an assembly. An assembly is an .exe or .dll file that contains the Intermediate Language (IL) code along with metadata that identifies the version of the application and all the components the application uses. Including this metadata in the assembly frees .NET applications from any reliance on the registry to locate DLLs and other application components. This metadata effectively puts an end to DLL Hell because it provides exact information about the components that are used in the assembly, including names, versions, and locations.

When a user or application executes an assembly, the CLR parses it, discovering the executable components. The CLR then takes the IL code from the assembly and uses its just-in-time (JIT) compiler to convert the IL into native code that the OS executes. The CLR provides memory management, thread management, and application security.

In addition to the .NET Framework, Microsoft has released the .NET Framework software development kit (SDK). Essentially, the .NET Framework SDK provides Microsoft's .NET languages and compilers (Visual Basic .NET, Visual C#, and VC++) while Visual Studio .NET provides the designers and tools to create applications that use those .NET languages. For an overview of the .NET Framework, see the sidebar "Visual Studio .NET and the Microsoft .NET Framework SDK," page 34.

Database Features
Even with all this .NET development, Microsoft hasn't forgotten the database developer. Visual Studio .NET provides better database-integration tools than any previous version of VS. These new management tools help make Visual Studio .NET Microsoft's most productive database application-development platform ever.

Figure 3 shows the first new database feature you'll discover—Server Explorer, which replaces the Data Environment. You can add a SQL Server system to Server Explorer by right-clicking Data Connections in the Server Explorer window and selecting the Add Connection option. Server Explorer provides many of the same database-management capabilities that you'll find in SQL Server 2000's Enterprise Manager and Query Analyzer. Right-clicking the database object displays a menu that lets you retrieve data into a grid, start the Table Designer, create a trigger, generate an object-creation script, delete the object, or export the data to a flat file. Visual Studio .NET's Retrieve Data function is a surprisingly useful option that lets you quickly browse the contents of a table or view. Figure 5 shows an example of Visual Studio .NET's data-retrieval feature.

Like Enterprise Manager's Database Diagrams, Visual Studio .NET's Database Designer feature helps you visualize or create a database and its relationships. To create a new database diagram, right-click the Database Diagrams object in Server Explorer and select New Diagram from the pop-up menu. When you save the diagram, Database Designer creates all the database objects represented in the diagram.

Another new database feature in Visual Studio .NET is the T-SQL script-generation feature that you can use to build a creation script for an entire database or a single database object. To use this tool, you need to have the SQL Server client tools installed on the same system as Visual Studio .NET. You can generate database-object creation scripts by right-clicking a given database object in the Server Explorer window, then selecting Generate Create Script from the pop-up menu.

Visual Studio .NET's Table Designer is another SQL Server management function that Microsoft has incorporated into Server Explorer. The Table Designer option, which looks almost like the Table Designer in Enterprise Manager, lets you create a new table or change an existing table's schema. To invoke the Visual Studio .NET Table Designer, right-click Server Explorer's Tables collection, then select New Table from the pop-up menu.

Visual Studio .NET also includes a new graphical Query and View Designer modeled after the one in SQL Server. To use the Query and View Designer, you drag tables onto the design environment, then define links, set selection criteria, and select columns to create a query or view. You start the Query and View Designer by right-clicking Server Explorer's Views collection and selecting the New View option from the pop-up menu.

The .NET Effect
Visual Studio .NET is a huge evolutionary step for Visual Studio. One primary goal of Visual Studio .NET is to simplify Web-application development, and the product succeeds admirably in that goal. The Visual Studio .NET WebForms feature makes programming ASP.NET Web pages almost as easy as developing standard desktop applications. In addition, the new IDE productivity features provide a level of customization and scriptability that Visual Studio never had before. Although much of Visual Studio .NET, especially the new database-integration features, builds on previous technologies, the overall result is the most significant version of Visual Studio that Microsoft has ever released.



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here