SlideShare ist ein Scribd-Unternehmen logo
1 von 44
.Net 4.0 Giovanni Bassi [email_address] unplugged.giggio.net scrumdev.com.br @giovannibassi Consultor Independente
 
Agenda
CLR versus .NET Framework .NET 1.0 .NET 1.1 .NET 2.0 3.0 3.5 .NET 4 2002 2003 2008 CTP 2005-08 CLR 1.0 CLR 1.1 CLR 2.0 CLR 4 SP1
O .NET Framework WPF Win Forms DLR ASP.NET WCF E mais! LINQ Base Class Libraries The CLR JIT & NGEN Garbage Collector Security Model Exception Handling Loader & Binder
Os pilares Parallel Computing Task Parallel Library Parallel LINQ Data Access Entity Framework 4 Data Services 1.5 Runtime DLR Integration Type Equivalence In-Process SxS
Compatibilidade do .NET Framework ,[object Object],[object Object],[object Object]
.NET Framework Compatibility ,[object Object],[object Object]
CLR 2 – Rodando lado a lado Host Process (i.e. Outlook) 1.1 add-in .NET 1.1 .NET 2.0 2.0 add-in 3.0 3.5 3.0 add-in 3.5 add-in
.NET 2.0 2.0 add-in 3.0 3.5 Host Process (i.e. Outlook) 3.0 add-in 3.5 add-in .NET 4.0 4.0 add-in
Web Forms 4 - Client ID ,[object Object],[object Object],[object Object],[object Object],1) User Control (No ID) 2) User Control (“HeaderForm”) 3) Drop Down List (“States”)
Web Forms 4 - Routing ASP.NET Routing Route: Product/{name} -> Product.aspx WebForms Page File Name: Product.aspx Route Values: Name = “Bikes” Request: Products/Bikes Response
 
WPF 4 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Managed Extensibility Framework? ,[object Object]
Open/Closed Principle ,[object Object],[object Object],[object Object]
[object Object]
 
Code Contracts  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ferramental: 2 Edições ,[object Object],[object Object],[object Object],[object Object],[object Object]
Code Contracts
 
Entity Framework 4 ,[object Object],[object Object],[object Object],[object Object]
 
Muitas novidades no WF/WCF 4 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
WCF ,[object Object],[object Object],[object Object],[object Object],[object Object],ADO.NET Data Services 1.5
 
A iniciativa de computação paralela ,[object Object],[object Object]
Computação paralela com .NET 4 ,[object Object],[object Object],[object Object]
Parallel LINQ ,[object Object],var q = from p in people          where p.Name == queryInfo.Name &&  p.State == queryInfo.State && p.Year >= yearStart && p.Year <= yearEnd          orderby p.Year ascending          select p;
 
Porque a DLR? Common Language Runtime Estaticamente tipados C# VB Ruby Python Dinamicamente tipados
Porque a DLR? Common Language Runtime Statically-Typed C# VB Ruby Python Dynamically-Typed Dynamic Language Runtime Estaticamente tipados Dinamicamente tipados
Python Binder Ruby Binder COM Binder JScript Binder Object Binder Dynamic Language Runtime Expression Trees Dynamic Dispatch Call Site Caching IronPython IronRuby C# VB.NET Others… .NET Dynamic Programming
Calculator  calc = GetCalculator(); int  sum = calc.Add(10, 20); object  calc = GetCalculator(); Type  calcType = calc.GetType(); object  res = calcType.InvokeMember( &quot;Add&quot; , BindingFlags.InvokeMethod,  null , new   object [] { 10, 20 }); int  sum = Convert.ToInt32(res); ScriptObject  calc = GetCalculator(); object  res = calc.Invoke( &quot;Add&quot; , 10, 20); int  sum =  Convert .ToInt32(res); dynamic  calc = GetCalculator(); int  sum = calc.Add(10, 20); Statically  typed to be dynamic Dynamic method invocation Dynamic conversion Dynamically Typed Objects
 
Equivalência de tipos ,[object Object],[object Object],[object Object],[object Object]
No entanto… ,[object Object]
Morra, PIA, morra! ,[object Object],[object Object]
 
[object Object],Training Kit do Visual Studio 2010
Links ,[object Object],[object Object],[object Object],[object Object]
 
