SlideShare a Scribd company logo
Sanjay Vyas
.NET Framework 4.0



                 Network support
                  and managed
                    services
.NET Framework Current quot;Layer Cakequot;
   .NET Framework 3.5 + SP1
      MVC           Dynamic Data          Entity Framework   Data Services



  .NET Framework 3.5
                      WF & WCF                  Add-in         Additional
      LINQ
                    Enhancements              Framework      Enhancements


  .NET Framework 3.0 + SP1
       Windows         Windows
                                          Windows Workflow   Windows
     Presentation   Communication
                                             Foundation      CardSpace
      Foundation      Foundation


                           .NET Framework 2.0 + SP1
.NET Framework 4.0

         User Interface                              Services                            Data Access

    ASP.NET             Windows                                  Windows
(WebForms, MVC,       Presentation     Data Services          Communication        ADO.NET        Entity Framework
 Dynamic Data)         Foundation                               Foundation



                                                                Windows
   WinForms                             “Velocity”              Workflow                             LINQ to SQL
                                                               Foundation




                                                       Core

                        Managed
                                                                              Dynamic Language
Parallel Extensions    Extensibility       LINQ                 Languages                        Base Class Library
                                                                                  Runtime
                       Framework




                                        Common Language Runtime
Whats New In Base Class Library
   Managed
                  • Declaration & consumption of extensibility points
  Extensibility   • Monitoring for new runtime extension
  Framework
                  • BigInteger
                  • ComplexNumber
 New Data Types   • Tuple
                  • SortedSet




      I/O         • Memory Mapped Files
 Improvements     • Unified Cancelling Model
Managed Extensibility Framework
 Create reusable components
 Don’t we already have reusable components?
   No need to create infrastructure from scratch
   MEF is dynamically composed
 What’s so dynamic about it
   Current plugin model tied to specific apps
   Same component cannot be used across apps
   Discoverable at runtime
   Tagging for rich queries and filtering
MEF Architecture
MEF
 Catalog
   Discovers and maintain extensions
 CompositionContainer
   Coordinate creations and satisfy dependencies
 ComposablePart
   Offer on or more exports
   May depend on imports for extension it uses
Managed Extensibiity Framework
New Language Features

C# 4.0                  VB.NET 10
  Named Parameters
  Optional Parameters
  Dynamic Scoping
                         Statement Lambdas
                         Multiline Lambdas
                         Auto implemented Properties
                         Collection Initializ er
  Generic Variance       Generic Variance
  Extension Property     Extension Property
Optional and Named Parameter
 Some methods have excessive parameters
 Too many overloads of methods
 Most aren’t used in everyday scenario
 Developers still have to supply default values
 Heavy use of Type.Missing
 Comma counting is a pain
 Difficult to remember parameter by position
Overload Of Overloads
class Book
{
        // Multiple constructors
        Book() : this(“”, “”, “”, )
        {
        }

       Book(string isbn) : this(isbn, “”, “”, 0)
       {
       }

       Book(string isbn, string title) : this(isbn, title, “”, 0)
       {
       }

       Book(string isbn, string title, string author) : this(isbn, title, author, 0)
       {
       }

       // Master Constructor which gets called by others
       Book(string isbn, string title, string author, int pages)
       {
           // Do the actual work here
       }
}
Optional Parameters
class Book
{

          // Use optional parameters
          Book(string isbn=“”, string title=“”, string author=“”, int pages=0)
          {
              // Do the actual work here
          }
}

:
:
:
Book   book   =   new   Book(“1-43254-333-1”);
Book   book   =   new   Book(“1-43254-333-1”, “How not to code”);
Book   book   =   new   Book(“1-43254-333-1”, “How not to code”, “Copy Paster”);
Book   book   =   new   Book(“1-43254-333-1”, 240); // Cannot skip parameters
Named Parameter
class Book
{

        // Use optional parameters
        Book(string isbn=“”, string title=“”, string author=“”, int pages=0)
        {
            // Do the actual work here
        }
}

:
:
:
Book book    = new Book(isbn:“1-43254-333-1”);
Book book    = new Book(isbn:“1-43254-333-1”, title:“How not to code”);
Book book    = new Book(isbn:“1-43254-333-1”, title:“How not to code”, author:“Copy
Paster”);
Book book    = new Book(isbn:“1-43254-333-1”, pages:240);
Dynamic scoping
 C# is static type languages
    Types are explicitly defined
    Methods are bound at runtime
 Dynamic dispatch exists
    Reflection API
    Method.Invoke() is tedious
 COM Automation is based on IDispatch
    May not have .TLB
    Lookup can be purely runtime
 Certain Application Types require Dynamism
    E.g. SOAP/REST proxies
