lecture1and 2_ppt
TRANSCRIPT
-
8/12/2019 Lecture1and 2_ppt
1/19
Lecture 1 and 2(.NET Framework and its Components)
-
8/12/2019 Lecture1and 2_ppt
2/19
Introduction to .NET
The .NET Framework is one of the most popular widely used
integrated software development environments today.
.NET Framework allows the integration of codes written in
different programming languages.Earlier each language required different execution
environments. But with the introduction of .NET framework this
problem was solved.
.NET Framework provides programmers a single platform todevelop console, Windows, and Web applications in various
programming languages, such as Visual Basic(VB) and Visual C#.
-
8/12/2019 Lecture1and 2_ppt
3/19
Versions(Generations of .NET Framework)
.NET Framework 1.0
.NET Framework 1.1
.NET Framework 2.0
.NET Framework 3.0
.NET Framework 3.5
.NET Framework 4.0(VS 2010)
-
8/12/2019 Lecture1and 2_ppt
4/19
Benefits of .NET Framework
Consistent Programming ModelBy using this model different tasks such as Database Connectivity, Reading fromand Writing to files is performed.
Language InteroperabilityPiece of code written in one language can be used in another language.
Automatic Management of ResourcesGarbage Collection(Part of CLR) performs the allocation and de allocation of all theresources such as files, memory and database connections. Programmer does notneed to provide code for memory management tasks.
Ease of DeploymentApplications coded under .NET Framework can be easily deployed(installed oncomputer)because deployment is done in the form of assemblies which are thesingle , logical deployment unit and hence registries does not need to storeinformation about components and applications.
-
8/12/2019 Lecture1and 2_ppt
5/19
Architecture of .NET Framework
-
8/12/2019 Lecture1and 2_ppt
6/19
Core Components of .NET Framework
Common Language Runtime
Common Type System
Common Language Specification
.NET Framework Class Library(Base Class Library)
Windows Forms
ASP.NET and ASP.NET Ajax
ADO.NET
WPF and WCF
-
8/12/2019 Lecture1and 2_ppt
7/19
Common Language Runtime
It is one of the most important and central componentsof the .NET Framework.
It essentially provides a runtime or execution
environment within which all .NET applications run
It provides various functionalities such as:-
I. Memory Management
II. Exception Handling
III. Debugging
IV. Security
V. Thread ExecutionVI. Code Execution
VII. Type Safety
VIII.Verification and Compilation
-
8/12/2019 Lecture1and 2_ppt
8/19
CLR Continued
It manages the execution of .NET applications.
The code that runs under CLR is called as managed code while the code
that is compiled into native or machine code and is directly executed by an
O.S is known as unmanaged code.
It provides Interoperability between various .NET languages such as VisualC#, Visual Basic or Visual C++.
It also provides a Common Environment for the execution of code written
in any language present in IDE
All .NET applications when run are compiled into an Intermediate Code
called the MSIL(Microsoft Intermediate Language) or IL by the languagecompiler.
The MSIL is then used by the JIT(Just In Time) Compiler to compile the
code into the native machine code, which is the final executable code.
-
8/12/2019 Lecture1and 2_ppt
9/19
Functioning of CLR
-
8/12/2019 Lecture1and 2_ppt
10/19
CLR: Execution Model
VBSourcecodeCompiler
C++C#
CompilerCompiler
Assembly
IL Code
Assembly
IL Code
Assembly
IL Code
Operating System Services
Common Language Runtime
JIT Compiler
Native Code
Managed
code
Unmanaged
Component
-
8/12/2019 Lecture1and 2_ppt
11/19
Common Type System
CTSprovides support for cross-language integration among .NET enabled
programming languages.
It defines a common set of types that can be used in applications written
in different .NET languages and the operations that can be performed on
these types.
Two CTS Compliant languages do not require type conversion, when
calling the code written in one language from the code written in another
language.
For all the languages CTS provides base set of data types.
Each language uses the aliases for the base data types provided by CTS. Example :-Integer in VB, int in C#.
-
8/12/2019 Lecture1and 2_ppt
12/19
Common Language Specification
CLS is a subset of CTS and defines a set of basic language features
and programming constructs that all .NET applications have in
common and the rules to which they must conform.
This enables interoperability between two .NET-compliant
languages. The rules defined in CLS serves as guidelines for third-party
compilers designers, and library builders.
The languages supported by CLS can use each others class libraries
similar to their own. APIs which are designed to be used as an Interface to access an
application from a program by following the rules defined in CLS,
can be used by all .NET compliant languages.
-
8/12/2019 Lecture1and 2_ppt
13/19
.NET Framework Base Class Library
This class library is a huge library of reusable classes, and value types that
are available to all the .NET programming languages.
This class library consists of a hierarchy of namespaces, and each of these
namespaces is a logical grouping of classes, structures and enumerations.
For Example:- System. Collection namespace contains classes that definesvarious collections of objects like:- lists, queues, hash tables, and many
data structures.
We can also divide this namespace into System. Collections. Array List
which defines the Array List Type.
So, the root namespace is Systemunder which all the classes resides. Some classes under System are:-Math, Object, String, Array etc.
-
8/12/2019 Lecture1and 2_ppt
14/19
Windows Presentation Foundation
WPF is a component of .NET Framework 3.0 and is used to create
applications with Visually appealing User Interfaces.WPF combines 2D
AND 3D Graphics, Microsoft Word Documents, Portable Document Format
Files(PDF)files, and Multimedia files into a single Framework.
It also offers a consistent programming model to develop applications in
which UI and Business logic can be clearly separated.
It also offers XAML, with XAML both designers and developers can easily
and efficiently work and collaborate on the development process of WPFapplications.
-
8/12/2019 Lecture1and 2_ppt
15/19
Windows Communication Foundations
This technology provides a unified programming model to build service-
oriented applications.
We can create a service-oriented application in which a service developed
in .NET is used by another applications that is built on a different platform
or programming language.
WCF combines the capabilities of distributed systems, .NET remoting and
Web Services.
Distributed System has multiple independent interconnected computers
that communicate with each other with the help of a computer network.
.NET remoting provides a framework that can be used with ASP.NET webservices to develop distributed web applications.
Web Service is a method that can be invoked through the internet and
then can be used to return a value to the code invoking the web service.
-
8/12/2019 Lecture1and 2_ppt
16/19
New Features of .NET Framework 4.0
DLR(Dynamic Language Runtime)
This feature allows to implement the dynamic languages, such as Python
and Ruby. This implies that DLR is a runtime environment that adds
services to CLR, to implement dynamic languages.
-
8/12/2019 Lecture1and 2_ppt
17/19
DLR Continued..
A new System. Dynamic namespace has been added to .NET Framework4.0 to support this functionality.
Services provided by DLR:-
Expression Trees:-Allows you to define variable assignments and function loops
Call Site Caching:-Allows DLR to store information about method calls so that in
case of any subsequent calls to the method, the DLR can use the cache historyinformation.
Dynamic object interoperability:-Refers to the set of classes that can be used tocreate dynamic objects.
Parallel Computing
When a large problem is divided into small parts that are addressessimultaneously, it is known as parallel computing. .NET Frameworkprovides this new programming model which handles multithreaded andasynchronous code created by developers
-
8/12/2019 Lecture1and 2_ppt
18/19
Features of .NET Framework 4.0
Managed Extensibility Framework
This is the new library included in the .NET Framework 4.0 to create
lightweight and extensible applications. It helps in reusing the extensions
in more than one applications
In-Process-Side-By-Side-Execution
The In-Process-Side-By-Side-Execution feature supports the loading and
starting of multiple versions of .NET Framework by an application within
the same process.
For Example:- We can execute an application, which loads thecomponents developed in .NET Framework 3.0 and .NET Framework 4.0 in
the same process
-
8/12/2019 Lecture1and 2_ppt
19/19
Thanks.