Giovanni Bassi [email_address] unplugged.giggio.net scrumdev.com.br @giovannibassi

Weitere ähnliche Inhalte

Andere mochten auch

Making a Collective Difference and Leaving a Legacy
Making a Collective Difference and Leaving a LegacyMaking a Collective Difference and Leaving a Legacy
Making a Collective Difference and Leaving a Legacy
Jeanette Murphy
 
Smartphone & journalisten
Smartphone & journalistenSmartphone & journalisten
Smartphone & journalisten
Bart Brouwers
 
Udayan Care Volunteer Programme For Slideshare
Udayan Care Volunteer Programme For SlideshareUdayan Care Volunteer Programme For Slideshare
Udayan Care Volunteer Programme For Slideshare
kiran modi
 
Jarrera eta Ikaskuntza Donostia 2011 1. gaia
Jarrera eta Ikaskuntza Donostia 2011 1. gaiaJarrera eta Ikaskuntza Donostia 2011 1. gaia
Jarrera eta Ikaskuntza Donostia 2011 1. gaia
KirolPsikologia
 
Putauaki Primary Inquiry Learning Tackle Box Stages
Putauaki Primary Inquiry Learning Tackle Box StagesPutauaki Primary Inquiry Learning Tackle Box Stages
Putauaki Primary Inquiry Learning Tackle Box Stages
Jeanette Murphy
 
TTB - Theme Scavenger Hunt
TTB - Theme Scavenger HuntTTB - Theme Scavenger Hunt
TTB - Theme Scavenger Hunt
Jeanette Murphy
 
C:\documents and settings\beheerder\my documents\hyperlocal\10rules
C:\documents and settings\beheerder\my documents\hyperlocal\10rulesC:\documents and settings\beheerder\my documents\hyperlocal\10rules
C:\documents and settings\beheerder\my documents\hyperlocal\10rules
Bart Brouwers
 
Auto-loading of Drupal CCK Nodes
Auto-loading of Drupal CCK NodesAuto-loading of Drupal CCK Nodes
Auto-loading of Drupal CCK Nodes
nihiliad
 
Networking For Interview Success Tips, Techniques And Takeaways 6.28.2011
Networking For Interview Success   Tips, Techniques And Takeaways 6.28.2011Networking For Interview Success   Tips, Techniques And Takeaways 6.28.2011
Networking For Interview Success Tips, Techniques And Takeaways 6.28.2011
mythicgroup
 
Spyder Advisor Capabilities
Spyder Advisor CapabilitiesSpyder Advisor Capabilities
Spyder Advisor Capabilities
Jeannine Ritter
 

Andere mochten auch (20)

Making a Collective Difference and Leaving a Legacy
Making a Collective Difference and Leaving a LegacyMaking a Collective Difference and Leaving a Legacy
Making a Collective Difference and Leaving a Legacy
 
Smartphone & journalisten
Smartphone & journalistenSmartphone & journalisten
Smartphone & journalisten
 
Peformance, The Politician And The Citizen
Peformance, The Politician And The CitizenPeformance, The Politician And The Citizen
Peformance, The Politician And The Citizen
 
Udayan Care Volunteer Programme For Slideshare
Udayan Care Volunteer Programme For SlideshareUdayan Care Volunteer Programme For Slideshare
Udayan Care Volunteer Programme For Slideshare
 
Reptiles
ReptilesReptiles
Reptiles
 
Where Humanity Cries
Where Humanity CriesWhere Humanity Cries
Where Humanity Cries
 
Spinergy Slides 12 2008
Spinergy Slides 12 2008Spinergy Slides 12 2008
Spinergy Slides 12 2008
 
Jarrera eta Ikaskuntza Donostia 2011 1. gaia
Jarrera eta Ikaskuntza Donostia 2011 1. gaiaJarrera eta Ikaskuntza Donostia 2011 1. gaia
Jarrera eta Ikaskuntza Donostia 2011 1. gaia
 
Putauaki Primary Inquiry Learning Tackle Box Stages
Putauaki Primary Inquiry Learning Tackle Box StagesPutauaki Primary Inquiry Learning Tackle Box Stages
Putauaki Primary Inquiry Learning Tackle Box Stages
 