Dynamic in .NET 4.0
 CLR is mostly static type
    Compile time type checking (e.g. IUnknown)
 DLR added dynamism to .NET
    Run time type checking (e.g. IDispatch)
 DLR is now part of .NET 4.0 API
    Full support of IronRuby, IronPython
    Dynamic dispatch now built into .NET/C#
Dynamic Dispatch
 Introduction of type – dynamic
    Compiler merely packages information
    Compiler defers binding to runtime
 Built-in support for COM Calls
    Uses IDispatch interface
    PIA not required
 Runtime binding for framework objects
 Build your own – IDynamicObject
    IronPython, IronRuby use this
    E.g. RestProxy
Dynamic Data Type
 Isnt Object type dynamic already?
 .NET already has var, why add dynamic?

 Object – Static type, base class
 var – is ALSO static type, compiler inferred
 dynamic – Evaluation deferred
Dynamic implementation
dynamic d = GetFlyingObject(“Superman”);
d.Fly(); // Up, up and away

dynamic d = GetFlyingObject(“AirPlane”);
d.Fly(); // Take off

dynamic d = GetFlyingObject(“Cat”);
d.Fly(); // OOPS… but at runtime
Dynamic Dispatch
Variance
 Covariance
   Similar to base reference to derived class
   Covariance is applied to arrays, delegates..



 Contravariance
   Similar to derived instance passed to base
Changes to Variance
 Variance can now be applied to Interfaces
    Variant types supports interfaces and delegates
    Variance applies to reference conversion only
    Value types are not supported
 Covariance
    Requires the use of “out” keyword
 Contravariant
    Requires the use of “in” keyword
 It could be automatically inferred but that could lead to
 code-breaking when interface definition changes
Variance
Code Contracts
 Foundation
    Design by contract
    Based on MSR’s SPEC#
 What does it bring?
    Improved testability
    Static verification
    API Documentation
 How does it help?
    Guarantee obligations on entry (parameter validations)
    Guarantee property at exit (return value range)
    Maintain property during execution (object invariance)
Code Contracts
 New namespace in .NET
    System.Diagnostics.Contracts

 Parameter validation
    Contract.Requires()
 Return value guarantee
    Contract.Ensures()
 Object state guarantee
    Contract.Invariant()
Code Contracts
 Compile generates the IL code
 Contracts are conditionally compiled
 Define CONTRACTS_FULL to enable
Code Contracts
Parallelism in .NET 4.0
 Don’t we have multithreading and ThreadPool?
    Requires too much work
    Requires understanding of nitty-gritties
    Bifurcated thinking for single CPU vs. multi
 What does parallelism bring in?
    Make multicore programming simple
    Automatcially handle single vs. multicore
    Focus on “what” rather than “how”
Parallels in .NET
 Task Parallel Library (TPL)
    Task and Data Parallelism
 LINQ to Parallel (PLINQ)
    Use LINQ to implement parallelism on queries
 Coordinated Data Structures
    High performance collection classes which are lock
    free and thread safe
 Parallel Diagnostic Tools
    Parallels Debugger and VSTS Profiler concurrency
    view
Task Parallel Library
 Write code which automatically uses multicore
 Expose potential parallelism in sequential code
 No language extension (aka Syntactic sugar) yet
 Parallelism types
    The Task Class – Task Parallelism
    The Parallel Class – Data Parallelism
 Task Management
    TaskManager class
    Use default or create your own
Task Parallel Library

More Related Content

What's hot

Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnelEntity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
ukdpe
 
C#/.NET Little Wonders
C#/.NET Little WondersC#/.NET Little Wonders
C#/.NET Little Wonders
BlackRabbitCoder
 
CORBA & RMI in java
CORBA & RMI in javaCORBA & RMI in java
CORBA & RMI in java
S mahesh acharya
 
Rest style web services (google protocol buffers) prasad nirantar
Rest style web services (google protocol buffers)   prasad nirantarRest style web services (google protocol buffers)   prasad nirantar
Rest style web services (google protocol buffers) prasad nirantar
IndicThreads
 
.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
aminmesbahi
 
VB.net
VB.netVB.net
VB.net
PallaviKadam
 
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Igor Anishchenko
 
