SlideShare a Scribd company logo
Microsoft .NET Framework Ch. Vishwa Mohan M.Sc., M.Tech Freelance  Software Consultant &  Corporate Trainer
Introduction to .NET Framework Introduction to Visual Studio  C# Language Advanced .NET Programming  Windows Based Application Development ASP.NET Web Development. Table of Contents
Microsoft.NET is a set of Microsoft software technologies for connecting information, people, systems and devices.  It enables high level of software integration through the use of XML Web Services. The .NET is a platform that provides a standardized set of services:  It’s just like Windows, except distributed over the Internet. It exports a common interface so that it’s programs can be run on any system that supports .Net. Goals of .NET Tie all devices to the Internet Software as a service Data and applications accessible on all devices Truly compile once, run anywhere Scalability What is .NET ?
.NET was designed to replace all legacy Microsoft Languages J++, C++, ASP, Visual Basic.  Offers Language uniformity. .NET Provides Common Intermediate Language IL (or MSIL) IL concept is based on CLI. CLI is a standard not a language.  C#, VB.NET, J# compiles into IL.  Non-interpreted, Just-In-Time (JIT) Compiled Code.  Each client has CLR.  CLR is your sandbox. Provides safe environment for code execution.  An  Overview on .NET
Code Execution in .NET
Choosing CLR complaint compiler Compile your code into Microsoft Intermediate Language MSIL (or IL assembly language code).  Compiling MSIL into Native Code. Compilation by Just-in-time compiler Install-time Code generation using NGen.exe.  Executing Code.  Managed Execution Process
Compilation and Execution Cycle Compilation Before installation or the first time each method is called Execution JIT Compiler Native Code MSIL Code Metadata Source Code Language Compiler
Why do you need .NET Framework 3.5? Create applications that run anywhere: mobile devices, browsers, desktops, and servers Enables better collaboration between developers and designers to create rich user experiences Productivity improvements  like LINQ to provide a single platform for quickly building apps that run anywhere Simplifies building applications with messaging systems and/or workflows Connected Compelling Ubiquitous & Productive
Different Versions of .NET Framework Microsoft .NET Framework v2.0 Microsoft .NET Framework v3.5 Microsoft .NET Framework v1.1 Microsoft .NET Framework v3.0 Microsoft .NET Framework v1.0 Microsoft .NET Framework v4.0
Common language runtime (CLR). Support for generic types and methods. Compilers for C#, Visual Basic, C++, and J#. Base class libraries. ADO.NET. ASP.NET. Windows Forms. XML Web services. .NET Remoting Technologies in .NET Framework V2.0
What was new in .NET Framework 3.0? build user interfaces for applications and media-rich experiences  build and run connected systems, with a focus on Web services build workflow-enabled applications build secure online user authentication .NET FRAMEWORK Windows Presentation Foundation (WPF) Windows Workflow Foundation (WF) Windows Communication Foundation (WCF) Windows Cardspace
What is Microsoft .NET Framework 3.5? 2.0 = ASP.NET, CLR, Web Services, WinForms 3.0 = Cardspace, WCF, WF, WPF 3.5 = AJAX, LINQ, REST, RSS .NET Framework 3.5 .NET Framework 3.0 SP1 Microsoft Visual Studio 2008 .NET Framework 2.0 SP1
Support for developing AJAX enabled web sites. Both server centric and Client centric.  New compilers for C#, Visual Basic, and C++.   Support for ASMX and WCF based Web Services.  Enhancements in CLR includes: Improvement in Networking.  New web protocols in WCF. Integration of WCF with WF  Exposing WF workflow as WCF service.  LINQ & Data Awareness Expression Tress Full tooling support in VS2008 for WF, WCF and WPF.  Enhancements in .NET Framework V3.5
Introduction to  .NET Architecture Microsoft .NET Framework
The .NET Framework supports building and running different kinds of applications and Web services.  The .NET Framework designed to fulfill the following: To provide code execution environment : To minimize software deployment and versioning problems,  Supporting safe execution of code (i.e., code access security)  Eliminates performance problems of scripted or interpreted environments.  Same type of development environment for Windows based and Web based applications.  Ensured all external communications are industrial standards so that code based on .NET framework can integrate with any other code.  The .NET Framework has two main components: Common Language Runtime (CLR) .NET Framework Class Library  Overview of .NET Framework
.NET Framework Platform & Tools Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Web Forms  Web Services Windows® Forms Common Language Specification VB C++ C# J# …
CLR Internals Class Loader IL to Native Compilers Code Manager Garbage Collector Security Engine Debug Engine Type Checker Exception Manager Thread Support COM Marshaler Base Class Library Support
The CLR is the execution engine for the .NET framework applications.  Code running under the control of the CLR often referred as  managed code.  CLR provides, Code management (loading and executions) Application memory isolation Automatic memory management.  Enforcement of code access security. Built in support for language interoperability.  Exception handling, including cross-language exceptions. Thread Management  Enforcing strict type checking to promote robustness.  Interop Services for old COM objects and DLL’s.  Versioning problems solved. Removal on Registration dependency.  Common Language Runtime (CLR)
Microsoft Ships Several Languages: C#,  VB.NET C++ (With managed extensions) JScript.NET J#, ILasm  Languages Targeted for CLR Third Party Languages Eiffel by Eiffel Software COBOL by Fujistu FORTRON  Delphi by Borland Perl by ActiveState Many Research toy languages.
The .NET Framework, is a comprehensive, object-oriented collection of reusable types that tightly integrate with CLR. These types can be used to develop any type of applications like Console based, Traditional GUI or Web Applications.  The .NET framework types perform the following functions. Represent base data types and functions. Encapsulate data structures. Perform I/O Access information about loaded types. Invoke .NET framework security check. Provide data access. The .NET Framework Class Library
The .NET Framework has a rich set of class library.  This class library provides a common consistent development interface across all languages supported by .NET.  The .NET Class Library consists classes for  IO, Threading, Database, Text, Graphics, Socket, Web/Mail, Security, Cryptography , etc.,  The Class Library major parts are: Base Frame Work Data and XML ASP.NET Windows Forms These classes are arranged using  dot syntax naming scheme  that connotes a hierarchy. It also called as Namespace.  Eg:  System.Collection.ArrayList   represents  ArrayList  type which belongs to  System.Collection   Namespace.  System  name space is the root namespace for the fundamental types of .NET.  The .NET Framework Class Library
The .NET Unified Classes Diagnostics Configuration Collections Net IO Threading Text Security Common OLEDB SQLTypes SQLClient XPath XSL Runtime InteropServices Remoting Serialization Serialization Configuration SessionState Caching Security Services UI HTMLControls WebControls Imaging Drawing2D Text Printing Design ComponentModel Schema Reflection Resources Globalization ServiceProcess System System.XML System.Web  (ASP .NET) System.Drawing System.Windows.Forms System.Data Schema Description Discovery Protocols
Relationship between CLR, Class Library and Your Application.
Any code before executed by the CLR need to be compiled. Compilation occurs in two steps in .NET Compilation of source code in to IL.  Compilation of IL to platform specific code by CLR.  Advantages of Managed Code:  Platform Independency  Language Interoperability  Performance Improvement IL is a classic Object Oriented programming language with single implementation inheritance of classes. So any language that targeting to IL need to follow this methodology. Some of the important features of IL:  Object orientation and use of interfaces.  Strong distinction between value types and reference types.  Strong data typing Use of attributes.  Error Handling using exceptions.  Advantages of Managed Code
In .NET, All objects implicitly derived from single base class  System.Object .  The CTS is the core part of the CLR that takes cares cross language integration.  The CTS offers wide range of types and operations that found in many programming languages.  The CTS supports two general categories of types: Value Types :  Include simple types (char, int, float, etc.,), enum types and struct types.  Reference Types  :  Includes class types, interface type, delegate types and array types.  The common Type System performs the following functions:   Facilitates cross-language integration, type-safety and high performance code execution.  Provides an object-oriented model and defines a set of rules that language have to follow.  Common Type System (CTS)
In .NET,   A class written in one language can inherit a class written in another language.  The class can contain instance of another class written in different language.  An object can directly call methods against another object written in another language.  Object (or reference to objects) can be passed around between methods.  To address the above, one language need to support equivalent data types present in different language. This data type problem solved in .NET through the  Common Type System .  The CTS defines the predefined data types that are available in IL. So all the languages that targets the .NET will produce the compiled code ultimately based on these types.  The CTS doesn’t specify merely primitive data types but a rich hierarchy of types.  Everything actually an object.  Specifies rules for Class, Enum, Struct, interface, delegate, etc.,  Common Type System (CTS)
The CTS defines how types are declared, used and managed in the runtime. So runtime can support cross language integration.  The CTS performs the following functions:  Establishes a framework that helps enable cross-language integration, type safety, and high performance code execution. Provides an object-oriented model that supports the complete implementation of many programming languages. Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other. The Common Type System supports two general categories of types, each of which is sub divided into further categories:  Value Types Reference Types.  All types derived from  System.Object  base type.  Common Type System (CTS)
Below diagram shows various types and their relations.  Instance of a type can be simply value type or self describing type even though they are sub categories of these types.  In C#, each predefined type recognized by the compiler and maps into one of the IL built-in types.  Type Classification
CLS rules define a subset of the CTS; i.e., all the rules that apply to the CTS apply to the CLS, except where stricter rules are defined in the CLS.   The CLS works with the CTS to ensure language interoperability. The CLS is a set of standards that all compilers targeting to .NET must support.  Most of the compilers will support the subset features offered by the IL and CTS. (Because IL is very rich language).  It is perfect to write non-CLS complaint code. But it is not guaranteed to be fully language interoperable.  CLS-complaint features applies only to  public and protected members of classes  and  public classes .  Within the private implementation of class you can write whatever non-CLS code you want.  The common language runtime compiles all code written in a CLS-compliant language, to the same kind of intermediate code (IL) –MSIL. You can mark assemblies, modules, types, and members as either CLS-compliant or not CLS compliant using the  CLSCompliantAttribute.  Common Language Specifications (CLS)
Automatic management is one of the services provided by CLR during managed execution.  Automatic memory management can eliminate common problems, such as forgetting to free an object and causing a memory leak, or attempting to access memory for an object that has already been freed.   CLR’s Garbage collector will do all theses memory management activities.  Garbage collector will release the memory for the unused objects at free time.  To optimize the performance of the garbage collector, the managed heap is divided into three generations: 0, 1, and 2.   Unmanaged resources require explicit cleanup. (Eg: Object wraps OS resources such as file handle, windows handle, network connection).  GC knows the lifetime of the object that wraps these resources. But it doesn’t aware of these resources. So release these resources you need to done in public  Dispose  method.  Automatic Memory Management
An assembly is a unit of deployment. Assembly contains code that CLR executes. MSIL code in PE file will not execute if it doesn’t have assembly manifest.  Each assembly can have only one entry point ( DllMain ,  WinMain  or   Main ).   Assembly forms security boundary. So permissions requested at assembly level. Assembly forms version boundary. Assembly is the smallest versionable unit in the CLR.  Assemblies are self describing.  Assemblies can be static and dynamic.  Within Assembly Type information (metadata) Consists of: Describes every class type.  Complete Interface Information.  Automatically bound into assembly, inseperable, stored in binary format.  Assemblies in .NET
Assemblies in .NET
Assembly is nothing but .NET Library or Executable (PE file format).  Single-file or multi-file assemblies.  Assembly components are: Metadata, IL Code, Resources.  Assemblies eliminate DLL problem.  Locations are resolved at runtime.  Assembly can contain both managed and unmanaged code.  Assemblies: Assemblies Metadata
Assemblies cab have Strong name and Version number Publisher can set versioning policy. Publisher can provide strong name to assembly.  Domain/Local Administrator can set versioning policy. The runtime resolve several steps to resolve an assembly binding:  Checks the original assembly reference to determine the version of the assembly to be bound. Checks for all applicable configuration files to apply version policy. Determines the correct assembly from the original assembly reference and any redirection specified in the configuration files, and determines the version that should be bound to the calling assembly. Checks the GAC, Multiple versions can be loaded side-by-side.   Each assembly have two distinct ways of expressing version information:  Version Number together with assembly name and culture info.  Informational version.  Assembly Versioning
Managed code runs within the protective confines of the CLR.  Before the CLR Executes code: Verifies it for type safety.  Enforces the Code Access Security Policy.  Remember the CLR sits on top of Windows:  CLR Security complements windows security (doesn’t replace).  .NET Strongly Enforces the Microsoft Mantra “ Do it our way ”.  Security by design by default. “ The Microsoft Way” is secure and easy.  Microsoft encourage developers to write secure code by making security implementations easy way.  Hard work to make .NET applications insecure.  IL can be verified to guarantee type safety No unsafe casts, no un-initialized variables and  no out-of-bounds array indexing. Security in .NET
Role-based security.  Evidence-based, Code Access Securiy Declarative Security Imperative Security Isolated Storage Container Link Demands Cryptography Partially Trusted files can be read/write files through by using standard dialogs. .NET Security Mechanism
Type safety verification performed during JIT compile.  Primary functions: Ensures methods are called in correct manner (parameters, etc.,). Authorize memory access (thus preventing buffer overruns etc.,) Apply CAS policy.  Code produced by C#  unsafe  keyword cannot be checked.  Higher privileges required to run unsafe code.  .NET protective environment allows multiple applications to run within one process:  1 .NET Process = Multiple Application Domains.  Type Safety Verification
Code Access Security (CAS) Grants rights to code depending on “ evidence ”. Unlike Win32 security not based on User’s ID but “ Code’s ID ”. Two primary concepts in CAS are: Code Groups: Compartmentalizes code based on “membership criteria”, e.g.: Location (Internet, Intranet, Local Hard drive) Strong Name (Private Key signature) Custom Criteria (Authentication, XML Signature, etc.,).  Code with matching criteria is encapsulated into a  Code Group .  A Code Group is associated with a  Permission Set .  Permission Sets:   Detailed list of what code can do. Very specific/granular.  Code Access Security
Application domains provide an isolation boundary for security, reliability, and versioning, and for unloading assemblies.  Application domains are typically created by runtime hosts.  You can run several application domains in a single process:  With the same level of isolation between application domains that would exist in separate processes, but without incurring the additional overhead of making cross-process calls or switching between processes.  Dramatically increases server scalability.  The isolation provided by application domains has the following benefits:  Faults in one application cannot affect other applications.  Individual applications can be stopped without stopping the entire process. Code running in one application cannot directly access code or resources from another application.  Permissions granted to code can be controlled by application domain in which it is running.  Application Domains:
At run time, all managed code is loaded into an application domain and is run by a  managed thread .  There is not a one-to-one correlation between application domains & threads. Several threads can be executing in a single application domain at any given time and a particular thread is not confined to a single application domain.  Threads are free to cross application domain boundaries;  A new thread is not created for each application domain.  The run time keeps track of which threads are running in which application domains.  You can locate the domain in which a thread is executing at any time by calling the  GetDomain  method.   Application domains are usually created and manipulated programmati-cally by runtime hosts.  The  AppDomain  class is the programmatic interface to application domains.  It has methods to Execute assembly, Unload assembly, etc.,  Application Domains:
Why we need Interoperability?  Allow managed and unmanaged code work together. Reusability of COM components.  Usage of Windows native API.  Challenges for Interoperability are: Synchronize Memory Allocation Object Lifetime Management Security Two Way Communication PInvoke:   Efficient and relatively easy way to call existing native code, without having to write glue code.   Managed C++ / C++/CLI:   Very powerful way to write glue code for complex object models.  COM Interop:   COM Interfaces and Objects can be used by .NET and Vice Versa.  Integration with Legacy Code
The common language runtime has been designed to support a variety of different types of applications. Each type of application requires a  runtime host  to start it.   The .NET Framework ships with a number of different runtime hosts, includes:  ASP.NET Microsoft IE Shell Executable Microsoft also provides API to create your own runtime hosts.  Runtime Hosts
You can access data uses ADO.NET.  GDI+ allows advanced drawing.  Your windows application can make calls exposed through XML web services.  You can access OS services.  You can develop multi tier distributed applications with the help of .NET. Improved localization support.  Windows forms features a security model that is code-based. Extensive XML Supporting classes. With WPF you can build rich media aware applications.  Benefits of Windows Applications with .NET
Ch. Vishwa Mohan M.Sc., M.Tech Web: http://in.linkedin.com/in/vishwam Phone: +91- 9490995632   For More Details

