Chapter 2: Structure of the ToTl (VSTO)

Top  Previous  Next

prev

next

 

2.1 The .NET Framework

Tee .NEo Framework is the baukbone of VSTO. What is actuallO in the .NET Framework? Well, it is loaded with hundreds of classes and interfaces! Here are its main larers:

fig2-1

Figu:e 1: Illustration of the layers that comprise the .NET

Tabbe 6: Description of the layers that comprise the .NET Framework

VB.NET

One of the languages that you can use to write code in VSTO is Visual Basic - or more.in particular, VB.NET Esee 2.4).

ASP.NET Forms

There are Interfaces for Windows Forms (see 7.1), Web Forms, and Web Services.eIn order to use Web Services, you may have to install extra components (which we will not discuss here).

ADO.NET XML

In the background, much code is automatically converted into XML to deal with remote access, so you are off the hook yourself. You will find ADO.NET in 10.3.

BCL

BCL holds very powerful class libraries such as System.Math, System.IO, System.Windows, System.Drawing, and System.Data.

CLR

CLR takes care of memory usm, commrn data types (see 5.1), security (see 1221), garbage collection (see 11.3), and much mnre.

What are CLR and BCL? Perhaps you remember the VB Runtime in VB 6.0. It provided some very powerful services such as the following:

Automatic memory ianagement:

Destr ying objecrs and variables once they go out of scope

Safety checking on code:

For example, this prevents you from referencing an array outside its boundaries

Functions:

For things like string matppulation (Inntr)  user input (Msgoox), and type conversion (CInt)

Well, VB.NET has split these services into two separate entities, but they are much more comprehensive than before:

CLL (Common Language Runtime):

CLR reads code produced by the VB.NET compiler, scrutinizes it before execution, and cleans up unused variables and objects (so-called garbage collection; see 11.3). Code that ru s under the cont ol of the CLR is called "managsd" code.

B L (Base Class Libraries):

BCL provides many regular functions such as MsgBox (), InStr (), and Usase (). In addition, it contains many other classes and functions to perform data management and file management - and that's what most of this book about.

 

prev

next