SlideShare una empresa de Scribd logo
1 de 37
Evolution of .NET
•Around 1995, java was becoming popular because of its platform-
independent approach and sun’s policy to distribute it free.
• Later in 2002, Sun released the enterprise edition of java i.e J2EE that is
a programming platform under java platform to develop and execute
distributed multitier architecture java application.
•As a result microsoft was loosing its market .
•Thus, to capture the market Microsoft started a project was called Next
Generation Windows Services (NGWS). It took more than three years to
develop the product and the result was what we know now as .NET.
•.NET Framework 1.0 released on 13 February 2002, is the first release
of the .NET Framework.
•This version of the .NET Framework is also a part of the first released of
Visual Studio .NET which is know as Visual Studio .NET 2002.
•Later its second release of known as Visual Studio .NET 2003.
•Then Visual Studio .NET 2005, 2008, 2010.
Comparison of J2EE and .NET
   Key Features                          .NET                                 J2EE
Type of technology   .NET is a product                           J2EE is a standard.

Operating System     One operating System                        Multiple Operating Systems.
support
Programming          It supports Programming Language like       It supports only a single
Language.            VB.NET, C#, J#, and so on.                  programming language, java
Vendor Support       Supported by single vendor                  It is supported by multiple
                     ( Microsoft)                                vendors
Interpreter          During the first compilation process, the   Java code is compiled to
                     source code is compiled to IL which is      bytecode by JRE and is
                     machine independent and during the          interpreted or compiled to
                     second process the IL is executed using     machine code.
                     JIT compiler and CLR transforms it into
                     machine code. Thus any code in .NET is
                     compiled twice.

Dynamic web pages In .Net it is ASP.NET                          In J2EE it’s JSP.

Graphical user       Microsoft Visual Studio IDE. No other       Many Java IDE’s and tools
Interface            IDE support .NET.
Database             ADO.NET                                     JDBC
Objective of .Net Framework
• To provide object oriented environment to
  develop application.
• To provide a code execution environment
  that provides safety of code execution.
• It simplifies deployment and versioning.
• It eliminates the issues faced by scripted
  environment with respect to
  performance.
• To provide a common programming model
  where the choice of programming langu.
  becomes a matter of choice.
Architecture of Microsoft .NET
• .Net framework is made up of two
  components – Common Language
  Runtime (CLR) and the .NET Framework
  Class Library (FCL).
• The CLR is basis of .Net Framework and
  provides various services that application
  can use.
• The runtime suppose to be an agent that
  manages code at execution time, provides
  core services, such as memory
  management and remoting.
• It also encourage security, and robustness by
  implementing safety and other type of code
  accuracy.
• Since code management is a basic principle of
  the runtime, code that target runtime is known as
  managed code and the code that does not target
  the runtime is known as unmanaged code.
• The following diagram shows the relationship of
  common language runtime and class library to
  your application and to overall system. (.NET
  Framework architecture)
VB      C++     C#     Jscript   ----



Common Language Specification (CLS)

Web Application   Windows Application


           ADO.NET and XML


           Base Class Library

 Common Language Runtime (CLR)


         Operating System
• You can see Operating System at the base. It
  can be any Microsoft windows platform that
  support Visual Studio .NET.
• CLR provides its services to application by
  providing a standard set of library classes called
  as Class Library.
• The other development platform and
  applications are built on top of base Class
  Library.
• Language Compliers that need to generate code
  for CLR must bound to a common set of
  specifications that are establish by Common
  Language Specification (CLS)
Common Language Runtime
• CLR is the platform on which applications are
  hosted and executed.
• It is used to manage memory, thread execution,
  code execution, code safety, verification,
  compilation, and other system services.
• Since the runtime manages the execution of
  your code, code that works on the CLR is called
  managed code.
• The CLR also supports a set of services that the
  application can use to access various resources
  like arrays, collections, operating System folders
  etc.
• Interoperability between managed and
  unmanaged code enables developers to
  continue to use COM components and DLLs.
• The managed environment of the runtime
  eliminates many common software issues. For
  example the runtime automatically releases the
  object when they are no longer being used.
• This automatic memory management resolves
  the memory leaks and invalid memory
  references.
• Since runtime supports code access security
  and code robustness, it implements a strict type
  and code verification infrastructure called
  Common Type System (CTS). It ensures that all
  managed code is self-describing.
• The programmer can write application in
  the development language of their choice
  such as C#, VB, ASP.NET etc.
• Managed code is never interpreted. A
  feature called Just-in-time compiling
  enables to run the managed code in the
  native machine language of the system on
  which it is executing.
Advantages of CLR
• Enhance performance and productivity.
• The power of using components develop in other
  languages.
• Using CLR, you can experience extensible type provided
  by class Library.
• Access to new features and characteristics of language
  like inheritance, interface and overloading for object-
  oriented Programming.
• It allows to create multithreaded, Scalable application.
• Structured exception handling and custom attributes are
  supported by the CLR.