More Related Content

PPTX
Net Fundamentals
Ali Taki
 
PDF
Dotnet basics
Mir Majid
 
PDF
Dot Net Fundamentals
LiquidHub
 
PPT
1.Philosophy of .NET
snandagopalan2
 
PDF
The .NET Platform - A Brief Overview
Carlos Lopes
 
PPTX
.Net slid
pacatarpit
 
PPT
.Net overview|Introduction Of .net
pinky singh
 
PPTX
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
yazad dumasia
 
Net Fundamentals
Ali Taki
 
Dotnet basics
Mir Majid
 
Dot Net Fundamentals
LiquidHub
 
1.Philosophy of .NET
snandagopalan2
 
The .NET Platform - A Brief Overview
Carlos Lopes
 
.Net slid
pacatarpit
 
.Net overview|Introduction Of .net
pinky singh
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
yazad dumasia
 

What's hot (20)

PPT
Architecture of .net framework
Then Murugeshwari
 
PDF
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
citizenmatt
 
PPTX
Introduction to .NET by QuontraSolutions
QUONTRASOLUTIONS
 
PPTX
.Net framework
Raghu nath
 
PPT
Net framework
mayankingeniar
 
PPT
Introduction to .net
Karthika Parthasarathy
 
PPTX
.Net Framework Introduction
Abhishek Sahu
 
