SlideShare ist ein Scribd-Unternehmen logo
1 von 19
By Abhishek Sur

 Website: www.abhisheksur.com
Email : contact@abhisheksur.com
.NET Infrastructure

      User Interface                                   Services                             Data Access
   ASP.NET
                        Windows                Windows                Windows
 (Web Forms,                                                                                                  Entity
                      Presentation          Communication             Workflow         ADO.NET
MVC, Dynamic                                                                                               Framework
                      Foundation              Foundation             Foundation
    Data)




          Win Forms                          Data Services                                       LINQ to SQL
                                                                         Cloud
                                               (ODATA)




                                                             Core

        Objects                  Generics                     LINQ                Dynamic                Async




                                                    Base Class Library


                                             Common Language Runtime
Agenda
                   Iterators

                   Delegates

                    Events

    Language       Generics


      GEMS     Extension Methods

                     LINQ

                Dynamic Types

                    Async
What are loops ?
   A repetition of instructions ?
   A logical jump in code
   Or a representation of GoTo with a condition…

Types of Loops
   While
   do-while
   for
   goto ?... Lets take an example
   Represented by IEnumerable and IEnumerator
    (which is not a collection)
   Ability to Pause – Resume a method.
   foreach is a syntactic sugar to iterate over an
    iterator.
   Yield is used to generate an iterator
Iterators
Delegates
       Delegates are special types
       Delegate points to Methods
       MulticastDelegates maintains an Invocation
        List


Events
       Events are Wrappers to Delegates
       Cleaner pattern to handle Delegates
       Allows components to subscribe to it by
        passing event handlers.
Delegates & Events
Generics
   Type as Template
   Constraint on Generic Types
   It can be applied on Types, Method, Delegates
    etc.
   Variance is supported
Extension Methods
   Extend your predefined Types without
    inheritance
   Uses ExtensionAttribute to identify extension
    method.
Generics &
Extension Methods
Anonymous Language Object
   Object can exist in language without name
   Cleaner codebase.
   Anonymous methods are used as Closures.
   We use delegate to refer anonymous methods
    and var for types.
LINQ
   Search inside Managed objects
   Simple projection, selection, grouping, joins
    and many more…
Anonymous Types &
             LINQ
Dynamic in .NET 4.0
   CLR is mostly static type
    ◦ Compile time type checking
   DLR added dynamism to .NET
    ◦ Run time type checking
   Object – Static type, base class
   var – is ALSO static type, compiler inferred
   dynamic – Evaluation deferred
   Expandable objects
Dynamic
New Asynchronous Pattern

   Contextual async & await pattern simplifies
    complex Threading model or existing pattern
    of coding
   Async is not about Concurrency but rather it is
    truly asynchrony.
   It can easily plugged in without changing the
    logic.
   Compiler generates state machine to resume
    methods
Async & Await
Exposing the Compiler
   Ability to run compiler as a service.
   Syntax tree, Binder, Expression all are
    available through code.
Abhishek Sur, MVP (Client App Dev)


         www.abhisheksur.com
        Email: contact@abhisheksur.com
        Twitter : @abhi2434



        Thank you.

Weitere ähnliche Inhalte

Was ist angesagt?

Dealing with Run-Time Variability in Service Robotics: Towards a DSL for Non-...
Dealing with Run-Time Variability in Service Robotics: Towards a DSL for Non-...Dealing with Run-Time Variability in Service Robotics: Towards a DSL for Non-...
Dealing with Run-Time Variability in Service Robotics: Towards a DSL for Non-...
Serge Stinckwich
 

Was ist angesagt? (9)

Entity Framework - Object Services
Entity Framework -  Object ServicesEntity Framework -  Object Services
Entity Framework - Object Services
 
Net remoting
Net remotingNet remoting
Net remoting
 
Azure Service Fabric - weaving services in hyper-scale
Azure Service Fabric - weaving services in hyper-scaleAzure Service Fabric - weaving services in hyper-scale
Azure Service Fabric - weaving services in hyper-scale
 
Java rmi
Java rmiJava rmi
Java rmi
 