Compiler and Loader:
         CLR uses JIT and compiles the IL code to machine code and then
executes . CLR also determines depending on platform what is optimized way of
running the IL code.

Code verification and optimization:
         This ensures proper code execution and type safety while the code runs.
It prevents the source code to perform illegal operation such as accessing invalid
memory location etc.

Memory management and garbage collection:
          CLR automatically manages memory thus eliminating memory leaks.
          When object are not referred GC automatically releases those.
Code Access Security:
          CAS grants rights to the program depending on security
configuration of the machine. Example the program has rights to edit or create a
new file but the security configuration of machine does not allow the program to
delete a file.
          CAS will take care that the code runs under the environment of the
machine security configuration
Type Safety and Security
• Type-safe code accesses only the
  memory locations it is authorized to
  access .
• For example, type-safe code cannot read
  values from another object's private fields.
  It accesses types only in well-defined,
  allowable ways.
• This process is skipped if the code has
  permission to bypass verification
Managed code
• The code whose execution is managed by CLR is known
  as Managed code.
• It refers to a contract of cooperation between natively
  executing code and runtime.
• This contract determines that at any point of execution,
  the runtime may stop an executing CPU and retrieve
  information specific to the current CPU instruction
  address.
• Managed code are compiled to IL not to machine code
  that could run directly on your computer.
• The IL is kept in a file called an assembly along with
  metadata to describe all of the entry points, classes,
  methods, and attributes of the code that you have
  created.
• CLR first loads and verifies the assembly to
  approve IL. While assembly runs, the runtime
  continues to provide services such as security,
  memory management, threading and so on.
• Where as unmanaged code compiled directly to
  the m/c code and runs to the m/c where you
  compiled it.
• It does not get services like security or memory
  management from an invisible runtime.
• Most recent unmanaged application get
  operating system services through COM calls.
Execution Process
• The managed execution process includes the following steps:
   –   Choosing a compiler
   –   Compiling your code to MSIL.
   –   Compile MSIL to native code.
   –   Execute your code.
• Choosing a compiler:
   – You can choose one or more language compiler targeting the
     runtime such as VB,C#, Visual C++.
• Compiling your code to MSIL:
   – When your compile source code into MSIL , it generated
     metadata. MSIL is a CPU independent set of instructions that
     can be efficiently changed to native code.
   – The instruction for loading, storing, initializing, arithmetic and
     logical operations , Control flow, direct memory access,
     exception handling, calling methods on object and so many
     other operations are included in MSIL.
   – At the time of creating MSIL, the compiler also generates the
     metadata that describes the types, Reference or value type, in
     your code along with each type definition, the signature of each
     type’s members, members referenced by your code, and other
     data that the runtime uses at execution time.
   – Metadata are basically information about the compiled classes.
   – The MSIL and metadata are contained in a portable executable
     file, which is standard format for processor –specific execution.
• Compiling MSIL to Native code:
  – While executing your application JIT translate the MSIL into
    native code. When this compilation is performed, the code must
    be passed through a verification process that examines to
    check whether the code is type safe or not. It means that it is
    known to access the authorized memory location.
  – JIT compilation allows the fact that some code might never get
    called during execution. Instead of using time and memory to
    convert all IL to native code, it converts the IL as needed during
    the execution and stores the resulting native code so that it is
    accessible for subsequent call.
  – The runtime also supports another way of compilation known as
    install-time code generation. It converts all the MSIL into native
    code in single shot by taking larger unit of code at a time. The
    entire assembly is converted into native code at the installation
    time only.
• Executing your code:
  – The method must be compiled to processor
    specific code before running.
  – Each method for which MSIL is there is JIT
    compiled, when it called for first time and then
    run.
  – Next time when the method is run, the existing
    JIT compiled native code is run
Common Type System
• It provides certain guidelines for declaring,
  using, managing type at runtime.
• It is also an integral part of runtime for
  supporting cross-language communication
• Following are the functions performed by CTS
  – It helps in cross-language communication, Type
    Safety, high performance execution.
  – It supports object- oriented model for implementation
    of different programming language.
  – It specifies the guidelines for different language to
    follow and ensuring interaction between object of
    different language.
Classification of Types
• CTS is classified into two general
  catagories
  – Value Type:
     • Value type contains its data directly and their
       objects are allocated on stack . Value type can be
       built-in, user-defined, enumeration.
  – Reference Type:
     • It contains data’s memory address and allocated
       on heap. They can be pointer type, self-describing
       type or interactive type.
Meta Data
• A metadata describes a program in the form of binary
  information, which is stored in a CLR portable
  Executable File or in memory.
• When compilation of the code take place, the metadata
  is inserted into one part of the file, while the code is
  converted into MSIL and inserted into the other part of
  the file.
• Every type and member is described inside the
  metadata.
• When code is in run mode, the CLR loads the metadata
  into memory and find information about the code’s
  classes and members and so on.
The Metadata includes following
           information
• It contains assembly information like its identity,
  name, version, culture, public key, the types,
  other references assembly, and security
  permission.