PPTX
Introduction to .net FrameWork by QuontraSolutions
Quontra Solutions
 
PPT
DotNet Introduction
Wei Sun
 
PDF
Dot net-interview-questions-and-answers part i
Rakesh Joshi
 
PPTX
Dot net-interview-questions-and-answers part i
Rakesh Joshi
 
PPT
Module 1: Introduction to .NET Framework 3.5 (Slides)
Mohamed Saleh
 
DOC
.Net framework interview questions
Mir Majid
 
PDF
Lesson 1 Understanding Dot Net Framework
nbaveja
 
PPTX
.net CLR
DevTalk
 
PPTX
Microsoft dot net framework
Ashish Verma
 
PPTX
Dotnet Frameworks Version History
voltaincx
 
PPT
Microsoft .NET Framework
chandrasekhardesireddi
 
PPTX
dot net technology
Imran Khan
 
PPSX
Introduction to .net framework
Arun Prasad
 
Architecture of .net framework
Then Murugeshwari
 
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
citizenmatt
 
Introduction to .NET by QuontraSolutions
QUONTRASOLUTIONS
 
.Net framework
Raghu nath
 
Net framework
mayankingeniar
 
Introduction to .net
Karthika Parthasarathy
 
.Net Framework Introduction
Abhishek Sahu
 