D1 from interfaces to solid
D1 from interfaces to solidD1 from interfaces to solid
D1 from interfaces to solid
Arnaud Bouchez
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overviewbwullems
 
LINQ in C#
LINQ in C#LINQ in C#
LINQ in C#
Basant Medhat
 
C# 3.0 and 4.0
C# 3.0 and 4.0C# 3.0 and 4.0
C# 3.0 and 4.0
Buu Nguyen
 
Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416
Chicago Hadoop Users Group
 
BCA IPU VB.NET UNIT-I
BCA IPU VB.NET UNIT-IBCA IPU VB.NET UNIT-I
BCA IPU VB.NET UNIT-I
Vaibhavj1234
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBA
Peter R. Egli
 

What's hot (20)

Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnelEntity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
 
C#/.NET Little Wonders
C#/.NET Little WondersC#/.NET Little Wonders
C#/.NET Little Wonders
 
CORBA & RMI in java
CORBA & RMI in javaCORBA & RMI in java
CORBA & RMI in java
 
Rest style web services (google protocol buffers) prasad nirantar
Rest style web services (google protocol buffers)   prasad nirantarRest style web services (google protocol buffers)   prasad nirantar
Rest style web services (google protocol buffers) prasad nirantar
 
Corba by Example
Corba by ExampleCorba by Example
Corba by Example
 
Chapter 17 corba
Chapter 17 corbaChapter 17 corba
Chapter 17 corba
 
.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
 
VB.net
VB.netVB.net
VB.net
 
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased Comparison
 
C O R B A Unit 4
C O R B A    Unit 4C O R B A    Unit 4
C O R B A Unit 4
 
D1 from interfaces to solid
D1 from interfaces to solidD1 from interfaces to solid
D1 from interfaces to solid
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overview
 
dot NET Framework
dot NET Frameworkdot NET Framework
dot NET Framework
 
Corba
CorbaCorba
Corba
 
LINQ in C#
LINQ in C#LINQ in C#
LINQ in C#
 
Corba model ppt
Corba model pptCorba model ppt
Corba model ppt
 
C# 3.0 and 4.0
C# 3.0 and 4.0C# 3.0 and 4.0
C# 3.0 and 4.0
 
Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416
 
BCA IPU VB.NET UNIT-I
BCA IPU VB.NET UNIT-IBCA IPU VB.NET UNIT-I
BCA IPU VB.NET UNIT-I
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBA
 

Viewers also liked

The .NET Platform - A Brief Overview
The .NET Platform - A Brief OverviewThe .NET Platform - A Brief Overview
The .NET Platform - A Brief OverviewCarlos Lopes
 
.NET Overview
.NET Overview.NET Overview
.NET Overview
Greg Sohl
 
Overview of .Net Framework
Overview of .Net FrameworkOverview of .Net Framework
Overview of .Net Framework
Neha Singh
 
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishSvetlin Nakov
 
Dotnet framework
Dotnet frameworkDotnet framework
Dotnet frameworkNitu Pandey
 
Overview of .Net Framework 4.5
Overview of .Net Framework 4.5Overview of .Net Framework 4.5
Overview of .Net Framework 4.5
Bhushan Mulmule
 
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)
Vangos Pterneas
 
Leveraging Irrationality
Leveraging IrrationalityLeveraging Irrationality
Leveraging Irrationality
hudacko
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
pinky singh
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net framework
Then Murugeshwari
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework OverviewDoncho Minkov
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# Introduction
Siraj Memon
 
C# Tutorial
C# Tutorial C# Tutorial
C# Tutorial
Jm Ramos
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
Arun Prasad
 

Viewers also liked (17)

The .NET Platform - A Brief Overview
The .NET Platform - A Brief OverviewThe .NET Platform - A Brief Overview
The .NET Platform - A Brief Overview
 
.NET Overview
.NET Overview.NET Overview
.NET Overview
 
Overview of .Net Framework
Overview of .Net FrameworkOverview of .Net Framework
Overview of .Net Framework
 
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
 
Dotnet framework
Dotnet frameworkDotnet framework
Dotnet framework
 
Overview of .Net Framework 4.5
Overview of .Net Framework 4.5Overview of .Net Framework 4.5
Overview of .Net Framework 4.5
 
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)
 
Leveraging Irrationality
Leveraging IrrationalityLeveraging Irrationality
Leveraging Irrationality
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net framework
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# Introduction
 
C# basics
 C# basics C# basics