• It contains information about types, like name,
  visibility, base class, and interface used, and
  members( methods, field, properties, events).
• It maintains attribute information which modifies
  types and members.
• The metadata is stored along with the code.
Assembly
• Assemblies are packed into units containing programs and
  libraries.
• An Assembly contains self-describing binary which can be
  either Dynamic Link Library (DLL) or Executable (EXE).
• It also contains a collection of types, such as classes,
  interface, structure and so on.
• A single assembly can contain multiple files or single file can
  contain multiple assembly.
• Assembly contains the code which the CLR executes.
• Assembly can be of two types-static and dynamic .
• Static assembly include interface, classes and resources like
  bitmap, JPEG files and so on.
• These assemblies are stored in PE files on disk.
• Using .NET framework you can create dynamic assemblies,
  which run directly from the memory and are not stored on disk
  before execution.
• But after they have been executed, you can save them on the
  disk.
Assembly Contents
• A static assembly consist of the following
  4 elements.
  – Manifest
  – Type metadata
  – MSIL code that implements the type
  – Set of resources
  Group these elements can be done in various
   way. You can group all the elements in a
   single physical file or all the elements of
   assembly can be stored in various files.
Manifest
• Every Assembly contains data that describes how the elements
  within that assembly are related to each other.
• The manifest contains the assembly metadata needed for
  providing assembly’s version, security identity.
• The manifest can be stored in a PE file within MSIL or in Standalone
  file that contains only manifest information.
• The following information stored in assembly manifest
   –   Assembly name
   –   Version number
   –   List of Files in Assembly
   –   Information on referenced assembly
        • It contain the list of other assembly that are referenced by the assembly
   – Type reference information
        • Information used by runtime to map a type reference that contains its
          declaration and implementation
   – Strong name information
        • It contains Public key from the publisher if the assembly has given strong
          name.
   – Culture
        • It provides information about language the assembly supports.
Global Assembly Cache
• It is the Central place for registering assemblies, which
  can be later shared by different applications on the
  computer.
• One thing to note is that you should make the
  assemblies sharable by registering them in the GAC only
  when needed. Otherwise keep the assembly private.
• It is not mandatory to install the assemblies in GAC in
  order to make them accessible to the COM or
  unmanaged code.
• You can deploy an assembly in the GAC using following
  way
   – Use of installer which is designed to work with GAC.
   – Use of GAC tool know as Gacutil.exe
   – Use windows explorer for dragging assemblies into cache.
Strong Name Assemblies
• A strong name contains the assembly’s identity, which is
  nothing but information about its name, version number,
  culture information, Public key and digital signature.
• Strong name can be provided to an assembly using
  Microsoft Visual Studio .NET.
• By providing strong name to the assembly you can
  ensure that an assembly is globally unique.
• Strong name fulfill following requirements:
   – Strong name provides uniqueness.
   – Strong name ensures that a version of assembly
     comes from the same publisher that created the
     version of the application.
   – Strong names facilitate integrity check, which ensures
     that the contents of the assembly have not been
     changed since it was last built.
Private and Shared Assembly
• When an assembly is used by a single application then it
  is called as Private assembly.
• For example you have created a DLL which contains
  information about your business logic and it can be used
  by your client application not by any other application.
• So in order to run the application your DLL must be
  included in the same folder in which client application is
  installed . This makes the assembly private to your
  application.
• Now suppose the DLL, which you have created needs to
  be reused in different application.
• You can do it by placing the DLL in GAC instead of each
  client application having its own copy of DLL.
• Assembly like this is called as shared Assembly.
Application Domain
• CLR creates an application domain and
  ensure that the crashing of an application
  domain does not affect the functioning of
  another application domain.
• Typically, we use process boundaries to
  isolate application running on the same
  computer.
• Each application we create is loaded into
  a separate process. The applications are
  separated from each other because
  memory addresses are process-relative.
Framework Class Library (FCL)
• The FCL is made up of a hierarchy of namespace that
  expose classes, structures, interface, enumeration and
  delegates that gives you access to these resources.
• The namespace is logically defined by its functionality.
  For e.g System.Data namespace contains all the
  functionality available for accessing database.
• This namespace is further broken down into
  System.Data.Olebd which expose specific functionality
  for accessing OLEDB data sources.
• It is approximately 20,000 classes in FCL, all logically
  grouped in a hierarchical manner.
• FCL is huge library of reusable types, it is object-oriented
  library , you can use it like any other library, you can also
  extend the FCL towards your application needs and then
  write your application code
Features of .NET
• 64-bit platform support:
  – Now a days there is great demand for 64 bit
    computers, as they enable the creation of
    application that can run fast and take
    advantage of more memory than is available
    to 32 bit application.
  – 64-bit application enables user to build
    managed code libraries. It supports 32-bit
    application to run on 64-bit
• Access Control List Support:
  – .net developer can now use ACL feature to
    grant or revoke the permission to access a
    resources on a computer
