Many
of us have a misunderstanding
that .Net and .Net
framework are same. Now we want to change that misunderstanding from our mind first we can go
through the difference between .net and .net framework
.Net & .Net framework
Definition from Microsoft for .net is that .net
is a brand name or badge for a group of technologies, that are coming newer
from Microsoft in order to improve the reliability of application where as .net
framework is an interface between application and OS (Operating System) kernel
or provide an isolation between application an OS kernel.
We leave .net here because it’s just only a
brand name from Microsoft. We want to learn more about .net framework.
Microsoft first introduce the .net frame work as a separate piece of software
from OS and at that time it’s size is 110 MB(Mega Byte). The explanation from the Microsoft for the
new product is that, .net framework is for providing the facilities such as
Portability, Inter language operability and memory management. As we said above
.net framework is a separate piece of software and it must want to install each
system individually as applications soft wares, it is against portability
concept and it was a shame for Microsoft. After that Microsoft embedded or
provided the software with their operating system kernels (Kernel is the core
part of OS). But Microsoft not ready to change their OS architecture at that
time.
In the years of 2003-2004 windows kernel is
affected by some viruses such as W32.lovgate, W32.valla, and W32.jeefo. After
the virus attacks Microsoft compelled to change their OS architecture. We can
compare the OS architecture after and before implementing .net framework by
examining the simple figure (1) below. The operating systems before changing
the architecture are Windows XP, Windows 2000, Windows 2003 etc and the
operating systems after changing the architecture are Windows vista, windows 7
and Windows 8. From the figure itself it is clear that there is a filtering
occurring in our latest architecture. That is application programs even though
it is virus it is communicated to kernel only through the .net framework.
Before After
- figure(1) –
The .NET
Framework was designed with one thing in mind, that is introduce Web Services to internet development. First we want to know
what is web service?. We can understand that Web Services as a Web site that
interacts with programs, rather than people. Instead of delivering Web pages, a
Web Service takes a request formatted as XML( Xtensible Markup Language is a
self describing language like that of HTML ), performs a particular function, and
then returns a response to the requester as an XML message. From our day to day
experience we all heard about online banking and online payments, that are web services. In short web services are web
programs that give certain
output for a particular input. I hop u got a basic idea about web
service. We can discuss more about web services latter.
The .NET Framework is made up of four parts, as
shown in figure (2) the Common
Language Runtime, a set of class libraries, a set of
programming languages, and the ASP.NET environment. The .NET Framework was
designed with three goals in mind. First, it was intended to make Windows
applications much more reliable, while also providing an application with a
greater degree of security. Second, it was intended to simplify the development
of Web applications and services that not only work in the traditional sense,
but on mobile devices as well. Lastly, the framework was designed to provide a
single set of libraries that would work with multiple languages. The following
sections examine each of the .NET Framework components.
-Figure(2) -
What is Common Language Runtime (CLR)?
The Common
Language Runtime (CLR) is a program execution engine of the Microsoft
.Net Framework that compiles the source code into an intermediate language
easily understandable for interpreter software. CLR follows the Common
Language Infrastructure (CLI) standard that provides the execution
environment for managed code. It compiles and converts the managed code into Microsoft
Intermediate Language (MSIL) that is now known as Common
Intermediate Language (CIL). At the runtime Just-In-Time compiler of
CLR converts the CIL code into native code for the Operating system. Microsoft
.Net also provides the tools to compile and convert the CLR into native code
that reduces a step of compilation at runtime that in turn speeds up the
execution cycle of programs. The Common Language runtime (CLR) provides the
feature set including cross language integration, security, cross language
exception handling, interoperability, versioning, cross component
interoperability, debugging, health monitoring and profiling services.
One of the
design goals of the .NET Framework was to unify the runtime engines so that all
developers could work with a single set of runtime services. The .NET
Framework's solution is called the Common
Language Runtime (CLR). The CLR provides capabilities such as memory
management, security, and robust error-handling to any language that works with
the .NET Framework.
Benefits of common Language
Runtime
v Enhances the performance by implementing the compiled code
execution.
v The ability to easily use components developed in other languages.
Or Supports interoperability of components developed in different languages.
v Extensible types provided by a class library.
v New language features such as inheritance, interfaces, and
overloading for object-oriented programming; support for explicit free
threading that allows creation of multithreaded, scalable applications; support
for structured exception handling and custom attributes.
v Auto Garbage collection feature that controls memory leakage
situations by handling the dump memory locations.
v Provides extensible framework of class library grouped into
different Namespaces.
You can also write managed code using the C# language, which
provides the following benefits:
v Complete object-oriented design.
v Very strong type safety.
v A good blend of Visual Basic simplicity and C++ power.
v Garbage collection.
v Syntax and keywords similar to C and C++.
v Use of delegates rather than function pointers for increased type safety and
security. Function pointers are available through the use of the unsafe
C# keyword and the /unsafe option of the C# compiler (Csc.exe) for
unmanaged code and data.
Don’t
be disappointed, its just theoretical
portions just keep it in mind don’t worry about the above if you cant follow
completely. After learning the whole we can make up all these things.
.NET
class libraries
Developers like
to work with code that has already been tested and shown to work, such as the
Win32 API and the MFC Class libraries. Code re-use has long been the goal of
the
software
development community. However, the practicality of code re-use has not lived
up to expectations.
.Net class
libraries are the Collection of classes that provide standard functionality to
execute common tasks (email services, database services, file system services,
etc). The Class Library is organized by sections called Namespaces. The
.Net Framework class library (FCL) provides the core functionality of .Net Framework
architecture . The .Net Framework Class Library includes a huge collection of
reusable classes , interfaces, and value types that expedite and optimize the
development process and provide access to system functionality. The .Net
Framework class library organized in a hierarchical tree structure and it is
divided into Namespaces.
Namespaces is a logical grouping of types for the purpose of identification.
Framework class library provides the consistent base types that are used across
all .NET enabled languages. The Classes are accessed by namespaces, which
reside within Assemblies. The System Namespace is the root for types in the
.NET Framework. The .Net Framework class library classes are managed classes
that provide access to System Services . The .Net Framework class library
classes are object oriented and easy to use in program developments. Moreover,
third-party components can integrate with the classes in the .NET Framework.
.NET
programming languages
The .NET Framework provides a set of tools that help you build
code that works with the
.NET Framework. Microsoft provides a set of languages that are
already ".NET-compatible". C# is one of those languages. New versions
of Visual Basic and Visual C++ have also been created to take advantage of the
.NET Framework, with a version of Jscript.NET on the way. The development of
.NET-compatible languages is not restricted to Microsoft. The .NET group at
Microsoft has published documentation showing how language vendors can make their
languages work with .NET, and vendors are making languages such as COBOL and
Perl compatible with the .NET Framework. There are currently 20 or more
languages in the works from third party vendors and institutions that plug into
the .NET Framework.
ASP.NET
environment
The Internet was originally intended to deliver static content
to Web browsers. These Web pages never changed and were the same for every user
that surfed to their location. Active Server Pages were released by Microsoft
to enable the creation of dynamic pages based on user input and interaction
with a Web site. This was accomplished by scripting behind the Web page.Much
like Windows Forms, ASP.NET supports Web Forms. Web Forms enable you to drag
and drop controls onto your forms, and code-behind them as you would in any
typical Windows application. Because ASP.NET uses the .NET Framework, it also
uses the just-in-time (JIT) compiler.Traditional ASP pages ran very slow
because the code was interpreted. ASP.NET compiles the code when it is
installed on the server or the first time that it is requested, which greatly
increases the speed.
No comments:
Post a Comment