NET Framework introduction
NET Framework introduction
NET Framework
Prepared by:
Rajani Khushal K.
Software Framework
• In computer programming, a software
framework is an abstraction in which software
providing generic functionality can be
selectively changed by user code, thus
providing application specific software.
• It is a collection of software libraries providing
a defined application programming interface
(API).
Software Framework
• Frameworks contain key distinguishing
features that separate them from normal
libraries:
– inversion of control - In a framework, unlike in
libraries or normal user applications, the overall
program's flow of control is not dictated by the
caller, but by the framework.
– default behaviour - A framework has a default
behaviour. This default behaviour must actually be
some useful behaviour and not a series of no-ops.
Software Framework
• Frameworks contain key distinguishing features
that separate them from normal libraries:
– extensibility - A framework can be extended by the
user usually by selective overriding or specialized by
user code providing specific functionality.
.NET Application
.NET Framework
Visual Studio.NET
Common Type System
Windows
ADO .NET ASP .NET Console
Forms
Native
C# JIT
C# Source Code Machine
Complier MSIL Code Complier
Code
• Econo-JIT COMPILER:
Econo-JIT compiles only those methods that are
called at runtime. However, these compiled
methods are removed when they are not required.
Types of JIT
• Normal-JIT COMPILER:
Normal-JIT compiles only those methods that
are called at runtime. These methods are
compiled the first time they are called, and then
they are stored in cache. When the same
methods are called again, the compiled code
from cache is used for execution.
Garbage Collection
• Memory Management is one of the
housekeeping duty that takes a lot of
programming time in Developing application.
• We doesn’t like spent a time for programming
related to memory.
• So .NET provides a environment with garbage
collection system.
Garbage Collection
• Garbage collection runs when application
needs free memory.
• There is no exact time of execution of garbage
collection system.
• When application required more memory and
memory allocator reports that there is no free
memory than garbage collection is called.
Garbage Collection
• It starts by assuming everything should be
deleted from the memory.
• First it creates the graph of used memory by
application , when it has a complete graph of
memory used by application then it copies
this data and free up the whole memory.
• Garbage Collector also free up the memory for
unused object at regular interval.
Note
• When the compilation of takes place in a PE
file, the metadata is inserted into one part of
the file, while the code is converted into IL
and inserted into the other part of the file.
• The metadata describes every type and
member.
• At run time, the CLR loads the metadata into
the memory and find information about the
code’s classes, members and so.
Contents of Metadata
• A metadata contains information about the
code in a language neutral manners
• The meta includes the following information:
– Assembly information such as its identity which
can be name, version, culture and so on.
– Information about types, such as name, visibility,
base class, interface and members.
– Attribute information which modifies the types
and members of the class.
Windows Forms
• Windows Forms applications allows us to
develop window based desktop applications
• The basic entity of a Windows Forms
Applications is a form, which is an rectangular
area on which we can place various control.
• In this we could add controls to the window
form and develop response to the user
actions.
ASP .NET and ASP .NET Ajax
• ASP .NET is a Web development model, which
is used to develop interactive, data driven web
applications over the internet
• We can add controls and respective events to
various controls on the forms
• AJAX, formerly code named as Atlas, is an
extension of ASP .NET for developing and
implementing AJAX functionality.
ASP .NET and ASP .NET Ajax
• ASP .NET Ajax includes both client side and
server side components that allows
developers to create web applications such
that the applications do not require complete
reload of the page.
• It enables us to send only the modified
portions of a web pages to the web server by
making asynchronous calls to the web server.
ADO .NET
• It is the technology that is used for working
with data and databases of all types.
• It provides access to various data sources such
as MS SQL Server, and data sources exposed
through OLE DB and XML.
• We use ADO .NET to retrieve, manipulate and
update data.
Windows Presentation Foundation
(WPF)
• WPF provides developers a single and
integrated platform to incorporate 2-D and 3-
D graphics, videos and documents without the
need for any separate APIs.
• WPF supports eXtensible Application Markup
Language (XAML), which is a markup language
by Microsoft.
Windows Communication Foundation
(WCF)
• To enable various applications communicate
with each other in such a way that
applications uses the features and
functionalities extended by another
applications WCF came into existence.
• WCF enables us to build powerful and
interoperable service oriented applications
with Web Services and Web Services Clients.
Windows Workflow Foundation (WF)
• It is a technology introduced by Microsoft in .NET
framework 3.0 and 3.5.
• It provides a programming model for building
workflow based applications on Windows.
• It includes various components, such as activities,
workflow runtime, workflow designer and a rules
engine.
• WF facilities the separation between the business
process code and the actual implementation code
Windows Cardspace
• It is client software provided by Microsoft
• It makes the process of securing resources
easier and also makes sharing personal
information on the internet more secure.
• It helps programmers develop web sites and
software that are less prone to identity
attacks.
Windows Cardspace
• WCS also solves the problems of traditional
online security mechanisms by reducing
dependences on username and passwords
• It uses a separate desktop and
cryptographically strong authentication to
ensure online transactions
Language Integrated Query (LINQ)
• It is a component of .NET Framework 3.5
• It adds native data querying capabilities to
.NET languages using the syntax similar to SQL
• This implies that with LINQ, we can write
statements similar to SQL statements in a .NET
language.
• Also we can query SQL server database,
datasets, objects in a collection and XML
documents.
Main Features of Visual Studio 2008
• Support for multi targeting
• Support for ASP .NET Ajax and Jscript
Intellisense
• Support for LINQ
• Improved Deployment of .NET applications.
Types of Visual Studio 2008
Applications
• Visual Studio provides several project
templates to develop different types of .NET
applications.
• By default the project templates includes the
essential files and assemblies in the
applications thus it becomes easy and
convenient.
Types of Visual Studio 2008
Applications
• Types of Applications:
– Console Applications
– Windows Applications
Console Applications
• It refer to those .NET applications that do not
have graphical user interface except for a
command line console.
• Users of a console applications can interact
with the applications only through the
command line console.
• Thus data is displayed and read through
command line only.
Windows Applications
• Windows based desktop applications are
those applications that are installed and run
on user’s computer.
• There are mainly two types of Windows
Applications:
– Windows Forms
– Windows Presentation Foundation (WPF)
• Both these applications have a rich GUI that
facilitates easy and quick user interactivity.