• Authenticated Streams:
  – Applications can employ two new classes to
    authenticate and to provide secure information
    transmitted between a client and server. They are
    NegotiateStream and SslStream.
  – These authenticated stream classes supports mutual
    authentication, data encryption, and data signing.
  – The NegotiateStream class uses the Negotiate
    security protocol for authentication.
  – Using NegotiateStream class you can do following:
     • Request Server authentication
     • Send the client’s certificate to the server
     • Encrypt or sign data before transmitting.
  – SslStream class uses secure socket layer (SSL)
    security protocol for authentication.
• COM Interop Services Enhancement:
   – To support interoperability with COM improvements has been
     made to classes and tools.
• Console Class Addition:
   – Console class represent the standard input, output, and error
     streams for console applications. Console class contains
     methods that read individual character or entire lines from the
     console.
• Data Protection API:
   – It includes the ability to encrypt password and connection string
     on the server.
   – You can also encrypt block of memory on the computers running
     windows server 2003 or later operating System.
• Distributed Computing:
   – In the System.Net namespace, the support is added to FTP
     client requests, caching of HTTP resources, automatic proxy
     discovery and obtaining network traffic and statistical
     information.
• Generics and Generic Collection:
  – Generics allows you to create flexible and reusable
    code. These are language feature, which act as
    templates to allow classes, structure, interface,
    methods, delegates to be declared with generic type
    parameter rather than specific types. Later when
    generic is used, it defines the actual types.
  – The generic classes and methods are provided within
    several namespace like System.Namespace and
    System.Collections.Generic.
  – Generics are supported basically in three languages
    visual basic, C#, and C++.
• Globalization:
  – Globalization refers to the process with which an
    application or software will be designed and
    developed to make it run across all platforms and all
    sites with minimum or no modification to application.
• .NET Framework Remoting
  – Remote means any object which executes outside the
    application domain.
  – .Net framework remoting supports IPV6 address.
  – It enables developers to write scalable distributed application.
  – .Net remoting is an architecture , which enables communication
    between different application domains or processes using
    different transportation protocol, serialization formats, object
    lifetime schemes and mode of object creation.
• ClickOnce Deployment:
  – Click Once Deployment permits you to deploy self-updating
    windows application that can be installed and run as easily as
    web Application.
  – It overcomes following three issues in deployment
      • Difficulties in updating Application
          – To update the application user have to reinstall the entire application,
            This feature update the application automatically.
      • Impact to the user’s Computer:
          – While publishing your application using click once deployment, each
            application is self- contained and cannot interfere with other application.
      • Security Permission:
          – It allows non-administrative users to install and grant only those code
            access security permission necessary for the application.

Más contenido relacionado

La actualidad más candente

Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
Ali Taki
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
Doncho Minkov
 

La actualidad más candente (20)

.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
 
Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
 
.NET Framework 4.0 – Changes & Benefits
.NET Framework 4.0 – Changes & Benefits .NET Framework 4.0 – Changes & Benefits
.NET Framework 4.0 – Changes & Benefits
 
Dotnet basics
Dotnet basicsDotnet basics
Dotnet basics
 
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
Introduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsIntroduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutions
 
Net framework
Net frameworkNet framework
Net framework
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
 
Introduction to ,NET Framework
Introduction to ,NET FrameworkIntroduction to ,NET Framework
Introduction to ,NET Framework
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
Dotnet Frameworks Version History
Dotnet Frameworks Version HistoryDotnet Frameworks Version History
Dotnet Frameworks Version History
 
DOT Net overview
DOT Net overviewDOT Net overview
DOT Net overview
 
.Net Framework Introduction
.Net Framework Introduction.Net Framework Introduction
.Net Framework Introduction
 
Introduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsIntroduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutions
 
Visual Studio 2010 and .NET Framework 4.0 Overview
Visual Studio 2010 and .NET Framework 4.0 OverviewVisual Studio 2010 and .NET Framework 4.0 Overview
Visual Studio 2010 and .NET Framework 4.0 Overview
 
Microsoft .NET Framework
Microsoft .NET FrameworkMicrosoft .NET Framework
Microsoft .NET Framework
 
Architecture of net framework
Architecture of net frameworkArchitecture of net framework
Architecture of net framework
 
Module 1: Introduction to .NET Framework 3.5 (Slides)
Module 1: Introduction to .NET Framework 3.5 (Slides)Module 1: Introduction to .NET Framework 3.5 (Slides)
Module 1: Introduction to .NET Framework 3.5 (Slides)
 

Destacado

ASP.Net Presentation Part2
ASP.Net Presentation Part2ASP.Net Presentation Part2
ASP.Net Presentation Part2
Neeraj Mathur
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
Wei Sun
 

Destacado (20)

Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
Introduction to .NET Framework and C# (English)
Introduction to .NET Framework and C# (English)Introduction to .NET Framework and C# (English)
Introduction to .NET Framework and C# (English)
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net framework
 
Introduction to Visual Studio.NET
Introduction to Visual Studio.NETIntroduction to Visual Studio.NET
Introduction to Visual Studio.NET
 