E Learners Presentation
E Learners PresentationE Learners Presentation
E Learners Presentation
 
TTB - Theme Scavenger Hunt
TTB - Theme Scavenger HuntTTB - Theme Scavenger Hunt
TTB - Theme Scavenger Hunt
 
Profil tik cerdas
Profil tik cerdasProfil tik cerdas
Profil tik cerdas
 
Amplifying Social Impact in a Connected Age
Amplifying Social Impact in a Connected AgeAmplifying Social Impact in a Connected Age
Amplifying Social Impact in a Connected Age
 
My God, It's Full of Stars: Your Guide to a Visual Design Career
My God, It's Full of Stars: Your Guide to a Visual Design CareerMy God, It's Full of Stars: Your Guide to a Visual Design Career
My God, It's Full of Stars: Your Guide to a Visual Design Career
 
C:\documents and settings\beheerder\my documents\hyperlocal\10rules
C:\documents and settings\beheerder\my documents\hyperlocal\10rulesC:\documents and settings\beheerder\my documents\hyperlocal\10rules
C:\documents and settings\beheerder\my documents\hyperlocal\10rules
 
Open Vpn – Poor Man’S Vpn Solution
Open Vpn – Poor Man’S Vpn SolutionOpen Vpn – Poor Man’S Vpn Solution
Open Vpn – Poor Man’S Vpn Solution
 
Auto-loading of Drupal CCK Nodes
Auto-loading of Drupal CCK NodesAuto-loading of Drupal CCK Nodes
Auto-loading of Drupal CCK Nodes
 
Networking For Interview Success Tips, Techniques And Takeaways 6.28.2011
Networking For Interview Success   Tips, Techniques And Takeaways 6.28.2011Networking For Interview Success   Tips, Techniques And Takeaways 6.28.2011
Networking For Interview Success Tips, Techniques And Takeaways 6.28.2011
 
Tech Show 12.05.2009
Tech Show 12.05.2009Tech Show 12.05.2009
Tech Show 12.05.2009
 
Spyder Advisor Capabilities
Spyder Advisor CapabilitiesSpyder Advisor Capabilities
Spyder Advisor Capabilities
 

Ähnlich wie Novidades do .Net 4.0

Entity Framework 4
Entity Framework 4Entity Framework 4
Entity Framework 4
CDS
 
Evolução do .NET Framework e do Visual Basic
Evolução do .NET Framework e do Visual BasicEvolução do .NET Framework e do Visual Basic
Evolução do .NET Framework e do Visual Basic
Ricardo Guerra Freitas
 
Palestra Plataforma .NET na ETEC Marília
Palestra Plataforma .NET na ETEC MaríliaPalestra Plataforma .NET na ETEC Marília
Palestra Plataforma .NET na ETEC Marília
Elvis Fusco
 
TDC 2012 - Integração .NET x C++
TDC 2012 - Integração .NET x C++TDC 2012 - Integração .NET x C++
TDC 2012 - Integração .NET x C++
Gabriel Guilherme
 

Ähnlich wie Novidades do .Net 4.0 (20)

Comparacao Estrategica sobre as Tecnologias de Acesso a Dados da Microsoft
Comparacao Estrategica sobre as Tecnologias de Acesso a Dados da MicrosoftComparacao Estrategica sobre as Tecnologias de Acesso a Dados da Microsoft
Comparacao Estrategica sobre as Tecnologias de Acesso a Dados da Microsoft
 
Introdução ao ASP.NET 3.5 - Campus Party Brasil 2009
Introdução ao ASP.NET 3.5 - Campus Party Brasil 2009Introdução ao ASP.NET 3.5 - Campus Party Brasil 2009
Introdução ao ASP.NET 3.5 - Campus Party Brasil 2009
 
Conhecendo a Plataforma .NET
Conhecendo a Plataforma .NETConhecendo a Plataforma .NET
Conhecendo a Plataforma .NET
 
Dev401 novos recursos do microsoft visual basic 2010
Dev401 novos recursos do microsoft visual basic 2010Dev401 novos recursos do microsoft visual basic 2010
Dev401 novos recursos do microsoft visual basic 2010
 
