You are on page 1of 28

Windows Application

Development using C#
Overview of the .NET Framework
● The .NET Framework is a technology that supports
building and running the next generation of apps
and XML Web services
● The .NET Framework is designed to fulfill the
following objectives:
● To provide a consistent object-oriented
programming environment
● To provide a code-execution environment that
minimizes software deployment and versioning
conflicts
Overview of the .NET Framework
● To provide a code-execution environment that
promotes safe execution of code
● To provide a code-execution environment that
eliminates the performance problems of scripted or
interpreted environments
● To make the developer experience consistent
across widely varying types of apps, such as
Windows-based apps and Web-based apps
● To build all communication on industry standards
to ensure that code based on the .NET Framework
integrates with any other code
.NET Framework Architecture
Features and Versions of .NET Framework
Features and Versions of .NET Framework
Features and Versions of .NET Framework
Features and Versions of .NET Framework
Features and Versions of .NET Framework
Features and Versions of .NET Framework
Features and Versions of .NET Framework
Types of Applications Development using MS.NET
● ASP.Net Web applications
Ex: Hotmail and Google
● Web services
Ex: HTTP, XML and SOAP
● Windows applications
Ex: Microsoft word
● Windows services
● Console applications
● Mobile applications
● Class libraries
.NET Framework Components
Common Type System (CTS)
● CTS is basically a standard that specifies how

types are declared, used and managed in the


common language runtime and it is intended to
allow programs written in different programming
languages to easily share information
● It establishes a framework that helps enable cross-

language integration, enforces type security and


define rules which languages must follow to ensure
that objects written in different languages can
interact with each other
.NET Framework Components
Common Type System (CTS)
● Now following these guidelines, C# is a very type

safe language
● It's strongly typed because type rules are very

strict
● E.g. you cannot call a function that accepts an

integer with a floating point number unless you


perform explicit conversion
.NET Framework Components
Common Language Specification (CLS)
● CLS is a subset of CTS, it specifies a set of rules

that needs to be satisfied by all language compilers


targeting CLR
● CLS are mere guidelines and restrictions that a

language should follow so that it can communicate


with other .NET languages in a smooth manner
● For example: C# does not allow multiple

inheritance but c++ does, therefore c++ code cannot


be used inside C#, because it is not a CLS
compliant language
.NET Framework Components
Common Language Runtime (CLR)
● The .NET framework consists of CLR plus a set of

libraries
● The two terms BCL (Base Class Library) and FCL

(Framework Class Library) will encounter often


being used interchangeably, however there is a
slight difference between the two
● BCL consists of mscorlib(Microsoft Core Library),

system and possibly other additional assemblies


.NET Framework Components
Common Language Runtime (CLR)
● However, it does not contain ASP.NET, ADO.NET

and WinForms and other such classes/namespaces


that provide additional functionality
● FCL is BCL plus everything that ships as the .Net

framework
● Therefore, FCL is the entire framework whereas

BCL is just the core libraries


● The C# code or any of the .NET languages code

gets compiled into CIL(Common Intermediate


Language) which is often called managed code
.NET Framework Components
Common Language Runtime (CLR)
● When CLR loads an assembly, it converts the CIL

into the native code of the machine


● This conversion from CIL to native code is done by

CLR's JIT(Just In Time) compiler


.NET Framework Components
JIT Compiler
● JIT compiler converts the appropriate instruction

to native code for execution just before the


function is called and hence the managed code or
CIL is compiled only when it is needed
● CLR provides various JIT compiler and each works

on a different architecture depending on OS


● This is the reason why Microsoft Intermediate

Language can be executed on different OS without


the need of rewriting the code specific to that OS
.NET Framework Components
Types Of JIT Compiler
Normal JIT

This complies only those methods that are called at
runtime

These methods are compiled only first time when
they are called, and then they are stored in
memory cache

When the same methods are called again, the
complied code from cache is used for execution
.NET Framework Components
Types Of JIT Compiler
Normal JIT
.NET Framework Components
Types Of JIT Compiler
Econo JIT

This complies only those methods that are called at
runtime and removes them from memory after
execution
.NET Framework Components
Types Of JIT Compiler
Econo JIT
.NET Framework Components
Types Of JIT Compiler
Pre JIT

This complies entire MSIL(Microsoft Intermediate
Language) code into native code in a single
compilation cycle

This is done at the time of deployment of the
application
.NET Framework Components
Types Of JIT Compiler
Pre JIT
.NET Framework Components
Base Class Library (BCL)
● The .NET framework provides a set of base class

libraries which provide functions and features


which can be used with any programming language
which implements .NET, such as Visual Basic, C#
(or course), Visual C++, etc.
● The base class library contains standard

programming features such as Collections, XML,


DataType definitions, IO ( for reading and writing
to files), Reflection and Globalization to name
.NET Framework Components
Base Class Library (BCL)
● All of which are contained in the System

namespace
● It contain some non-standard features such as

LINQ, ADO.NET (for database interactions),


drawing capabilities, forms and web support

You might also like