Clean architecture with ddd layering in php
Clean architecture with ddd layering in phpClean architecture with ddd layering in php
Clean architecture with ddd layering in php
 
Dealing with Run-Time Variability in Service Robotics: Towards a DSL for Non-...
Dealing with Run-Time Variability in Service Robotics: Towards a DSL for Non-...Dealing with Run-Time Variability in Service Robotics: Towards a DSL for Non-...
Dealing with Run-Time Variability in Service Robotics: Towards a DSL for Non-...
 
Corba in power system
Corba in power systemCorba in power system
Corba in power system
 
An Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHPAn Introduction to Domain Driven Design in PHP
An Introduction to Domain Driven Design in PHP
 
Implementing DDD Concepts in PHP
Implementing DDD Concepts in PHPImplementing DDD Concepts in PHP
Implementing DDD Concepts in PHP
 

Andere mochten auch

La intervencion clinica perspectiva general
La intervencion clinica perspectiva generalLa intervencion clinica perspectiva general
La intervencion clinica perspectiva general
dumatv
 
La entrevista en psicologia clinica b
La entrevista en psicologia clinica bLa entrevista en psicologia clinica b
La entrevista en psicologia clinica b
dumatv
 
Clinica de la sugestion, clinica del significante luz mery zapata[1]
Clinica de la sugestion, clinica del significante   luz mery zapata[1]Clinica de la sugestion, clinica del significante   luz mery zapata[1]
Clinica de la sugestion, clinica del significante luz mery zapata[1]
dumatv
 
Intervencion clinica perspectiva general
Intervencion clinica perspectiva generalIntervencion clinica perspectiva general
Intervencion clinica perspectiva general
dumatv
 
Primer nivel, habilidades basicas
Primer nivel, habilidades basicasPrimer nivel, habilidades basicas
Primer nivel, habilidades basicas
dumatv
 

Andere mochten auch (17)

Ao thuat
Ao thuatAo thuat
Ao thuat
 
La intervencion clinica perspectiva general
La intervencion clinica perspectiva generalLa intervencion clinica perspectiva general
La intervencion clinica perspectiva general
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0
 
La entrevista en psicologia clinica b
La entrevista en psicologia clinica bLa entrevista en psicologia clinica b
La entrevista en psicologia clinica b
 
Managing A Youth Track Club
Managing A Youth Track ClubManaging A Youth Track Club
Managing A Youth Track Club
 
SQL Server2012 Enhancements
SQL Server2012 EnhancementsSQL Server2012 Enhancements
SQL Server2012 Enhancements
 
Clinica de la sugestion, clinica del significante luz mery zapata[1]
Clinica de la sugestion, clinica del significante   luz mery zapata[1]Clinica de la sugestion, clinica del significante   luz mery zapata[1]
Clinica de la sugestion, clinica del significante luz mery zapata[1]
 
Bam cap mang
Bam cap mangBam cap mang
Bam cap mang
 
Coaches Advisory Committee Report
Coaches Advisory Committee ReportCoaches Advisory Committee Report
Coaches Advisory Committee Report
 
Intervencion clinica perspectiva general
Intervencion clinica perspectiva generalIntervencion clinica perspectiva general
Intervencion clinica perspectiva general
 
Primer nivel, habilidades basicas
Primer nivel, habilidades basicasPrimer nivel, habilidades basicas
Primer nivel, habilidades basicas
 
Asynchronous handlers in asp.net
Asynchronous handlers in asp.netAsynchronous handlers in asp.net
Asynchronous handlers in asp.net
 
The Magic of WPF & MVVM
The Magic of WPF & MVVMThe Magic of WPF & MVVM
The Magic of WPF & MVVM
 
Clinic for jump coaches proposal
Clinic for jump coaches proposalClinic for jump coaches proposal
Clinic for jump coaches proposal
 
ASP.NET 4.0 Demo
ASP.NET 4.0 DemoASP.NET 4.0 Demo
ASP.NET 4.0 Demo
 
Ame implementation-guide
Ame implementation-guideAme implementation-guide
Ame implementation-guide
 
Windows Presentation Foundation
Windows Presentation FoundationWindows Presentation Foundation
Windows Presentation Foundation
 