C# basics
 
C# Tutorial
C# Tutorial C# Tutorial
C# Tutorial
 
Dotnet basics
Dotnet basicsDotnet basics
Dotnet basics
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 

Similar to Overview Of .Net 4.0 Sanjay Vyas

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
Harish Ranganathan
 
LINQ/PLINQ
LINQ/PLINQLINQ/PLINQ
LINQ/PLINQ
melbournepatterns
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
Dave Bost
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0
Bruce Johnson
 
Introduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayambaIntroduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayambaPrageeth Sandakalum
 
What’s New and Hot in .NET 4.0
What’s New and Hot in .NET 4.0What’s New and Hot in .NET 4.0
What’s New and Hot in .NET 4.0
Jess Chadwick
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
Malam Team
 
Hidden Facts of .NET Language Gems
Hidden Facts of .NET Language GemsHidden Facts of .NET Language Gems
Hidden Facts of .NET Language Gems
Abhishek Sur
 
Why do I Love C#?
Why do I Love C#?Why do I Love C#?
Why do I Love C#?
Abhishek Sur
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
Intro dotnet
Intro dotnetIntro dotnet
Visual Studio 2010 IDE Enhancements - Alex Mackey, Readify
Visual Studio 2010 IDE Enhancements - Alex Mackey, ReadifyVisual Studio 2010 IDE Enhancements - Alex Mackey, Readify
Visual Studio 2010 IDE Enhancements - Alex Mackey, ReadifyREADIFY
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
Maarten Balliauw
 
Spring 3 - Der dritte Frühling
Spring 3 - Der dritte FrühlingSpring 3 - Der dritte Frühling
Spring 3 - Der dritte Frühling
Thorsten Kamann
 
.Net overview
.Net overview.Net overview
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
Gautam Rege
 
SynapseIndia dotnet framework library
SynapseIndia  dotnet framework librarySynapseIndia  dotnet framework library
SynapseIndia dotnet framework library
Synapseindiappsdevelopment
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet IntroductionWei Sun
 

Similar to Overview Of .Net 4.0 Sanjay Vyas (20)

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
 
LINQ/PLINQ
LINQ/PLINQLINQ/PLINQ
LINQ/PLINQ
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0
 
Introduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayambaIntroduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayamba
 
What’s New and Hot in .NET 4.0
What’s New and Hot in .NET 4.0What’s New and Hot in .NET 4.0
What’s New and Hot in .NET 4.0
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
Hidden Facts of .NET Language Gems
Hidden Facts of .NET Language GemsHidden Facts of .NET Language Gems
Hidden Facts of .NET Language Gems
 
Why do I Love C#?
Why do I Love C#?Why do I Love C#?
Why do I Love C#?
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Visual Studio 2010 IDE Enhancements - Alex Mackey, Readify
Visual Studio 2010 IDE Enhancements - Alex Mackey, ReadifyVisual Studio 2010 IDE Enhancements - Alex Mackey, Readify
Visual Studio 2010 IDE Enhancements - Alex Mackey, Readify
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
Spring 3 - Der dritte Frühling
Spring 3 - Der dritte FrühlingSpring 3 - Der dritte Frühling
Spring 3 - Der dritte Frühling
 
.Net overview
.Net overview.Net overview
.Net overview
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Net overview
Net overviewNet overview
Net overview
 
SynapseIndia dotnet framework library
SynapseIndia  dotnet framework librarySynapseIndia  dotnet framework library
SynapseIndia dotnet framework library
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
 

More from rsnarayanan

Kevin Ms Web Platform
Kevin Ms Web PlatformKevin Ms Web Platform
Kevin Ms Web Platformrsnarayanan
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnetrsnarayanan
 
Harish Aspnet Dynamic Data
Harish Aspnet Dynamic DataHarish Aspnet Dynamic Data
Harish Aspnet Dynamic Datarsnarayanan
 
Harish Aspnet Deployment
Harish Aspnet DeploymentHarish Aspnet Deployment
Harish Aspnet Deploymentrsnarayanan
 
Whats New In Sl3
Whats New In Sl3Whats New In Sl3
Whats New In Sl3rsnarayanan
 
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...rsnarayanan
 
Advanced Silverlight
Advanced SilverlightAdvanced Silverlight
Advanced Silverlightrsnarayanan
 
Occasionally Connected Systems
Occasionally Connected SystemsOccasionally Connected Systems
Occasionally Connected Systemsrsnarayanan
 