Introduction to .net FrameWork by QuontraSolutions
Quontra Solutions
 
DotNet Introduction
Wei Sun
 
Dot net-interview-questions-and-answers part i
Rakesh Joshi
 
Dot net-interview-questions-and-answers part i
Rakesh Joshi
 
Module 1: Introduction to .NET Framework 3.5 (Slides)
Mohamed Saleh
 
.Net framework interview questions
Mir Majid
 
Lesson 1 Understanding Dot Net Framework
nbaveja
 
.net CLR
DevTalk
 
Microsoft dot net framework
Ashish Verma
 
Dotnet Frameworks Version History
voltaincx
 
Microsoft .NET Framework
chandrasekhardesireddi
 
dot net technology
Imran Khan
 
Introduction to .net framework
Arun Prasad
 
Ad

Similar to Microsoft.Net (20)

PPTX
.Net framework
EzraKemboi1
 
PPT
Net framework
jhsri
 
PPTX
Dot Net PPt.pptx
PriyaMaurya52
 
PPT
.Net overview
Pankaj Rattan
 
PPT
.Net Overview
Pankaj Rattan
 
PDF
Net framework
ANAGHA T SASIDHARAN
 
PPSX
Introductionto .netframework by Priyanka Pinglikar
PriyankaPinglikar
 