TDC 2012 Goiânia: Trilha .NET - Novidades do .NET Framework 4.5
TDC 2012 Goiânia: Trilha .NET - Novidades do .NET Framework 4.5TDC 2012 Goiânia: Trilha .NET - Novidades do .NET Framework 4.5
TDC 2012 Goiânia: Trilha .NET - Novidades do .NET Framework 4.5
 
ASP.NET Core, .NET Core e EF Core: multiplataforma e otimizados para a nuvem
ASP.NET Core, .NET Core e EF Core: multiplataforma e otimizados para a nuvemASP.NET Core, .NET Core e EF Core: multiplataforma e otimizados para a nuvem
ASP.NET Core, .NET Core e EF Core: multiplataforma e otimizados para a nuvem
 
Entity Framework 4
Entity Framework 4Entity Framework 4
Entity Framework 4
 
Evolução do .NET Framework e do Visual Basic
Evolução do .NET Framework e do Visual BasicEvolução do .NET Framework e do Visual Basic
Evolução do .NET Framework e do Visual Basic
 
Palestra Plataforma .NET na ETEC Marília
Palestra Plataforma .NET na ETEC MaríliaPalestra Plataforma .NET na ETEC Marília
Palestra Plataforma .NET na ETEC Marília
 
Entity Framework 4 & WCF Data Services
Entity Framework 4 & WCF Data ServicesEntity Framework 4 & WCF Data Services
Entity Framework 4 & WCF Data Services
 
Explorando o novo .NET multiplataforma: ASP.NET Core, .NET Core e EF Core
Explorando o novo .NET multiplataforma:ASP.NET Core, .NET Core e EF CoreExplorando o novo .NET multiplataforma:ASP.NET Core, .NET Core e EF Core
Explorando o novo .NET multiplataforma: ASP.NET Core, .NET Core e EF Core
 
.NET 2015, ASP.NET 5, C# 6 e tudo mais
.NET 2015, ASP.NET 5, C# 6 e tudo mais.NET 2015, ASP.NET 5, C# 6 e tudo mais
.NET 2015, ASP.NET 5, C# 6 e tudo mais
 
TDC 2012 - Integração .NET x C++
TDC 2012 - Integração .NET x C++TDC 2012 - Integração .NET x C++
TDC 2012 - Integração .NET x C++
 
Novidades do .NET 3.5
Novidades do .NET 3.5Novidades do .NET 3.5
Novidades do .NET 3.5
 
Asp.Net Core - Meetup BH
Asp.Net Core - Meetup BHAsp.Net Core - Meetup BH
Asp.Net Core - Meetup BH
 
Novidades do CSharp 4.0
Novidades do CSharp 4.0Novidades do CSharp 4.0
Novidades do CSharp 4.0
 
ASP.NET vNext no .NET Architects Days 2014
ASP.NET vNext no .NET Architects Days 2014ASP.NET vNext no .NET Architects Days 2014
ASP.NET vNext no .NET Architects Days 2014
 
Cebraspe 2016: .NET Core e ASP.NET Core
Cebraspe 2016: .NET Core e ASP.NET CoreCebraspe 2016: .NET Core e ASP.NET Core
Cebraspe 2016: .NET Core e ASP.NET Core
 
Asp.net core
Asp.net coreAsp.net core
Asp.net core
 
Construindo aplicações robustas com a suíte de tecnologias gratuítas da Micro...
Construindo aplicações robustas com a suíte de tecnologias gratuítas da Micro...Construindo aplicações robustas com a suíte de tecnologias gratuítas da Micro...
Construindo aplicações robustas com a suíte de tecnologias gratuítas da Micro...
 

Mehr von Giovanni Bassi

Mehr von Giovanni Bassi (20)

O que aprendi montando a arquitetura de microsserviços
O que aprendi montando a arquitetura de microsserviçosO que aprendi montando a arquitetura de microsserviços
O que aprendi montando a arquitetura de microsserviços
 
Sendo ágil com git
Sendo ágil com gitSendo ágil com git
Sendo ágil com git
 
Analisando dumps de memória de aplicações .NET
Analisando dumps de memória de aplicações .NETAnalisando dumps de memória de aplicações .NET
Analisando dumps de memória de aplicações .NET
 
Novidades do c# 7 e 8
Novidades do c# 7 e 8Novidades do c# 7 e 8
Novidades do c# 7 e 8
 
