DotNet Notes
DotNet Notes
DotNet Notes
0
---------------------
1. visual Basic
2. visual c++
3. visual Foxpro
4. visual Interdev(html and asp applications)
.Net Framework
.Net Framework provides simplified application development environment to
create distributed applications for the web.
Objectives:
1. Provides a consistence Object Oriented Programming environment that
allows code to be stored and executed irrespective of where the code is
stored or from where it is executed.
2. To minimize software deployment procedures and versioning conflicts.
3. To ensure safe execution of code irrespective of who developed it (third
party code)
4. Develop widely varying types of applications such as window based,
console based and web based applications.
5. To ensure the code based on the .Net Framework can integrate with any
other code irrespective of where it was developed.
.NET Framework has two main components.
1. Common Language Runtime.
2. .Net Framework Class Library.
If the application is running on Pentium Machine, the CLR produces native “x86”
code. If the machine is with Itanium processor, the CLR produces native “I464”
code.
FEATURES OF CLR:
a) Automatic memory management:
• The runtime automatically handles object layout & manages references to
objects,
• Releasing them when they are no longer being used.
This automatic memory management resolves the two most common application
errors;
i. Memory leaks
ii. Invalid memory references.
b) Thread Execution
c) Code safety Verification
d) Compilation &
e) Some other system services.
These features are essential to the managed code that runs on the CLR.
Architecture
EXE/DLL
Class Library
Unmanaged Code:
Code that does not target the runtime is called unmanaged code.
MSIL
When compiling to managed code, the compiler translates your source code into
Microsoft intermediate language (MSIL), which is a CPU-independent set of
instructions that can be efficiently converted to native code. MSIL includes
instructions for loading, storing, initializing, and calling methods on objects, as
well as instructions for arithmetic and logical operations, control flow, direct
memory access, exception handling, and other operations.
Metadata:
Metadata is a set of tables that are embedded in the assembly file. These tables
are produced by the compiler and contain a great deal of information about the
application.
It has tables that describe all of the types, methods and fields that were defined
by the application’s source code. In addition metadata also includes tables that
are referenced by the methods in the application’s source code.
Metadata describes the types in your code, including the definition of each type,
the signatures of each type's members, the members that your code references,
and other data that the runtime uses at execution time.
The MSIL and metadata are contained in a portable executable (PE) file that is
based on and extends the published Microsoft PE and Common Object File
Format (COFF) used historically for executable content.
Class Library
The class library is a comprehensive, object-oriented collection of reusable types
that tightly integrated with CLR. From these reusable types, managed code can
derive functionality. These collection of reusable types, we can use to
applications ranging from
Traditional command line (or) GUI applications to applications based on the
latest innovations provided by ASP.NET such as Webforms & XML Web
services.
Our own collection of classes will also be mixed or joined seamlessly with the
classes in the .Net framework.
COBOL, Jscript .NET, Eiffel, Haskell / Mondrian, Pascal, ML, APL, Alice
C, Visual C++, Visual Basic, Visual C#, Smalltalk, Oberon, Scheme, Mercury,
Python
Variables of reference types, referred to as objects, store references to the actual data. This section
introduces the following keywords used to declare reference types:
• class
• interface
• delegate
This section also introduces the following built-in reference types:
• object
• string