PPTX
Chapter1_Part1.pptx
RaajzKoirala
 
PDF
Unit I- Introduction to .NET Framework.pdf
Ujwala Junghare
 
PPT
Visual studio
anupathak17jul
 
PPT
As Pdotnet
balujalabs
 
PPTX
Session2 (3)
DrUjwala1
 
PPT
Intro.net
singhadarsh
 
PPTX
c#.pptx
GokulPadmakumar3
 
PPT
.Net Overview -- Training (Lesson 1)
Rishi Kothari
 
PPT
Microsoft dot net framework
Instantenigma
 
PPT
.Net Session Overview
Logu Thanigachalam
 
PPT
Introdot Netc Sharp En
Gregory Renard
 
.Net framework
EzraKemboi1
 
Net framework
jhsri
 
Dot Net PPt.pptx
PriyaMaurya52
 
.Net overview
Pankaj Rattan
 
.Net Overview
Pankaj Rattan
 
Net framework
ANAGHA T SASIDHARAN
 
Introductionto .netframework by Priyanka Pinglikar
PriyankaPinglikar
 
Chapter1_Part1.pptx
RaajzKoirala
 
Unit I- Introduction to .NET Framework.pdf
Ujwala Junghare
 
Visual studio
anupathak17jul
 
As Pdotnet
balujalabs
 
Session2 (3)
DrUjwala1
 
Intro.net
singhadarsh
 
.Net Overview -- Training (Lesson 1)
Rishi Kothari
 
Microsoft dot net framework
Instantenigma
 
.Net Session Overview
Logu Thanigachalam
 
Introdot Netc Sharp En
Gregory Renard
 
Ad

More from Vishwa Mohan (15)

PPT
OPC Unified Architecture
Vishwa Mohan
 
PPTX
jQuery
Vishwa Mohan
 
PPT
WPF
Vishwa Mohan
 
PPT
Wwf
Vishwa Mohan
 
PDF
Da package usersguide
Vishwa Mohan
 
PDF
Dareadme
Vishwa Mohan
 
PPTX
CSharp Presentation
Vishwa Mohan
 
PPT
Linq
Vishwa Mohan
 
PPTX
Uml
Vishwa Mohan
 
PPT
Xml
Vishwa Mohan
 
PPT
Real Time Systems & RTOS
Vishwa Mohan
 
PPT
Embedded Linux
Vishwa Mohan
 
PPT
Introduction To Embedded Systems
Vishwa Mohan
 
PPT
Zig Bee
Vishwa Mohan
 
PPT
WCF
Vishwa Mohan
 
OPC Unified Architecture
Vishwa Mohan
 
jQuery
Vishwa Mohan
 
Da package usersguide
Vishwa Mohan
 
Dareadme
Vishwa Mohan
 
CSharp Presentation
Vishwa Mohan
 
Real Time Systems & RTOS
Vishwa Mohan
 
Embedded Linux
Vishwa Mohan
 
Introduction To Embedded Systems
Vishwa Mohan
 
Zig Bee
Vishwa Mohan
 

Recently uploaded (20)

PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Software Development Methodologies in 2025
KodekX
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
The Future of Artificial Intelligence (AI)
Mukul
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Software Development Methodologies in 2025
KodekX
 