Ähnlich wie Hidden Facts of .NET Language Gems

Overview Of .Net 4.0 Sanjay Vyas
Overview Of .Net 4.0   Sanjay VyasOverview Of .Net 4.0   Sanjay Vyas
Overview Of .Net 4.0 Sanjay Vyas
rsnarayanan
 
WCF, EF, Katmanlı Model
WCF, EF, Katmanlı ModelWCF, EF, Katmanlı Model
WCF, EF, Katmanlı Model
zenithbilisim
 
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
Prageeth Sandakalum
 
Summer Training In Dotnet
Summer Training In DotnetSummer Training In Dotnet
Summer Training In Dotnet
DUCC Systems
 
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
READIFY
 

Ähnlich wie Hidden Facts of .NET Language Gems (20)

Overview Of .Net 4.0 Sanjay Vyas
Overview Of .Net 4.0   Sanjay VyasOverview Of .Net 4.0   Sanjay Vyas
Overview Of .Net 4.0 Sanjay Vyas
 
Nuno Godinho
Nuno GodinhoNuno Godinho
Nuno Godinho
 
LINQ/PLINQ
LINQ/PLINQLINQ/PLINQ
LINQ/PLINQ
 
6 Months Net
6 Months Net6 Months Net
6 Months Net
 
WCF, EF, Katmanlı Model
WCF, EF, Katmanlı ModelWCF, EF, Katmanlı Model
WCF, EF, Katmanlı Model
 
Trakya Üniversitesi Workshop
Trakya Üniversitesi WorkshopTrakya Üniversitesi Workshop
Trakya Üniversitesi Workshop
 
Developing Actors in Azure with .net
Developing Actors in Azure with .netDeveloping Actors in Azure with .net
Developing Actors in Azure with .net
 
Getting started with entity framework
Getting started with entity framework Getting started with entity framework
Getting started with entity framework
 
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
 
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource GroupLINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
 
Summer Training In Dotnet
Summer Training In DotnetSummer Training In Dotnet
Summer Training In Dotnet
 
Summer training in dotnet
Summer training in dotnetSummer training in dotnet
Summer training in 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
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstElements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code First
 
Sap ep admin online training
Sap ep admin online trainingSap ep admin online training
Sap ep admin online training
 
Windows Azure For Architects
Windows Azure For ArchitectsWindows Azure For Architects
Windows Azure For Architects
 
Windows 8 für .net Entwickler
Windows 8 für .net EntwicklerWindows 8 für .net Entwickler
Windows 8 für .net Entwickler
 
Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
Framework Engineering
Framework EngineeringFramework Engineering
Framework Engineering
 

Mehr von Abhishek Sur

Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performance
Abhishek Sur
 
Introduction to XAML and its features
Introduction to XAML and its featuresIntroduction to XAML and its features
Introduction to XAML and its features
Abhishek Sur
 
Overview of Azure and Cloud Computing
Overview of Azure and Cloud ComputingOverview of Azure and Cloud Computing
Overview of Azure and Cloud Computing
Abhishek Sur
 

Mehr von Abhishek Sur (20)

Azure servicefabric
Azure servicefabricAzure servicefabric
Azure servicefabric
 
Building a bot with an intent
Building a bot with an intentBuilding a bot with an intent
Building a bot with an intent
 
Code review
Code reviewCode review
Code review
 
C# 7.0 Hacks and Features
C# 7.0 Hacks and FeaturesC# 7.0 Hacks and Features
C# 7.0 Hacks and Features
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Stream Analytics Service in Azure
Stream Analytics Service in AzureStream Analytics Service in Azure
Stream Analytics Service in Azure
 
Designing azure compute and storage infrastructure
Designing azure compute and storage infrastructureDesigning azure compute and storage infrastructure
Designing azure compute and storage infrastructure
 
Working with Azure Resource Manager Templates
Working with Azure Resource Manager TemplatesWorking with Azure Resource Manager Templates
Working with Azure Resource Manager Templates
 
F12 debugging in Ms edge
F12 debugging in Ms edgeF12 debugging in Ms edge
F12 debugging in Ms edge
 