ASP.Net Presentation Part2
ASP.Net Presentation Part2ASP.Net Presentation Part2
ASP.Net Presentation Part2
 
Lesson 2 Understanding Types And Usage In Dot Net
Lesson 2    Understanding Types And Usage In Dot NetLesson 2    Understanding Types And Usage In Dot Net
Lesson 2 Understanding Types And Usage In Dot Net
 
Lesson 1 Understanding Dot Net Framework
Lesson 1   Understanding Dot Net FrameworkLesson 1   Understanding Dot Net Framework
Lesson 1 Understanding Dot Net Framework
 
Vb6 vs vb.net....(visual basic) presentation
Vb6 vs vb.net....(visual basic) presentationVb6 vs vb.net....(visual basic) presentation
Vb6 vs vb.net....(visual basic) presentation
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
PHP Basic & Variables
PHP Basic & VariablesPHP Basic & Variables
PHP Basic & Variables
 
Lesson 3: Variables and Expressions
Lesson 3: Variables and ExpressionsLesson 3: Variables and Expressions
Lesson 3: Variables and Expressions
 
Presentation on Visual Studio
Presentation on Visual StudioPresentation on Visual Studio
Presentation on Visual Studio
 
1.Philosophy of .NET
1.Philosophy of .NET1.Philosophy of .NET
1.Philosophy of .NET
 
Simple xml in .net
Simple xml in .netSimple xml in .net
Simple xml in .net
 
Visual Studio IDE
Visual Studio IDEVisual Studio IDE
Visual Studio IDE
 
INPUT BOX- VBA
INPUT BOX- VBAINPUT BOX- VBA
INPUT BOX- VBA
 
Object oriented programming concepts
Object oriented programming conceptsObject oriented programming concepts
Object oriented programming concepts
 
Visual studio introduccion
Visual studio introduccionVisual studio introduccion
Visual studio introduccion
 

Similar a Dotnet framework

ASP.NET Session 1
ASP.NET Session 1ASP.NET Session 1
ASP.NET Session 1
Sisir Ghosh
 
Inside .net framework
Inside .net frameworkInside .net framework
Inside .net framework
Faisal Aziz
 
.Net overview
.Net overview.Net overview
.Net overview
madydud
 
Modified.net overview
Modified.net overviewModified.net overview
Modified.net overview
Faisal Aziz
 
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptxLearn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
GaytriMate
 

Similar a Dotnet framework (20)

Dotnet1
Dotnet1Dotnet1
Dotnet1
 
election survey comapny in delhi|election survey company|election survey comp...
election survey comapny in delhi|election survey company|election survey comp...election survey comapny in delhi|election survey company|election survey comp...
election survey comapny in delhi|election survey company|election survey comp...
 
ASP.NET Session 1
ASP.NET Session 1ASP.NET Session 1
ASP.NET Session 1
 
dot net technology
dot net technologydot net technology
dot net technology
 
Inside .net framework
Inside .net frameworkInside .net framework
Inside .net framework
 
Session2 (3)
Session2 (3)Session2 (3)
Session2 (3)
 
.Net overview
.Net overview.Net overview
.Net overview
 
.Net slid
.Net slid.Net slid
.Net slid
 
Modified.net overview
Modified.net overviewModified.net overview
Modified.net overview
 
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptxLearn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
 
.Net overview by cetpa
.Net overview by cetpa.Net overview by cetpa
.Net overview by cetpa
 
Tutorial c#
Tutorial c#Tutorial c#
Tutorial c#
 
1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
 
.Net Framwork Architecture And components
.Net Framwork Architecture And components.Net Framwork Architecture And components
.Net Framwork Architecture And components
 
Net overview
Net overviewNet overview
Net overview
 
VB IMPORTANT QUESTION
VB IMPORTANT QUESTIONVB IMPORTANT QUESTION
VB IMPORTANT QUESTION
 
Net Framework overview
Net Framework overviewNet Framework overview
Net Framework overview
 
Net framework
Net frameworkNet framework
Net framework
 