Async e await com JavaScript: entenda e use agora
Async e await com JavaScript: entenda e use agoraAsync e await com JavaScript: entenda e use agora
Async e await com JavaScript: entenda e use agora
 
Conhecendo o AKS, o azure container services com kubernetes
Conhecendo o AKS, o azure container services com kubernetesConhecendo o AKS, o azure container services com kubernetes
Conhecendo o AKS, o azure container services com kubernetes
 
Novidades do .NET Core 2.1 e do ASP.NET Core 2.1
Novidades do .NET Core 2.1 e do ASP.NET Core 2.1Novidades do .NET Core 2.1 e do ASP.NET Core 2.1
Novidades do .NET Core 2.1 e do ASP.NET Core 2.1
 
C#7, 7.1, 7.2, 7.3 e C# 8
C#7, 7.1, 7.2, 7.3 e C# 8C#7, 7.1, 7.2, 7.3 e C# 8
C#7, 7.1, 7.2, 7.3 e C# 8
 
Engenharia ágil de ponta a ponta do clone ao deploy
Engenharia ágil de ponta a ponta do clone ao deployEngenharia ágil de ponta a ponta do clone ao deploy
Engenharia ágil de ponta a ponta do clone ao deploy
 
Entrega contínua fica mais fácil com contêineres
Entrega contínua fica mais fácil com contêineresEntrega contínua fica mais fácil com contêineres
Entrega contínua fica mais fácil com contêineres
 
.NET Core, ASP.NET Core e .NET Standard 2
.NET Core, ASP.NET Core e .NET Standard 2.NET Core, ASP.NET Core e .NET Standard 2
.NET Core, ASP.NET Core e .NET Standard 2
 
.NET com contêineres Windows e Linux
.NET com contêineres Windows e Linux.NET com contêineres Windows e Linux
.NET com contêineres Windows e Linux
 
Async e await com JavaScript: entenda e use agora
Async e await com JavaScript: entenda e use agoraAsync e await com JavaScript: entenda e use agora
Async e await com JavaScript: entenda e use agora
 
Compartilhando código entre frontend e backend com Node.js
Compartilhando código entre frontend e backend com Node.jsCompartilhando código entre frontend e backend com Node.js
Compartilhando código entre frontend e backend com Node.js
 
Construindo uma ferramenta CLI multiplataforma com Node.js
Construindo uma ferramenta CLI multiplataforma com Node.jsConstruindo uma ferramenta CLI multiplataforma com Node.js
Construindo uma ferramenta CLI multiplataforma com Node.js
 
O Futuro do C#: C#8
O Futuro do C#: C#8O Futuro do C#: C#8
O Futuro do C#: C#8
 
Um mergulho nos containers windows
Um mergulho nos containers windowsUm mergulho nos containers windows
Um mergulho nos containers windows
 
Por dentro do .NET Core
Por dentro do .NET CorePor dentro do .NET Core
Por dentro do .NET Core
 
Build e release pipeline com docker
Build e release pipeline com dockerBuild e release pipeline com docker
Build e release pipeline com docker
 
Release contínuo de um microsserviço com Docker ASP.net core e Azure Containe...
Release contínuo de um microsserviço com Docker ASP.net core e Azure Containe...Release contínuo de um microsserviço com Docker ASP.net core e Azure Containe...
Release contínuo de um microsserviço com Docker ASP.net core e Azure Containe...
 