Mobile Services for Windows Azure
Mobile Services for Windows AzureMobile Services for Windows Azure
Mobile Services for Windows Azure
 
Service bus to build Bridges
Service bus to build BridgesService bus to build Bridges
Service bus to build Bridges
 
Windows azure pack overview
Windows azure pack overviewWindows azure pack overview
Windows azure pack overview
 
AMicrosoft azure hyper v recovery manager overview
AMicrosoft azure hyper v recovery manager overviewAMicrosoft azure hyper v recovery manager overview
AMicrosoft azure hyper v recovery manager overview
 
Di api di server b1 ws
Di api di server b1 wsDi api di server b1 ws
Di api di server b1 ws
 
Integrating cortana with wp8 app
Integrating cortana with wp8 appIntegrating cortana with wp8 app
Integrating cortana with wp8 app
 
Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performance
 
Introduction to XAML and its features
Introduction to XAML and its featuresIntroduction to XAML and its features
Introduction to XAML and its features
 
Dev days Visual Studio 2012 Enhancements
Dev days Visual Studio 2012 EnhancementsDev days Visual Studio 2012 Enhancements
Dev days Visual Studio 2012 Enhancements
 
ASP.NET 4.5 webforms
ASP.NET 4.5 webformsASP.NET 4.5 webforms
ASP.NET 4.5 webforms
 
Overview of Azure and Cloud Computing
Overview of Azure and Cloud ComputingOverview of Azure and Cloud Computing
Overview of Azure and Cloud Computing
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Hidden Facts of .NET Language Gems

  • 1. By Abhishek Sur Website: www.abhisheksur.com Email : contact@abhisheksur.com
  • 2. .NET Infrastructure User Interface Services Data Access ASP.NET Windows Windows Windows (Web Forms, Entity Presentation Communication Workflow ADO.NET MVC, Dynamic Framework Foundation Foundation Foundation Data) Win Forms Data Services LINQ to SQL Cloud (ODATA) Core Objects Generics LINQ Dynamic Async Base Class Library Common Language Runtime
  • 3. Agenda Iterators Delegates Events Language Generics GEMS Extension Methods LINQ Dynamic Types Async
  • 4. What are loops ?  A repetition of instructions ?  A logical jump in code  Or a representation of GoTo with a condition… Types of Loops  While  do-while  for  goto ?... Lets take an example
  • 5. Represented by IEnumerable and IEnumerator (which is not a collection)  Ability to Pause – Resume a method.  foreach is a syntactic sugar to iterate over an iterator.  Yield is used to generate an iterator
  • 6.
  • 8. Delegates  Delegates are special types  Delegate points to Methods  MulticastDelegates maintains an Invocation List Events  Events are Wrappers to Delegates  Cleaner pattern to handle Delegates  Allows components to subscribe to it by passing event handlers.
  • 10. Generics  Type as Template  Constraint on Generic Types  It can be applied on Types, Method, Delegates etc.  Variance is supported Extension Methods  Extend your predefined Types without inheritance  Uses ExtensionAttribute to identify extension method.
  • 12. Anonymous Language Object  Object can exist in language without name  Cleaner codebase.  Anonymous methods are used as Closures.  We use delegate to refer anonymous methods and var for types. LINQ  Search inside Managed objects  Simple projection, selection, grouping, joins and many more…
  • 14. Dynamic in .NET 4.0  CLR is mostly static type ◦ Compile time type checking  DLR added dynamism to .NET ◦ Run time type checking  Object – Static type, base class  var – is ALSO static type, compiler inferred  dynamic – Evaluation deferred  Expandable objects
  • 16. New Asynchronous Pattern  Contextual async & await pattern simplifies complex Threading model or existing pattern of coding  Async is not about Concurrency but rather it is truly asynchrony.  It can easily plugged in without changing the logic.  Compiler generates state machine to resume methods
  • 18. Exposing the Compiler  Ability to run compiler as a service.  Syntax tree, Binder, Expression all are available through code.
  • 19. Abhishek Sur, MVP (Client App Dev) www.abhisheksur.com Email: contact@abhisheksur.com Twitter : @abhi2434 Thank you.