STEPS OF VB DOT NET - Swas
STEPS OF VB DOT NET - Swas
VB
APPLICATION ASSEMBLEY
CODE COMPILATION
CODE
Figure 1-2
Figure 1-3
4. the native code is executed in the context of the managed CLR, along
with any other running applications or processes, as shown in Figure 1 - 4.
System Runtime
.NET CLR
Figure 1-4
Applications You Can Write with VB
The .NET Framework has no restrictions on the types of applications that are
possible, as discussed earlier. VB uses the framework and therefore has no
restrictions on possible applications. However, here are a few of the more
common application types:
Web applications: These are Web pages such as might be viewed through any
Web browser. The .NET Framework includes a powerful system for generating
Web content dynamically, allowing personalization, security, and much more.
This system is called ASP.NET (Active Server Pages .NET), and you can use VB
to create ASP.NET applications using Web Forms.
Web services: These are a new and exciting way to create versatile distributed
applications. Using Web services you can exchange virtually any data over the
Internet, using the same simple syntax regardless of the language used to create
a Web service or the system that it resides on.
What is an IL?
What is a CLR?
Full form of CLR is Common Language Runtime and it forms the heart of the .NET
framework. All Languages have runtime and its the responsibility of the runtime to take
care of the code execution of the program. For example VC++ has MSCRT40.DLL,VB6
has MSVBVM60.DLL,Java has Java Virtual Machine etc. Similarly .NET has CLR.
Following are the responsibilities of CLR
What is a CTS?
In order that two language communicate smoothly CLR has CTS (Common Type
System).Example in VB you have “Integer” and in C++ you have “long” these data types
are not compatible so the interfacing between them is very complicated. In order to able
that two different languages can communicate Microsoft introduced Common Type
System. So “Integer” data type in VB6 and “int” data type in C++ will convert it to
System.int32 which is data type of CTS. CLS which is covered in the coming question is
subset of CTS.
This is a subset of the CTS which all .NET languages are expected to support. It was
always a dream of Microsoft to unite all different languages in to one umbrella and CLS
is one step towards that. Microsoft has defined CLS which are nothing but guidelines
that language to follow so that it can communicate with other .NET languages in a
seamless manner.
Managed code runs inside the environment of CLR i.e. .NET runtime. In short all IL are
managed code. But if you are using some third party software example VB6 or VC++
component they are unmanaged code as .NET runtime (CLR) does not have control
over the source code execution of the language.
What is an Assembly?
An assembly consists of one or more files (dlls, exe’s, html files etc.), and
represents a group of resources, type definitions, and implementations of those
types. An assembly may also contain references to other assemblies. These
resources, types and references are described in a block of data called a manifest.
The manifest is part of the assembly, thus making the assembly self-describing.
There are two types of assembly Private and Public assembly. A private assembly is
normally used by a single application, and is stored in the application's directory, or a
sub-directory beneath. A shared assembly is normally stored in the global assembly
cache, which is a repository of assemblies maintained by the .NET runtime. Shared
assemblies are usually libraries of code which many applications will find useful, e.g.
Crystal report classes which will be used by all application for Reports.
Well this is the most debatable issue in .NET community and people treat
there languages like
religion. Its a subjective matter which language is best. Some like VB.NET’s
natural style and some
like professional and terse C# syntaxes. Both use the same framework and
speed is also very much
equivalents. But still let’s list down some major differences between them :-
Advantages VB.NET :-
Has support for optional parameters which makes COM interoperability much easy.
With Option Strict off late binding is supported.Legacy VB functionalities can be
used by using Microsoft.VisualBasic namespace.
Has the WITH construct which is not in C#.
The VB.NET part of Visual Studio .NET compiles your code in the background.
While this is considered an advantage for small projects, people creating very large
projects have found that the IDE slows down considerably as the project gets larger.
Advantages of C#
XML documentation is generated from source code but this is now been incorporated
in Whidbey.
Operator overloading which is not in current VB.NET but is been introduced in
Whidbey.
Use of this statement makes unmanaged resource disposal simple.
Access to Unsafe code. This allows pointer arithmetic etc, and can improve
performance in some situations. However, it is not to be used lightly, as a lot of the
normal safety of C# is lost (as the name implies).This is the major difference that you
can access unmanaged code in C# and not in VB.NET.