Developing Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And ServicesDeveloping Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And Servicesrsnarayanan
 
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...rsnarayanan
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Libraryrsnarayanan
 
Ms Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My SqlMs Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My Sqlrsnarayanan
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developersrsnarayanan
 
What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1rsnarayanan
 
Ux For Developers
Ux For DevelopersUx For Developers
Ux For Developersrsnarayanan
 
A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8rsnarayanan
 

More from rsnarayanan (20)

Walther Aspnet4
Walther Aspnet4Walther Aspnet4
Walther Aspnet4
 
Walther Ajax4
Walther Ajax4Walther Ajax4
Walther Ajax4
 
Kevin Ms Web Platform
Kevin Ms Web PlatformKevin Ms Web Platform
Kevin Ms Web Platform
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnet
 
Walther Mvc
Walther MvcWalther Mvc
Walther Mvc
 
Harish Aspnet Dynamic Data
Harish Aspnet Dynamic DataHarish Aspnet Dynamic Data
Harish Aspnet Dynamic Data
 
Harish Aspnet Deployment
Harish Aspnet DeploymentHarish Aspnet Deployment
Harish Aspnet Deployment
 
Whats New In Sl3
Whats New In Sl3Whats New In Sl3
Whats New In Sl3
 
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
 
Advanced Silverlight
Advanced SilverlightAdvanced Silverlight
Advanced Silverlight
 
Netcf Gc
Netcf GcNetcf Gc
Netcf Gc
 
Occasionally Connected Systems
Occasionally Connected SystemsOccasionally Connected Systems
Occasionally Connected Systems
 
Developing Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And ServicesDeveloping Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And Services
 
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Library
 
Ms Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My SqlMs Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My Sql
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developers
 
What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1
 
Ux For Developers
Ux For DevelopersUx For Developers
Ux For Developers
 
A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8
 

Recently uploaded

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 

Recently uploaded (20)

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 

