ADVANTAGES OF .NET
Better support for dynamic Web pages
Efficient data access
Support for Web services
Object-oriented programming - Both the .NET Framework and C# are
entirely based on object-oriented principles right from the start.
Good design - A base class library, which is designed from the ground
up in a highly intuitive way.
Language independence - With .NET, all of the languages Visual
Basic .NET, C#, J#, and managed C++ compile to a common Intermediate
Language. This means that languages are interoperable in a way that has
not been seen before.
Better support for dynamic Web pages - While ASP offered a lot
of flexibility, it was also inefficient because of its use of interpreted
scripting languages, and the lack of object-oriented design often
resulted in messy ASP code. .NET offers an integrated support for
Web pages, using a new technology - ASP.NET. With ASP.NET, code
in your pages is compiled, and may be written in a .NET-aware highlevel language such as C#, J#, or Visual Basic 2005.
Efficient data access - A set of .NET components, collectively known
as ADO.NET, provides efficient access to relational databases and a
variety of data sources. Components are also available to allow access
to the file system, and to directories. In particular, XML support is built
into .NET, allowing you to manipulate data, which may be imported
from or exported to non-Windows platforms.
Any Platform – dot net is a Multilanguage and Multiplatform operating
Code sharing - .NET has completely revamped the way that code is
shared between applications, introducing the concept of the assembly,
which replaces the traditional DLL. Assemblies have formal facilities for
versioning, and different versions of assemblies can exist side by side.
Improved security - Each assembly can also contain built-in security
information that can indicate precisely who or what category of user or
process is allowed to call which methods on which classes. This gives
you a very fine degree of control over how the assemblies that you
deploy can be used.
Zero-impact installation - There are two types of assemblies:
shared and private. Shared assemblies are common libraries available
to all software, while private assemblies are intended only for use with
particular software. A private assembly is entirely self-contained, so the
process of installing it is simple. There are no registry entries; the
appropriate files are simply placed in the appropriate folder in the file
Support for Web services - .NET has fully integrated support for
developing Web services as easily as you’d develop any other type of
The .NET Framework
.NET is a collection of tools, technologies, and languages that all work
together in a framework to provide the solutions that are needed to easily
build and deploy truly robust enterprise applications.
“Microsoft .NET is based on the .NET Framework, which consists of two major
components: the Common Language Runtime (CLR) and an extensive set of Framework
Class Libraries (FCL). The CLR defines a common programming model and a
standard type system for cross-platform, multi-language development.”
.NET IS MULTI-LANGUAGE
.NET supports VB, C# (C-sharp), C++, J# (Java 1.2), Eiffel, etc.
.NET IS CROSS- platform:
Compiled .NET apps run on any supported
HOW IS CROSSPLATFORM ACHIEVED?
Cross-platform execution realized in two
1.apps are written against Framework Class
Library (FCL), not underlying OS
2.compilers generate generic assembly
language which must be executed by the
Common Language Runtime (CLR)
Framework Class Library
1000's of predefined classes
common subset across all platforms &
networking, database access, XML
processing, GUI, Web, etc.
FCL is a portable operating system
Common Language Specification (CLS) is a set of specifications or
guidelines defining a .NET
language. CLS defines the common types of managed languages,
which is a subset of the Common Type System(CTS).
AND CLS programming languages, such as C#,
.NET supports managed
VB.NET, C++, J#, execute under the management of a common
runtime called the CLR.
-> Managed applications compile to Microsoft Intermediate Language
(MSIL) and meta data.
MSIL is a low level language that all managed languages compile to
instead of native binary.
In .NET, a managed application is called an assembly.
COMMON TYPE SYSTEM
(CTS) System (CTS) is a catalog of .NET types.
The Common Type
System.Int32, System. Decimal,
System. Boolean, System. Value
System. Object is a base class for remaining all the sub classes.
The contribution of CTS extend well beyond the definitions of
common data types.
CTS helps with type safeness, enhances language
interoperability, aids in segregating application domains, and more.
.NET FRAMEWORK CLASS
The .NET Framework Class Library (FCL) is a set of managed
classes that provide access to system services.
File I/O, sockets, database access, remoting, and XML are just some of
the services available in the FCL.
FCL includes some 600 managed classes.
A flat hierarchy consisting of hundreds of classes would be difficult
to navigate. Microsoft partitioned the managed classes of FCL into
separate namespaces based on functionality.
classes pertaining to local input/output can be found in
the namespace - System. IO. To further refine the hierarchy, FCL
namespaces are often nested; the tiers of namespaces are delimited with
examples of nested namespaces.
The root namespace is System, which provides classes for
console input/output, management of application domains, delegates,
garbage collection, and more.
The Common Language Runtime is the engine of .NET
and the common runtime of all managed languages.
CLR manages security, code verification, type
verification, exception handling, garbage collection, a common
runtime, and other important of program execution.
.NET Framework is a managed environment.
Language interoperability is one goal of .NET.
CLR: (Common Language Runtime)
The common language runtime monitors the execution of .NET
applications and provides essential services. It manages memory,
handles exceptions, ensures that applications are well-behaved, and
Central to the .NET Framework is its runtime execution environment,
known as the Common Language Runtime (CLR) or the .NET runtime. Code
running under the control of the CLR is often termed managed code.
However, before it can be executed by the CLR, any source code that
you develop (in C# or some other language) needs to be compiled.
Compilation occurs in two steps in .NET:
1.Compilation of source code to IL
2.Compilation of IL to platform-specific code by the CLR
This two-stage compilation process is very important, because the
existence of the IL (managed code) is the key to providing many of the
benefits of .NET.
COMPILATION which is converted into
Assemblies contain MSIL,
native binary and executed at runtime, using a process aptly named
Just-in-Time compilation, or jitting. An assembly is subjected to two
managed code is compiled to create the actual assembly. Managed
compilers, such as csc and vbc, compile C# and VB.NET source code
into an assembly that contains MSIL and metadata.
the assembly is compiled at load time, converting the MSIL into native
binary that is optimized for the current platform and hardware. When an
assembly is jitted, an in-memory cache of the binary is created and
executed. Just-in-Time compilers are called Jitters.
STEPS TO COMPILE &
The common language runtime is responsible for executing
your application code.
When you write an application for the .NET with
a language such as C# , VB, Java Script, your source code is
never compiled directly into machine code. Instead the C# or
VB compiler converts your code into a special language
named (Micro Soft Intermediate Language) MSIL.
MSIL looks very much like a object oriented assembly language.
However, unlike a typical assembly language, it is not CPU specific.
MSIL is a low level and plat form independent language.
When your application actually executes, the MSIL code is “justin-time” compiled into machine code by JITTER (The Just-In-Time
Normally your entire application is not compiled from MSIL into
machine code. Instead the methods that are actually called during
execution are compiled.
In reality .NET Framework understands only one language:
MSIL. However, you can write applications using languages such as
C#, VB.NET for the .NET framework because the .NET framework
includes compilers for these languages that enable you to compile your
code into MSIL.
.NET packages components into assemblies
. 1 assembly = 1 or more compiled classes
.EXE represents an assembly with classes + Main program
.DLL represents an assembly with classes
ADVANTAGES OF MANAGED
Microsoft Intermediate Language shares with Java byte code
the idea that it is a low-level language with a simple syntax
(based on numeric codes rather than text), which can be very
quickly translated into native machine code. Having this welldefined universal syntax for code has significant advantages.