Novidades do .Net 4.0

  • 1. .Net 4.0 Giovanni Bassi [email_address] unplugged.giggio.net scrumdev.com.br @giovannibassi Consultor Independente
  • 2.  
  • 4. CLR versus .NET Framework .NET 1.0 .NET 1.1 .NET 2.0 3.0 3.5 .NET 4 2002 2003 2008 CTP 2005-08 CLR 1.0 CLR 1.1 CLR 2.0 CLR 4 SP1
  • 5. O .NET Framework WPF Win Forms DLR ASP.NET WCF E mais! LINQ Base Class Libraries The CLR JIT & NGEN Garbage Collector Security Model Exception Handling Loader & Binder
  • 6. Os pilares Parallel Computing Task Parallel Library Parallel LINQ Data Access Entity Framework 4 Data Services 1.5 Runtime DLR Integration Type Equivalence In-Process SxS
  • 7.
  • 8.
  • 9. CLR 2 – Rodando lado a lado Host Process (i.e. Outlook) 1.1 add-in .NET 1.1 .NET 2.0 2.0 add-in 3.0 3.5 3.0 add-in 3.5 add-in
  • 10. .NET 2.0 2.0 add-in 3.0 3.5 Host Process (i.e. Outlook) 3.0 add-in 3.5 add-in .NET 4.0 4.0 add-in
  • 11.
  • 12. Web Forms 4 - Routing ASP.NET Routing Route: Product/{name} -> Product.aspx WebForms Page File Name: Product.aspx Route Values: Name = “Bikes” Request: Products/Bikes Response
  • 13.  
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.  
  • 19.
  • 20.
  • 22.  
  • 23.
  • 24.  
  • 25.
  • 26.
  • 27.  
  • 28.
  • 29.
  • 30.
  • 31.  
  • 32. Porque a DLR? Common Language Runtime Estaticamente tipados C# VB Ruby Python Dinamicamente tipados
  • 33. Porque a DLR? Common Language Runtime Statically-Typed C# VB Ruby Python Dynamically-Typed Dynamic Language Runtime Estaticamente tipados Dinamicamente tipados
  • 34. Python Binder Ruby Binder COM Binder JScript Binder Object Binder Dynamic Language Runtime Expression Trees Dynamic Dispatch Call Site Caching IronPython IronRuby C# VB.NET Others… .NET Dynamic Programming
  • 35. Calculator calc = GetCalculator(); int sum = calc.Add(10, 20); object calc = GetCalculator(); Type calcType = calc.GetType(); object res = calcType.InvokeMember( &quot;Add&quot; , BindingFlags.InvokeMethod, null , new object [] { 10, 20 }); int sum = Convert.ToInt32(res); ScriptObject calc = GetCalculator(); object res = calc.Invoke( &quot;Add&quot; , 10, 20); int sum = Convert .ToInt32(res); dynamic calc = GetCalculator(); int sum = calc.Add(10, 20); Statically typed to be dynamic Dynamic method invocation Dynamic conversion Dynamically Typed Objects
  • 36.  
  • 37.
  • 38.
  • 39.
  • 40.  
  • 41.
  • 42.
  • 43.  
  • 44. Giovanni Bassi [email_address] unplugged.giggio.net scrumdev.com.br @giovannibassi