Overview Of .Net 4.0 Sanjay Vyas

  • 2. .NET Framework 4.0 Network support and managed services
  • 3. .NET Framework Current quot;Layer Cakequot; .NET Framework 3.5 + SP1 MVC Dynamic Data Entity Framework Data Services .NET Framework 3.5 WF & WCF Add-in Additional LINQ Enhancements Framework Enhancements .NET Framework 3.0 + SP1 Windows Windows Windows Workflow Windows Presentation Communication Foundation CardSpace Foundation Foundation .NET Framework 2.0 + SP1
  • 4. .NET Framework 4.0 User Interface Services Data Access ASP.NET Windows Windows (WebForms, MVC, Presentation Data Services Communication ADO.NET Entity Framework Dynamic Data) Foundation Foundation Windows WinForms “Velocity” Workflow LINQ to SQL Foundation Core Managed Dynamic Language Parallel Extensions Extensibility LINQ Languages Base Class Library Runtime Framework Common Language Runtime
  • 5. Whats New In Base Class Library Managed • Declaration & consumption of extensibility points Extensibility • Monitoring for new runtime extension Framework • BigInteger • ComplexNumber New Data Types • Tuple • SortedSet I/O • Memory Mapped Files Improvements • Unified Cancelling Model
  • 6. Managed Extensibility Framework Create reusable components Don’t we already have reusable components? No need to create infrastructure from scratch MEF is dynamically composed What’s so dynamic about it Current plugin model tied to specific apps Same component cannot be used across apps Discoverable at runtime Tagging for rich queries and filtering
  • 8. MEF Catalog Discovers and maintain extensions CompositionContainer Coordinate creations and satisfy dependencies ComposablePart Offer on or more exports May depend on imports for extension it uses
  • 10. New Language Features C# 4.0 VB.NET 10 Named Parameters Optional Parameters Dynamic Scoping Statement Lambdas Multiline Lambdas Auto implemented Properties Collection Initializ er Generic Variance Generic Variance Extension Property Extension Property
  • 11. Optional and Named Parameter Some methods have excessive parameters Too many overloads of methods Most aren’t used in everyday scenario Developers still have to supply default values Heavy use of Type.Missing Comma counting is a pain Difficult to remember parameter by position
  • 12. Overload Of Overloads class Book { // Multiple constructors Book() : this(“”, “”, “”, ) { } Book(string isbn) : this(isbn, “”, “”, 0) { } Book(string isbn, string title) : this(isbn, title, “”, 0) { } Book(string isbn, string title, string author) : this(isbn, title, author, 0) { } // Master Constructor which gets called by others Book(string isbn, string title, string author, int pages) { // Do the actual work here } }
  • 13. Optional Parameters class Book { // Use optional parameters Book(string isbn=“”, string title=“”, string author=“”, int pages=0) { // Do the actual work here } } : : : Book book = new Book(“1-43254-333-1”); Book book = new Book(“1-43254-333-1”, “How not to code”); Book book = new Book(“1-43254-333-1”, “How not to code”, “Copy Paster”); Book book = new Book(“1-43254-333-1”, 240); // Cannot skip parameters
  • 14. Named Parameter class Book { // Use optional parameters Book(string isbn=“”, string title=“”, string author=“”, int pages=0) { // Do the actual work here } } : : : Book book = new Book(isbn:“1-43254-333-1”); Book book = new Book(isbn:“1-43254-333-1”, title:“How not to code”); Book book = new Book(isbn:“1-43254-333-1”, title:“How not to code”, author:“Copy Paster”); Book book = new Book(isbn:“1-43254-333-1”, pages:240);
  • 15. Dynamic scoping C# is static type languages Types are explicitly defined Methods are bound at runtime Dynamic dispatch exists Reflection API Method.Invoke() is tedious COM Automation is based on IDispatch May not have .TLB Lookup can be purely runtime Certain Application Types require Dynamism E.g. SOAP/REST proxies
  • 16. Dynamic in .NET 4.0 CLR is mostly static type Compile time type checking (e.g. IUnknown) DLR added dynamism to .NET Run time type checking (e.g. IDispatch) DLR is now part of .NET 4.0 API Full support of IronRuby, IronPython Dynamic dispatch now built into .NET/C#
  • 17.
  • 18. Dynamic Dispatch Introduction of type – dynamic Compiler merely packages information Compiler defers binding to runtime Built-in support for COM Calls Uses IDispatch interface PIA not required Runtime binding for framework objects Build your own – IDynamicObject IronPython, IronRuby use this E.g. RestProxy
  • 19. Dynamic Data Type Isnt Object type dynamic already? .NET already has var, why add dynamic? Object – Static type, base class var – is ALSO static type, compiler inferred dynamic – Evaluation deferred
  • 20. Dynamic implementation dynamic d = GetFlyingObject(“Superman”); d.Fly(); // Up, up and away dynamic d = GetFlyingObject(“AirPlane”); d.Fly(); // Take off dynamic d = GetFlyingObject(“Cat”); d.Fly(); // OOPS… but at runtime
  • 22. Variance Covariance Similar to base reference to derived class Covariance is applied to arrays, delegates.. Contravariance Similar to derived instance passed to base
  • 23. Changes to Variance Variance can now be applied to Interfaces Variant types supports interfaces and delegates Variance applies to reference conversion only Value types are not supported Covariance Requires the use of “out” keyword Contravariant Requires the use of “in” keyword It could be automatically inferred but that could lead to code-breaking when interface definition changes
  • 25. Code Contracts Foundation Design by contract Based on MSR’s SPEC# What does it bring? Improved testability Static verification API Documentation How does it help? Guarantee obligations on entry (parameter validations) Guarantee property at exit (return value range) Maintain property during execution (object invariance)
  • 26. Code Contracts New namespace in .NET System.Diagnostics.Contracts Parameter validation Contract.Requires() Return value guarantee Contract.Ensures() Object state guarantee Contract.Invariant()
  • 27. Code Contracts Compile generates the IL code Contracts are conditionally compiled Define CONTRACTS_FULL to enable
  • 29. Parallelism in .NET 4.0 Don’t we have multithreading and ThreadPool? Requires too much work Requires understanding of nitty-gritties Bifurcated thinking for single CPU vs. multi What does parallelism bring in? Make multicore programming simple Automatcially handle single vs. multicore Focus on “what” rather than “how”
  • 30. Parallels in .NET Task Parallel Library (TPL) Task and Data Parallelism LINQ to Parallel (PLINQ) Use LINQ to implement parallelism on queries Coordinated Data Structures High performance collection classes which are lock free and thread safe Parallel Diagnostic Tools Parallels Debugger and VSTS Profiler concurrency view
  • 31. Task Parallel Library Write code which automatically uses multicore Expose potential parallelism in sequential code No language extension (aka Syntactic sugar) yet Parallelism types The Task Class – Task Parallelism The Parallel Class – Data Parallelism Task Management TaskManager class Use default or create your own