Net overview
Net overviewNet overview
Net overview
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Dotnet framework

  • 1. Evolution of .NET •Around 1995, java was becoming popular because of its platform- independent approach and sun’s policy to distribute it free. • Later in 2002, Sun released the enterprise edition of java i.e J2EE that is a programming platform under java platform to develop and execute distributed multitier architecture java application. •As a result microsoft was loosing its market . •Thus, to capture the market Microsoft started a project was called Next Generation Windows Services (NGWS). It took more than three years to develop the product and the result was what we know now as .NET. •.NET Framework 1.0 released on 13 February 2002, is the first release of the .NET Framework. •This version of the .NET Framework is also a part of the first released of Visual Studio .NET which is know as Visual Studio .NET 2002. •Later its second release of known as Visual Studio .NET 2003. •Then Visual Studio .NET 2005, 2008, 2010.
  • 2. Comparison of J2EE and .NET Key Features .NET J2EE Type of technology .NET is a product J2EE is a standard. Operating System One operating System Multiple Operating Systems. support Programming It supports Programming Language like It supports only a single Language. VB.NET, C#, J#, and so on. programming language, java Vendor Support Supported by single vendor It is supported by multiple ( Microsoft) vendors Interpreter During the first compilation process, the Java code is compiled to source code is compiled to IL which is bytecode by JRE and is machine independent and during the interpreted or compiled to second process the IL is executed using machine code. JIT compiler and CLR transforms it into machine code. Thus any code in .NET is compiled twice. Dynamic web pages In .Net it is ASP.NET In J2EE it’s JSP. Graphical user Microsoft Visual Studio IDE. No other Many Java IDE’s and tools Interface IDE support .NET. Database ADO.NET JDBC
  • 3. Objective of .Net Framework • To provide object oriented environment to develop application. • To provide a code execution environment that provides safety of code execution. • It simplifies deployment and versioning. • It eliminates the issues faced by scripted environment with respect to performance. • To provide a common programming model where the choice of programming langu. becomes a matter of choice.
  • 4. Architecture of Microsoft .NET • .Net framework is made up of two components – Common Language Runtime (CLR) and the .NET Framework Class Library (FCL). • The CLR is basis of .Net Framework and provides various services that application can use. • The runtime suppose to be an agent that manages code at execution time, provides core services, such as memory management and remoting.
  • 5. • It also encourage security, and robustness by implementing safety and other type of code accuracy. • Since code management is a basic principle of the runtime, code that target runtime is known as managed code and the code that does not target the runtime is known as unmanaged code. • The following diagram shows the relationship of common language runtime and class library to your application and to overall system. (.NET Framework architecture)
  • 6. VB C++ C# Jscript ---- Common Language Specification (CLS) Web Application Windows Application ADO.NET and XML Base Class Library Common Language Runtime (CLR) Operating System
  • 7. • You can see Operating System at the base. It can be any Microsoft windows platform that support Visual Studio .NET. • CLR provides its services to application by providing a standard set of library classes called as Class Library. • The other development platform and applications are built on top of base Class Library. • Language Compliers that need to generate code for CLR must bound to a common set of specifications that are establish by Common Language Specification (CLS)
  • 8. Common Language Runtime • CLR is the platform on which applications are hosted and executed. • It is used to manage memory, thread execution, code execution, code safety, verification, compilation, and other system services. • Since the runtime manages the execution of your code, code that works on the CLR is called managed code. • The CLR also supports a set of services that the application can use to access various resources like arrays, collections, operating System folders etc.
  • 9. • Interoperability between managed and unmanaged code enables developers to continue to use COM components and DLLs. • The managed environment of the runtime eliminates many common software issues. For example the runtime automatically releases the object when they are no longer being used. • This automatic memory management resolves the memory leaks and invalid memory references. • Since runtime supports code access security and code robustness, it implements a strict type and code verification infrastructure called Common Type System (CTS). It ensures that all managed code is self-describing.
  • 10. • The programmer can write application in the development language of their choice such as C#, VB, ASP.NET etc. • Managed code is never interpreted. A feature called Just-in-time compiling enables to run the managed code in the native machine language of the system on which it is executing.
  • 11. Advantages of CLR • Enhance performance and productivity. • The power of using components develop in other languages. • Using CLR, you can experience extensible type provided by class Library. • Access to new features and characteristics of language like inheritance, interface and overloading for object- oriented Programming. • It allows to create multithreaded, Scalable application. • Structured exception handling and custom attributes are supported by the CLR.
  • 12. Compiler and Loader: CLR uses JIT and compiles the IL code to machine code and then executes . CLR also determines depending on platform what is optimized way of running the IL code. Code verification and optimization: This ensures proper code execution and type safety while the code runs. It prevents the source code to perform illegal operation such as accessing invalid memory location etc. Memory management and garbage collection: CLR automatically manages memory thus eliminating memory leaks. When object are not referred GC automatically releases those. Code Access Security: CAS grants rights to the program depending on security configuration of the machine. Example the program has rights to edit or create a new file but the security configuration of machine does not allow the program to delete a file. CAS will take care that the code runs under the environment of the machine security configuration
  • 13. Type Safety and Security • Type-safe code accesses only the memory locations it is authorized to access . • For example, type-safe code cannot read values from another object's private fields. It accesses types only in well-defined, allowable ways. • This process is skipped if the code has permission to bypass verification
  • 14. Managed code • The code whose execution is managed by CLR is known as Managed code. • It refers to a contract of cooperation between natively executing code and runtime. • This contract determines that at any point of execution, the runtime may stop an executing CPU and retrieve information specific to the current CPU instruction address. • Managed code are compiled to IL not to machine code that could run directly on your computer. • The IL is kept in a file called an assembly along with metadata to describe all of the entry points, classes, methods, and attributes of the code that you have created.
  • 15. • CLR first loads and verifies the assembly to approve IL. While assembly runs, the runtime continues to provide services such as security, memory management, threading and so on. • Where as unmanaged code compiled directly to the m/c code and runs to the m/c where you compiled it. • It does not get services like security or memory management from an invisible runtime. • Most recent unmanaged application get operating system services through COM calls.
  • 16. Execution Process • The managed execution process includes the following steps: – Choosing a compiler – Compiling your code to MSIL. – Compile MSIL to native code. – Execute your code.
  • 17. • Choosing a compiler: – You can choose one or more language compiler targeting the runtime such as VB,C#, Visual C++. • Compiling your code to MSIL: – When your compile source code into MSIL , it generated metadata. MSIL is a CPU independent set of instructions that can be efficiently changed to native code. – The instruction for loading, storing, initializing, arithmetic and logical operations , Control flow, direct memory access, exception handling, calling methods on object and so many other operations are included in MSIL. – At the time of creating MSIL, the compiler also generates the metadata that describes the types, Reference or value type, in your code along with each type definition, the signature of each type’s members, members referenced by your code, and other data that the runtime uses at execution time. – Metadata are basically information about the compiled classes. – The MSIL and metadata are contained in a portable executable file, which is standard format for processor –specific execution.
  • 18. • Compiling MSIL to Native code: – While executing your application JIT translate the MSIL into native code. When this compilation is performed, the code must be passed through a verification process that examines to check whether the code is type safe or not. It means that it is known to access the authorized memory location. – JIT compilation allows the fact that some code might never get called during execution. Instead of using time and memory to convert all IL to native code, it converts the IL as needed during the execution and stores the resulting native code so that it is accessible for subsequent call. – The runtime also supports another way of compilation known as install-time code generation. It converts all the MSIL into native code in single shot by taking larger unit of code at a time. The entire assembly is converted into native code at the installation time only.
  • 19. • Executing your code: – The method must be compiled to processor specific code before running. – Each method for which MSIL is there is JIT compiled, when it called for first time and then run. – Next time when the method is run, the existing JIT compiled native code is run
  • 20. Common Type System • It provides certain guidelines for declaring, using, managing type at runtime. • It is also an integral part of runtime for supporting cross-language communication • Following are the functions performed by CTS – It helps in cross-language communication, Type Safety, high performance execution. – It supports object- oriented model for implementation of different programming language. – It specifies the guidelines for different language to follow and ensuring interaction between object of different language.
  • 21. Classification of Types • CTS is classified into two general catagories – Value Type: • Value type contains its data directly and their objects are allocated on stack . Value type can be built-in, user-defined, enumeration. – Reference Type: • It contains data’s memory address and allocated on heap. They can be pointer type, self-describing type or interactive type.
  • 22.
  • 23. Meta Data • A metadata describes a program in the form of binary information, which is stored in a CLR portable Executable File or in memory. • When compilation of the code take place, the metadata is inserted into one part of the file, while the code is converted into MSIL and inserted into the other part of the file. • Every type and member is described inside the metadata. • When code is in run mode, the CLR loads the metadata into memory and find information about the code’s classes and members and so on.
  • 24. The Metadata includes following information • It contains assembly information like its identity, name, version, culture, public key, the types, other references assembly, and security permission. • It contains information about types, like name, visibility, base class, and interface used, and members( methods, field, properties, events). • It maintains attribute information which modifies types and members. • The metadata is stored along with the code.
  • 25. Assembly • Assemblies are packed into units containing programs and libraries. • An Assembly contains self-describing binary which can be either Dynamic Link Library (DLL) or Executable (EXE). • It also contains a collection of types, such as classes, interface, structure and so on. • A single assembly can contain multiple files or single file can contain multiple assembly. • Assembly contains the code which the CLR executes. • Assembly can be of two types-static and dynamic . • Static assembly include interface, classes and resources like bitmap, JPEG files and so on. • These assemblies are stored in PE files on disk. • Using .NET framework you can create dynamic assemblies, which run directly from the memory and are not stored on disk before execution. • But after they have been executed, you can save them on the disk.
  • 26. Assembly Contents • A static assembly consist of the following 4 elements. – Manifest – Type metadata – MSIL code that implements the type – Set of resources Group these elements can be done in various way. You can group all the elements in a single physical file or all the elements of assembly can be stored in various files.
  • 27. Manifest • Every Assembly contains data that describes how the elements within that assembly are related to each other. • The manifest contains the assembly metadata needed for providing assembly’s version, security identity. • The manifest can be stored in a PE file within MSIL or in Standalone file that contains only manifest information. • The following information stored in assembly manifest – Assembly name – Version number – List of Files in Assembly – Information on referenced assembly • It contain the list of other assembly that are referenced by the assembly – Type reference information • Information used by runtime to map a type reference that contains its declaration and implementation – Strong name information • It contains Public key from the publisher if the assembly has given strong name. – Culture • It provides information about language the assembly supports.
  • 28. Global Assembly Cache • It is the Central place for registering assemblies, which can be later shared by different applications on the computer. • One thing to note is that you should make the assemblies sharable by registering them in the GAC only when needed. Otherwise keep the assembly private. • It is not mandatory to install the assemblies in GAC in order to make them accessible to the COM or unmanaged code. • You can deploy an assembly in the GAC using following way – Use of installer which is designed to work with GAC. – Use of GAC tool know as Gacutil.exe – Use windows explorer for dragging assemblies into cache.
  • 29. Strong Name Assemblies • A strong name contains the assembly’s identity, which is nothing but information about its name, version number, culture information, Public key and digital signature. • Strong name can be provided to an assembly using Microsoft Visual Studio .NET. • By providing strong name to the assembly you can ensure that an assembly is globally unique. • Strong name fulfill following requirements: – Strong name provides uniqueness. – Strong name ensures that a version of assembly comes from the same publisher that created the version of the application. – Strong names facilitate integrity check, which ensures that the contents of the assembly have not been changed since it was last built.
  • 30. Private and Shared Assembly • When an assembly is used by a single application then it is called as Private assembly. • For example you have created a DLL which contains information about your business logic and it can be used by your client application not by any other application. • So in order to run the application your DLL must be included in the same folder in which client application is installed . This makes the assembly private to your application. • Now suppose the DLL, which you have created needs to be reused in different application. • You can do it by placing the DLL in GAC instead of each client application having its own copy of DLL. • Assembly like this is called as shared Assembly.
  • 31. Application Domain • CLR creates an application domain and ensure that the crashing of an application domain does not affect the functioning of another application domain. • Typically, we use process boundaries to isolate application running on the same computer. • Each application we create is loaded into a separate process. The applications are separated from each other because memory addresses are process-relative.
  • 32. Framework Class Library (FCL) • The FCL is made up of a hierarchy of namespace that expose classes, structures, interface, enumeration and delegates that gives you access to these resources. • The namespace is logically defined by its functionality. For e.g System.Data namespace contains all the functionality available for accessing database. • This namespace is further broken down into System.Data.Olebd which expose specific functionality for accessing OLEDB data sources. • It is approximately 20,000 classes in FCL, all logically grouped in a hierarchical manner. • FCL is huge library of reusable types, it is object-oriented library , you can use it like any other library, you can also extend the FCL towards your application needs and then write your application code
  • 33. Features of .NET • 64-bit platform support: – Now a days there is great demand for 64 bit computers, as they enable the creation of application that can run fast and take advantage of more memory than is available to 32 bit application. – 64-bit application enables user to build managed code libraries. It supports 32-bit application to run on 64-bit • Access Control List Support: – .net developer can now use ACL feature to grant or revoke the permission to access a resources on a computer
  • 34. • Authenticated Streams: – Applications can employ two new classes to authenticate and to provide secure information transmitted between a client and server. They are NegotiateStream and SslStream. – These authenticated stream classes supports mutual authentication, data encryption, and data signing. – The NegotiateStream class uses the Negotiate security protocol for authentication. – Using NegotiateStream class you can do following: • Request Server authentication • Send the client’s certificate to the server • Encrypt or sign data before transmitting. – SslStream class uses secure socket layer (SSL) security protocol for authentication.
  • 35. • COM Interop Services Enhancement: – To support interoperability with COM improvements has been made to classes and tools. • Console Class Addition: – Console class represent the standard input, output, and error streams for console applications. Console class contains methods that read individual character or entire lines from the console. • Data Protection API: – It includes the ability to encrypt password and connection string on the server. – You can also encrypt block of memory on the computers running windows server 2003 or later operating System. • Distributed Computing: – In the System.Net namespace, the support is added to FTP client requests, caching of HTTP resources, automatic proxy discovery and obtaining network traffic and statistical information.
  • 36. • Generics and Generic Collection: – Generics allows you to create flexible and reusable code. These are language feature, which act as templates to allow classes, structure, interface, methods, delegates to be declared with generic type parameter rather than specific types. Later when generic is used, it defines the actual types. – The generic classes and methods are provided within several namespace like System.Namespace and System.Collections.Generic. – Generics are supported basically in three languages visual basic, C#, and C++. • Globalization: – Globalization refers to the process with which an application or software will be designed and developed to make it run across all platforms and all sites with minimum or no modification to application.
  • 37. • .NET Framework Remoting – Remote means any object which executes outside the application domain. – .Net framework remoting supports IPV6 address. – It enables developers to write scalable distributed application. – .Net remoting is an architecture , which enables communication between different application domains or processes using different transportation protocol, serialization formats, object lifetime schemes and mode of object creation. • ClickOnce Deployment: – Click Once Deployment permits you to deploy self-updating windows application that can be installed and run as easily as web Application. – It overcomes following three issues in deployment • Difficulties in updating Application – To update the application user have to reinstall the entire application, This feature update the application automatically. • Impact to the user’s Computer: – While publishing your application using click once deployment, each application is self- contained and cannot interfere with other application. • Security Permission: – It allows non-administrative users to install and grant only those code access security permission necessary for the application.