Microsoft.Net

  • 1. Microsoft .NET Framework Ch. Vishwa Mohan M.Sc., M.Tech Freelance Software Consultant & Corporate Trainer
  • 2. Introduction to .NET Framework Introduction to Visual Studio C# Language Advanced .NET Programming Windows Based Application Development ASP.NET Web Development. Table of Contents
  • 3. Microsoft.NET is a set of Microsoft software technologies for connecting information, people, systems and devices. It enables high level of software integration through the use of XML Web Services. The .NET is a platform that provides a standardized set of services: It’s just like Windows, except distributed over the Internet. It exports a common interface so that it’s programs can be run on any system that supports .Net. Goals of .NET Tie all devices to the Internet Software as a service Data and applications accessible on all devices Truly compile once, run anywhere Scalability What is .NET ?
  • 4. .NET was designed to replace all legacy Microsoft Languages J++, C++, ASP, Visual Basic. Offers Language uniformity. .NET Provides Common Intermediate Language IL (or MSIL) IL concept is based on CLI. CLI is a standard not a language. C#, VB.NET, J# compiles into IL. Non-interpreted, Just-In-Time (JIT) Compiled Code. Each client has CLR. CLR is your sandbox. Provides safe environment for code execution. An Overview on .NET
  • 6. Choosing CLR complaint compiler Compile your code into Microsoft Intermediate Language MSIL (or IL assembly language code). Compiling MSIL into Native Code. Compilation by Just-in-time compiler Install-time Code generation using NGen.exe. Executing Code. Managed Execution Process
  • 7. Compilation and Execution Cycle Compilation Before installation or the first time each method is called Execution JIT Compiler Native Code MSIL Code Metadata Source Code Language Compiler
  • 8. Why do you need .NET Framework 3.5? Create applications that run anywhere: mobile devices, browsers, desktops, and servers Enables better collaboration between developers and designers to create rich user experiences Productivity improvements like LINQ to provide a single platform for quickly building apps that run anywhere Simplifies building applications with messaging systems and/or workflows Connected Compelling Ubiquitous & Productive
  • 9. Different Versions of .NET Framework Microsoft .NET Framework v2.0 Microsoft .NET Framework v3.5 Microsoft .NET Framework v1.1 Microsoft .NET Framework v3.0 Microsoft .NET Framework v1.0 Microsoft .NET Framework v4.0
  • 10. Common language runtime (CLR). Support for generic types and methods. Compilers for C#, Visual Basic, C++, and J#. Base class libraries. ADO.NET. ASP.NET. Windows Forms. XML Web services. .NET Remoting Technologies in .NET Framework V2.0
  • 11. What was new in .NET Framework 3.0? build user interfaces for applications and media-rich experiences build and run connected systems, with a focus on Web services build workflow-enabled applications build secure online user authentication .NET FRAMEWORK Windows Presentation Foundation (WPF) Windows Workflow Foundation (WF) Windows Communication Foundation (WCF) Windows Cardspace
  • 12. What is Microsoft .NET Framework 3.5? 2.0 = ASP.NET, CLR, Web Services, WinForms 3.0 = Cardspace, WCF, WF, WPF 3.5 = AJAX, LINQ, REST, RSS .NET Framework 3.5 .NET Framework 3.0 SP1 Microsoft Visual Studio 2008 .NET Framework 2.0 SP1
  • 13. Support for developing AJAX enabled web sites. Both server centric and Client centric. New compilers for C#, Visual Basic, and C++. Support for ASMX and WCF based Web Services. Enhancements in CLR includes: Improvement in Networking. New web protocols in WCF. Integration of WCF with WF Exposing WF workflow as WCF service. LINQ & Data Awareness Expression Tress Full tooling support in VS2008 for WF, WCF and WPF. Enhancements in .NET Framework V3.5
  • 14. Introduction to .NET Architecture Microsoft .NET Framework
  • 15. The .NET Framework supports building and running different kinds of applications and Web services. The .NET Framework designed to fulfill the following: To provide code execution environment : To minimize software deployment and versioning problems, Supporting safe execution of code (i.e., code access security) Eliminates performance problems of scripted or interpreted environments. Same type of development environment for Windows based and Web based applications. Ensured all external communications are industrial standards so that code based on .NET framework can integrate with any other code. The .NET Framework has two main components: Common Language Runtime (CLR) .NET Framework Class Library Overview of .NET Framework
  • 16. .NET Framework Platform & Tools Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Web Forms Web Services Windows® Forms Common Language Specification VB C++ C# J# …
  • 17. CLR Internals Class Loader IL to Native Compilers Code Manager Garbage Collector Security Engine Debug Engine Type Checker Exception Manager Thread Support COM Marshaler Base Class Library Support
  • 18. The CLR is the execution engine for the .NET framework applications. Code running under the control of the CLR often referred as managed code. CLR provides, Code management (loading and executions) Application memory isolation Automatic memory management. Enforcement of code access security. Built in support for language interoperability. Exception handling, including cross-language exceptions. Thread Management Enforcing strict type checking to promote robustness. Interop Services for old COM objects and DLL’s. Versioning problems solved. Removal on Registration dependency. Common Language Runtime (CLR)
  • 19. Microsoft Ships Several Languages: C#, VB.NET C++ (With managed extensions) JScript.NET J#, ILasm Languages Targeted for CLR Third Party Languages Eiffel by Eiffel Software COBOL by Fujistu FORTRON Delphi by Borland Perl by ActiveState Many Research toy languages.
  • 20. The .NET Framework, is a comprehensive, object-oriented collection of reusable types that tightly integrate with CLR. These types can be used to develop any type of applications like Console based, Traditional GUI or Web Applications. The .NET framework types perform the following functions. Represent base data types and functions. Encapsulate data structures. Perform I/O Access information about loaded types. Invoke .NET framework security check. Provide data access. The .NET Framework Class Library
  • 21. The .NET Framework has a rich set of class library. This class library provides a common consistent development interface across all languages supported by .NET. The .NET Class Library consists classes for IO, Threading, Database, Text, Graphics, Socket, Web/Mail, Security, Cryptography , etc., The Class Library major parts are: Base Frame Work Data and XML ASP.NET Windows Forms These classes are arranged using dot syntax naming scheme that connotes a hierarchy. It also called as Namespace. Eg: System.Collection.ArrayList represents ArrayList type which belongs to System.Collection Namespace. System name space is the root namespace for the fundamental types of .NET. The .NET Framework Class Library
  • 22. The .NET Unified Classes Diagnostics Configuration Collections Net IO Threading Text Security Common OLEDB SQLTypes SQLClient XPath XSL Runtime InteropServices Remoting Serialization Serialization Configuration SessionState Caching Security Services UI HTMLControls WebControls Imaging Drawing2D Text Printing Design ComponentModel Schema Reflection Resources Globalization ServiceProcess System System.XML System.Web (ASP .NET) System.Drawing System.Windows.Forms System.Data Schema Description Discovery Protocols
  • 23. Relationship between CLR, Class Library and Your Application.
  • 24. Any code before executed by the CLR need to be compiled. Compilation occurs in two steps in .NET Compilation of source code in to IL. Compilation of IL to platform specific code by CLR. Advantages of Managed Code: Platform Independency Language Interoperability Performance Improvement IL is a classic Object Oriented programming language with single implementation inheritance of classes. So any language that targeting to IL need to follow this methodology. Some of the important features of IL: Object orientation and use of interfaces. Strong distinction between value types and reference types. Strong data typing Use of attributes. Error Handling using exceptions. Advantages of Managed Code
  • 25. In .NET, All objects implicitly derived from single base class System.Object . The CTS is the core part of the CLR that takes cares cross language integration. The CTS offers wide range of types and operations that found in many programming languages. The CTS supports two general categories of types: Value Types : Include simple types (char, int, float, etc.,), enum types and struct types. Reference Types : Includes class types, interface type, delegate types and array types. The common Type System performs the following functions: Facilitates cross-language integration, type-safety and high performance code execution. Provides an object-oriented model and defines a set of rules that language have to follow. Common Type System (CTS)
  • 26. In .NET, A class written in one language can inherit a class written in another language. The class can contain instance of another class written in different language. An object can directly call methods against another object written in another language. Object (or reference to objects) can be passed around between methods. To address the above, one language need to support equivalent data types present in different language. This data type problem solved in .NET through the Common Type System . The CTS defines the predefined data types that are available in IL. So all the languages that targets the .NET will produce the compiled code ultimately based on these types. The CTS doesn’t specify merely primitive data types but a rich hierarchy of types. Everything actually an object. Specifies rules for Class, Enum, Struct, interface, delegate, etc., Common Type System (CTS)
  • 27. The CTS defines how types are declared, used and managed in the runtime. So runtime can support cross language integration. The CTS performs the following functions: Establishes a framework that helps enable cross-language integration, type safety, and high performance code execution. Provides an object-oriented model that supports the complete implementation of many programming languages. Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other. The Common Type System supports two general categories of types, each of which is sub divided into further categories: Value Types Reference Types. All types derived from System.Object base type. Common Type System (CTS)
  • 28. Below diagram shows various types and their relations. Instance of a type can be simply value type or self describing type even though they are sub categories of these types. In C#, each predefined type recognized by the compiler and maps into one of the IL built-in types. Type Classification
  • 29. CLS rules define a subset of the CTS; i.e., all the rules that apply to the CTS apply to the CLS, except where stricter rules are defined in the CLS. The CLS works with the CTS to ensure language interoperability. The CLS is a set of standards that all compilers targeting to .NET must support. Most of the compilers will support the subset features offered by the IL and CTS. (Because IL is very rich language). It is perfect to write non-CLS complaint code. But it is not guaranteed to be fully language interoperable. CLS-complaint features applies only to public and protected members of classes and public classes . Within the private implementation of class you can write whatever non-CLS code you want. The common language runtime compiles all code written in a CLS-compliant language, to the same kind of intermediate code (IL) –MSIL. You can mark assemblies, modules, types, and members as either CLS-compliant or not CLS compliant using the CLSCompliantAttribute. Common Language Specifications (CLS)
  • 30. Automatic management is one of the services provided by CLR during managed execution. Automatic memory management can eliminate common problems, such as forgetting to free an object and causing a memory leak, or attempting to access memory for an object that has already been freed. CLR’s Garbage collector will do all theses memory management activities. Garbage collector will release the memory for the unused objects at free time. To optimize the performance of the garbage collector, the managed heap is divided into three generations: 0, 1, and 2. Unmanaged resources require explicit cleanup. (Eg: Object wraps OS resources such as file handle, windows handle, network connection). GC knows the lifetime of the object that wraps these resources. But it doesn’t aware of these resources. So release these resources you need to done in public Dispose method. Automatic Memory Management
  • 31. An assembly is a unit of deployment. Assembly contains code that CLR executes. MSIL code in PE file will not execute if it doesn’t have assembly manifest. Each assembly can have only one entry point ( DllMain , WinMain or Main ). Assembly forms security boundary. So permissions requested at assembly level. Assembly forms version boundary. Assembly is the smallest versionable unit in the CLR. Assemblies are self describing. Assemblies can be static and dynamic. Within Assembly Type information (metadata) Consists of: Describes every class type. Complete Interface Information. Automatically bound into assembly, inseperable, stored in binary format. Assemblies in .NET
  • 33. Assembly is nothing but .NET Library or Executable (PE file format). Single-file or multi-file assemblies. Assembly components are: Metadata, IL Code, Resources. Assemblies eliminate DLL problem. Locations are resolved at runtime. Assembly can contain both managed and unmanaged code. Assemblies: Assemblies Metadata
  • 34. Assemblies cab have Strong name and Version number Publisher can set versioning policy. Publisher can provide strong name to assembly. Domain/Local Administrator can set versioning policy. The runtime resolve several steps to resolve an assembly binding: Checks the original assembly reference to determine the version of the assembly to be bound. Checks for all applicable configuration files to apply version policy. Determines the correct assembly from the original assembly reference and any redirection specified in the configuration files, and determines the version that should be bound to the calling assembly. Checks the GAC, Multiple versions can be loaded side-by-side. Each assembly have two distinct ways of expressing version information: Version Number together with assembly name and culture info. Informational version. Assembly Versioning
  • 35. Managed code runs within the protective confines of the CLR. Before the CLR Executes code: Verifies it for type safety. Enforces the Code Access Security Policy. Remember the CLR sits on top of Windows: CLR Security complements windows security (doesn’t replace). .NET Strongly Enforces the Microsoft Mantra “ Do it our way ”. Security by design by default. “ The Microsoft Way” is secure and easy. Microsoft encourage developers to write secure code by making security implementations easy way. Hard work to make .NET applications insecure. IL can be verified to guarantee type safety No unsafe casts, no un-initialized variables and no out-of-bounds array indexing. Security in .NET
  • 36. Role-based security. Evidence-based, Code Access Securiy Declarative Security Imperative Security Isolated Storage Container Link Demands Cryptography Partially Trusted files can be read/write files through by using standard dialogs. .NET Security Mechanism
  • 37. Type safety verification performed during JIT compile. Primary functions: Ensures methods are called in correct manner (parameters, etc.,). Authorize memory access (thus preventing buffer overruns etc.,) Apply CAS policy. Code produced by C# unsafe keyword cannot be checked. Higher privileges required to run unsafe code. .NET protective environment allows multiple applications to run within one process: 1 .NET Process = Multiple Application Domains. Type Safety Verification
  • 38. Code Access Security (CAS) Grants rights to code depending on “ evidence ”. Unlike Win32 security not based on User’s ID but “ Code’s ID ”. Two primary concepts in CAS are: Code Groups: Compartmentalizes code based on “membership criteria”, e.g.: Location (Internet, Intranet, Local Hard drive) Strong Name (Private Key signature) Custom Criteria (Authentication, XML Signature, etc.,). Code with matching criteria is encapsulated into a Code Group . A Code Group is associated with a Permission Set . Permission Sets: Detailed list of what code can do. Very specific/granular. Code Access Security
  • 39. Application domains provide an isolation boundary for security, reliability, and versioning, and for unloading assemblies. Application domains are typically created by runtime hosts. You can run several application domains in a single process: With the same level of isolation between application domains that would exist in separate processes, but without incurring the additional overhead of making cross-process calls or switching between processes. Dramatically increases server scalability. The isolation provided by application domains has the following benefits: Faults in one application cannot affect other applications. Individual applications can be stopped without stopping the entire process. Code running in one application cannot directly access code or resources from another application. Permissions granted to code can be controlled by application domain in which it is running. Application Domains:
  • 40. At run time, all managed code is loaded into an application domain and is run by a managed thread . There is not a one-to-one correlation between application domains & threads. Several threads can be executing in a single application domain at any given time and a particular thread is not confined to a single application domain. Threads are free to cross application domain boundaries; A new thread is not created for each application domain. The run time keeps track of which threads are running in which application domains. You can locate the domain in which a thread is executing at any time by calling the GetDomain method. Application domains are usually created and manipulated programmati-cally by runtime hosts. The AppDomain class is the programmatic interface to application domains. It has methods to Execute assembly, Unload assembly, etc., Application Domains:
  • 41. Why we need Interoperability? Allow managed and unmanaged code work together. Reusability of COM components. Usage of Windows native API. Challenges for Interoperability are: Synchronize Memory Allocation Object Lifetime Management Security Two Way Communication PInvoke: Efficient and relatively easy way to call existing native code, without having to write glue code. Managed C++ / C++/CLI: Very powerful way to write glue code for complex object models. COM Interop: COM Interfaces and Objects can be used by .NET and Vice Versa. Integration with Legacy Code
  • 42. The common language runtime has been designed to support a variety of different types of applications. Each type of application requires a runtime host to start it. The .NET Framework ships with a number of different runtime hosts, includes: ASP.NET Microsoft IE Shell Executable Microsoft also provides API to create your own runtime hosts. Runtime Hosts
  • 43. You can access data uses ADO.NET. GDI+ allows advanced drawing. Your windows application can make calls exposed through XML web services. You can access OS services. You can develop multi tier distributed applications with the help of .NET. Improved localization support. Windows forms features a security model that is code-based. Extensive XML Supporting classes. With WPF you can build rich media aware applications. Benefits of Windows Applications with .NET
  • 44. Ch. Vishwa Mohan M.Sc., M.Tech Web: http://in.linkedin.com/in/vishwam Phone: +91- 9490995632 For More Details