Hinweis der Redaktion

  1. MESSAGING: Side X Side releases solve app compat issue COM objects and other addins for different layers of the same cake can easily live together on the same runtime Highly compatible – but only certain kinds of functionality can be added
  2. MESSAGING: Run both 2.0-based and 4.0-based CLR in the same process Old components use old CLR New components use new CLR Configuration file and hosting APIs give you fine-grained control
  3. MESSAGING: New Library = just an assembly, a normal .dll, used by any .NET language Dynamically Composed = composition takes place at runtime and composition behavior differs depending on how it is configured.
  4. MESSAGING: Due to it’s declarative-based and discovery-enabled approach, MEF becomes very powerful to use in an application where it is being used to put together a bunch of potentially unknown parts into a working application. You might also think about this as a 3 rd party extending your application. When you are compiling your application (long before you ship), you have absolutely no idea on what sorts of extensions might be built for your application into the future. That’s the power of extensible applications, they can be extended and used in ways the original authors perhaps didn’t expect, or didn’t have the time to do themselves. If you are concerned strictly with the “known” part of the equation (composing different software entities together that are all known at compile time), there are other solutions that are available today that are very powerful for this scenario: namely IoC containers (IoC = Inversion of Control). The Managed Extensibility Framework was designed primarily with the unknown aspect of extension in mind.
  5. MESSAGING: PLINQ is a technology that allows developers to _easily_ leverage manycore. The great thing about PLINQ is that if you are using LINQ-to-objects, there is a very minimal impact to your code in order for it to use PLINQ. All it takes to use PLINQ is adding “.AsParallel()” to your query. This will turn the query into a PLINQ query and will use the PLINQ execution engine when executed. One small change, and your code now takes advantage of all the hardware available to you. NOTES: AsParallel() works by returning an IParallelEnumerable so every subsequent query operator works against the new IParallelEnumerable rather than the normal IEnumerable. See the hands-on lab for Parallel Extensions for more details.
  6. MESSAGING: Today, concurrency usually has to be done by the brightest developers in a business. The problem with this is that the brightest developers are then being consumed by concurrency minutia rather than being able to be focused on core business problems and helping the business’s bottom line. By providing new libraries and tools that make it easy to write parallel code, we hope to allow the best and brightest developers focus on the business problems at hand. This in turn enables other developers to be able to address concurrency and parallelism. This is the long term goal of Microsoft with the Parallel Computing Initiative. Visual Studio 2010 and .NET Framework 4 is merely the first step being taken in this direction.
  7. MESSAGING: PLINQ is a technology that allows developers to _easily_ leverage manycore. The great thing about PLINQ is that if you are using LINQ-to-objects, there is a very minimal impact to your code in order for it to use PLINQ. All it takes to use PLINQ is adding “.AsParallel()” to your query. This will turn the query into a PLINQ query and will use the PLINQ execution engine when executed. One small change, and your code now takes advantage of all the hardware available to you. NOTES: AsParallel() works by returning an IParallelEnumerable so every subsequent query operator works against the new IParallelEnumerable rather than the normal IEnumerable. See the hands-on lab for Parallel Extensions for more details.
  8. MESSAGING: There is a good reason why the Dynamic Language Runtime (DLR) exists. The problem is that, today, dynamically-typed languages like Python and Ruby can’t easily run directly on top of the CLR as the CLR is primarily designed for statically-typed languages. By creating the DLR, we help plug that hole and allow dynamically-typed languages to run on top of the CLR (by working through the DLR).
  9. MESSAGING: The DLR provides core services that are necessary for dynamically-typed languages to work on the CLR The DLR also provides other services that can be used by statically-typed languages as well to achieve more dynamic behavior: Expression Trees (including Statements) Dynamic Dispatch Call Site Caching
  10. MESSAGING: The power of the DLR is that there are many binders for the DLR. Yes, we can interop with dynamic languages like Python and Ruby like we expect to. However, perhaps even more importantly, there are binders available for .NET, Silverlight, and Office. This allows us to interact between these platforms in very powerful ways that we were unable to currently.
  11. MESSAGING: As long as we stay in our statically-typed world, interacting with objects is a pleasant and intuitive experience. However, as soon as you step out of that boundary and have to start using reflection, your code becomes much less elegant, harder to read, and harder to maintain. Using ScriptObject in the DLR makes this a bit easier as it provides some direct method calls to invoke methods with specific parameters. And while this is an improvement, it’s still a departure from the way we are used to interacting with objects. Using the new dynamic keyword in C# 4, we can call the .Add method above exactly as it were statically typed like in our first code snippet. In this case, the calc object is statically typed to be dynamic (yes, that’s true). Once we have a dynamic object references, we can dynamically invoke methods, do dynamic conversion, etc.
  12. MESSAGING: Office has thousands of APIs for addins exposed through COM. But COM was designed for native code. Interop Assemblies help “translate” between managed and native code by containing all the marshalling data necessary to make communication possible.
  13. MESSAGING: Let’s look at Office as an example. Add-ins in Excel, for instance, may very well need to talk to each other -&gt; Because they have to talk to each other, they have to be using the same types for Excel -&gt; Because of the way the type system works in the CLR, these types must also be in the same assembly -&gt; So, the assembly is required to be in a common location (e.g. the GAC) in order for the add-ins to function properly. Well, Office currently does not require the .NET Framework to be installed on a machine. If a machine doesn’t have .NET installed, there’s no GAC, and hence nothing to deploy the PIA into. Herein lies the problem. Even if an add-in is only using a single function, enum, etc. from the interop assembly, the add-in must deploy the entire PIA along with itself. Office PIA is around 10-20mb, it’s HUGE. So you might have a 100k add-in “bringing along” a 20mb PIA.
  14. MESSAGING: There are two primary things that enable PIAs to be buried, forever, never to rise again. Compiler enhancements (this embedding works down to the method level even, so even a full interface is not required). Runtime enhancements Even though they are in different assemblies Even though they may have different subsets Hence, type equivalence allows two interfaces, enums, delegates and plain-old-data-structures to mark themselves as equivalent with each other.