SlideShare uma empresa Scribd logo
1 de 27
.NET 4.0 Preview
da VS10 a C# 4.0




     Mauro Servienti
     Microsoft MVP - Visual C#
     Software Mason @ Managed Designs

     http://blogs.ugidotnet.org/topics
     mauro.servienti@manageddesigns.it
Agenda
 Visual Studio 2010
 C# & VB.Net
 Framework 4.0
Certo non c’è “Linq”, ma...
 Nuovo ambiente di sviluppo;
 Nuovo TFS;
 +296 classi;
 Nuovo CLR, con tanto di supporto per
  l’hosting side-by-side;
 Nuovo linguaggio: F#
...e poi
   Nuove versioni per:
    Wpf, Wcf, Wf, Asp.net, Entity Framework e
    pure per il “defunto” Linq2Sql;
   Nuovi attori: Parallel Library e Plinq, Code
    Contracts;
   Integrazione/diffusione di xaml e... morte di
    xoml;
   Nuove feature per i “vecchi” linguaggi;
   Nuovi strumenti di refactoring;
   Nuovi designer;
Visual Studio 2010
 Multi-targeting: 2.0 -> 4.0;
 Nuovi strumenti di Refactoring orientati
  anche al TDD;
 Nuovi designer;
     Sequence Diagram;
     Layer Diagram e Architecture Explorer
 Code dependencies;
 Commenti nel debugger;
 Historical Debugger;
 Post-mortem debug;
Visual Studio 2010
 Code Hierarchy;
 Nuova dialog Choose Toolbox Items:
     Filtri, suddivisa in categorie, sempre lenta...
   Wpf, wpf, wfp e ancora wpf;
     IDE “quasi” completamente riscritto in wpf;
     “Piena” retrocompatibilità con i package e gli
      add-in;
     “Cider”, l’intellisense per xaml e la nuova
      PropertyGrid;
     Wpf Tree Visualizer;
Visual Studio 2010
   Web.config transformation;
     Solo per deploy
     Solo per “Web”... Forse...
      ○ Usa MS Build

   MEF & Extensions
     Microsoft Extensibility Framework != IoC
     Nuovo Extension Manager
     “Pluggabilità” dell’IDE rivoluzionaria;
Visual Studio 2010 a first look
C# vs VB... new stuff
    Optional and Named      Multiline Lambdas;
     Parameters              Implicit Line Continuation;
                             Auto-implemented
    Safe Co- & Contra-       Properties;
     variance                Collection Initializers;
    Dynamically Typed       Array Literals;
     Objects                 Nullable Optional
                              Parameters;
    Improved COM            Co- & Contra-variance
     Interoperability        Interop with Dynamic
                              Languages
                             Compiling without PIAs;

C#                        VB.Net
Optional and Named
Parameters




 Vale anche per i metodi;
 IMVHO viola l’incapsulamento;
Co-variance

              Fx 2.0




              Fx 4.0
Contra-variance



Fx 2.0




                  Fx 4.0
Dynamically Typed Objects
     Calculator calc = GetCalculator();
     int sum = calc.Add(10, 20);

     object calc = GetCalculator();
     Type calcType = calc.GetType();
     object res = calcType.InvokeMember("Add",
         BindingFlags.InvokeMethod, null,
         new object[] { 10, 20 });
     int sum = Convert.ToInt32(res);


     ScriptObject calc = GetCalculator();
     object res = calc.Invoke("Add", 10, 20);
     int sum = Convert.ToInt32(res);


     dynamic calc = GetCalculator();
     int sum = calc.Add(10, 20);
Dynamically Typed Objects
 Il DLR supporta la creazione di oggetti
  C# no;
 Non sono supportati gli extension
  methods;
 Non possono essere usati come
  parametri di una chiamata oggetti
  Expression;
Dynamically Typed Objects
COM Interop news
   La firma delle API COM passa da Object
    a dynamic:
     ((Excel.Range)excel.Cells[1, 1]).Value;
     excel.Cells[1, 1].Value;
 No-PIA: A runtime le informazioni
  presenti, e necessarie a design-
  time, vengono inglobate dal
  compilatore, quindi le/i PIA non vengono
  più caricati;
 No-ref: COM ref != C# ref -> diventa onere
  del compilatore generare le variabili
  temporanee da passare “by reference”;
Framework
 Hosting API;
 Code Contracts & PEX;
 Parallel Library;
 TreadPool;
Hosting API

      2.0       3.0       3.5        4.0
     add-in    add-in    add-in     add-in

                3.5
                3.0
                                   .NET 4.0
              .NET 2.0


                   Processo Host
Code Contracts
   Sintassi per esplicitare i requisiti sui dati;
     Requires();
     RequiresAlways();
   Static Checker: controllo a compile time;
     (a parte per la
      B1, http://msdn.microsoft.com/en-
      us/devlabs/dd491992.aspx)
 Possibilità di fornire i contratti separati;
 Contract Invariance;
Code Contracts
Pre condizioni
    public MyMethod( String argument )
    {
      Contract.Requires( argument != null );
      …
    }

Post condizioni
   public string GetValue()
   {
     Contract.Ensures( Contract.Result<String>() != null );
     …
     return something;
   }
PEX
 Add-in per Visual Studio (anche 2008?)
 Genera un set mirato di unit-tests;
 Può sfruttare Code Contracts;
Multi-Core/Threading/Task...
 L’hardware ha preso la sua strada;
 Scrivere software che sfrutti più core è
  un’operazione complessa, troppo;

    Il focus del developer deve essere sul
     problema e non sull’infrastruttura che
         serve per risolvere il problema;
I nuovi attori
   Parallel LINQ (aka PLinq)
   Task Parallel Library:
     Task, Task<T>
     Parallel.For, Parallel.ForEach
     Parallel.Invoke
   Coordination Data Structures:
     System.Collections.Concurrent
     Primitive per la sincronizzazione
      ○ Barrier, CountdownEvent, etc.
   Unified Cancellation Model:
     CancelationToken, CancelationTokenSource;
AsParallel is the word <cit.>

  var q = from p in people.AsParallel()
          where p.Name == query.Name &&
                p.State == query.State &&
                p.Year >= yearStart &&
                p.Year <= yearEnd
          orderby p.Year ascending
          select p;
.Net 4.0 Preview @ UGIdotNet

Mais conteúdo relacionado

Mais procurados

What's New in ASP.NET 4.5 and Visual Studio 2012
What's New in ASP.NET 4.5 and Visual Studio 2012What's New in ASP.NET 4.5 and Visual Studio 2012
What's New in ASP.NET 4.5 and Visual Studio 2012Andrea Dottor
 
.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il MobilePietro Libro
 
Multi-Device Hybrid Apps con Visual Studio e Apache Cordova
Multi-Device Hybrid Apps con Visual Studio e Apache CordovaMulti-Device Hybrid Apps con Visual Studio e Apache Cordova
Multi-Device Hybrid Apps con Visual Studio e Apache CordovaAndrea Dottor
 
ASP.NET performance optimization
ASP.NET performance optimizationASP.NET performance optimization
ASP.NET performance optimizationAndrea Dottor
 
Sviluppare Azure Web Apps
Sviluppare Azure Web AppsSviluppare Azure Web Apps
Sviluppare Azure Web AppsAndrea Dottor
 
Java EE facile con Spring Boot - Luigi Bennardis - Codemotion Roma 2015
Java EE facile con Spring Boot - Luigi Bennardis - Codemotion Roma 2015Java EE facile con Spring Boot - Luigi Bennardis - Codemotion Roma 2015
Java EE facile con Spring Boot - Luigi Bennardis - Codemotion Roma 2015Codemotion
 
Blazor per uno sviluppatore Web Form
Blazor per uno sviluppatore Web FormBlazor per uno sviluppatore Web Form
Blazor per uno sviluppatore Web FormAndrea Dottor
 
Cosa c'è di nuovo in asp.net core 2 0
Cosa c'è di nuovo in asp.net core 2 0Cosa c'è di nuovo in asp.net core 2 0
Cosa c'è di nuovo in asp.net core 2 0Andrea Dottor
 
Dal RenderFragment ai Generics, tips for Blazor developers
Dal RenderFragment ai Generics, tips for Blazor developersDal RenderFragment ai Generics, tips for Blazor developers
Dal RenderFragment ai Generics, tips for Blazor developersAndrea Dottor
 
Alla scoperta di gRPC
Alla scoperta di gRPCAlla scoperta di gRPC
Alla scoperta di gRPCAndrea Dottor
 
Progettare in Team per il Responsive Web Design
Progettare in Team per il Responsive Web DesignProgettare in Team per il Responsive Web Design
Progettare in Team per il Responsive Web DesignSalvatore Paone
 
Christmas greetings cards with blazor
Christmas greetings cards with blazorChristmas greetings cards with blazor
Christmas greetings cards with blazorNicolò Carandini
 
Dependency injection questa sconosciuta
Dependency injection questa sconosciutaDependency injection questa sconosciuta
Dependency injection questa sconosciutaAndrea Dottor
 
Blazor: are we ready for the launch?
Blazor: are we ready for the launch?Blazor: are we ready for the launch?
Blazor: are we ready for the launch?Andrea Agnoletto
 
Dal requisito all'implementazione @ CD2010
Dal requisito all'implementazione @ CD2010Dal requisito all'implementazione @ CD2010
Dal requisito all'implementazione @ CD2010Mauro Servienti
 
Wasm and Blazor CDays keynote
Wasm and Blazor CDays keynoteWasm and Blazor CDays keynote
Wasm and Blazor CDays keynoteNicolò Carandini
 
Dot netcampus2015 green-template
Dot netcampus2015 green-templateDot netcampus2015 green-template
Dot netcampus2015 green-templateDotNetCampus
 

Mais procurados (20)

What's New in ASP.NET 4.5 and Visual Studio 2012
What's New in ASP.NET 4.5 and Visual Studio 2012What's New in ASP.NET 4.5 and Visual Studio 2012
What's New in ASP.NET 4.5 and Visual Studio 2012
 
.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile
 
Multi-Device Hybrid Apps con Visual Studio e Apache Cordova
Multi-Device Hybrid Apps con Visual Studio e Apache CordovaMulti-Device Hybrid Apps con Visual Studio e Apache Cordova
Multi-Device Hybrid Apps con Visual Studio e Apache Cordova
 
ASP.NET performance optimization
ASP.NET performance optimizationASP.NET performance optimization
ASP.NET performance optimization
 
Sviluppare Azure Web Apps
Sviluppare Azure Web AppsSviluppare Azure Web Apps
Sviluppare Azure Web Apps
 
Java EE facile con Spring Boot - Luigi Bennardis - Codemotion Roma 2015
Java EE facile con Spring Boot - Luigi Bennardis - Codemotion Roma 2015Java EE facile con Spring Boot - Luigi Bennardis - Codemotion Roma 2015
Java EE facile con Spring Boot - Luigi Bennardis - Codemotion Roma 2015
 
Blazor per uno sviluppatore Web Form
Blazor per uno sviluppatore Web FormBlazor per uno sviluppatore Web Form
Blazor per uno sviluppatore Web Form
 
Cosa c'è di nuovo in asp.net core 2 0
Cosa c'è di nuovo in asp.net core 2 0Cosa c'è di nuovo in asp.net core 2 0
Cosa c'è di nuovo in asp.net core 2 0
 
Dal RenderFragment ai Generics, tips for Blazor developers
Dal RenderFragment ai Generics, tips for Blazor developersDal RenderFragment ai Generics, tips for Blazor developers
Dal RenderFragment ai Generics, tips for Blazor developers
 
Alla scoperta di gRPC
Alla scoperta di gRPCAlla scoperta di gRPC
Alla scoperta di gRPC
 
Spring - Ecosistema
Spring - EcosistemaSpring - Ecosistema
Spring - Ecosistema
 
Progettare in Team per il Responsive Web Design
Progettare in Team per il Responsive Web DesignProgettare in Team per il Responsive Web Design
Progettare in Team per il Responsive Web Design
 
Christmas greetings cards with blazor
Christmas greetings cards with blazorChristmas greetings cards with blazor
Christmas greetings cards with blazor
 
Dependency injection questa sconosciuta
Dependency injection questa sconosciutaDependency injection questa sconosciuta
Dependency injection questa sconosciuta
 
Blazor: are we ready for the launch?
Blazor: are we ready for the launch?Blazor: are we ready for the launch?
Blazor: are we ready for the launch?
 
Web api 2.0
Web api 2.0Web api 2.0
Web api 2.0
 
Dal requisito all'implementazione @ CD2010
Dal requisito all'implementazione @ CD2010Dal requisito all'implementazione @ CD2010
Dal requisito all'implementazione @ CD2010
 
Wasm and Blazor CDays keynote
Wasm and Blazor CDays keynoteWasm and Blazor CDays keynote
Wasm and Blazor CDays keynote
 
Dot netcampus2015 green-template
Dot netcampus2015 green-templateDot netcampus2015 green-template
Dot netcampus2015 green-template
 
Novità di Asp.Net 4.0
Novità di Asp.Net 4.0Novità di Asp.Net 4.0
Novità di Asp.Net 4.0
 

Destaque

Designing distributed, scalable and reliable systems using NServiceBus
Designing distributed, scalable and reliable systems using NServiceBusDesigning distributed, scalable and reliable systems using NServiceBus
Designing distributed, scalable and reliable systems using NServiceBusMauro Servienti
 
Introduction to NserviceBus
Introduction to NserviceBusIntroduction to NserviceBus
Introduction to NserviceBusMauro Servienti
 
designing distributed scalable and reliable systems
designing distributed scalable and reliable systemsdesigning distributed scalable and reliable systems
designing distributed scalable and reliable systemsMauro Servienti
 
Introduction to the Particular Platform
Introduction to the Particular PlatformIntroduction to the Particular Platform
Introduction to the Particular PlatformMauro Servienti
 
UI composition @ dotNetMarche
UI composition @ dotNetMarcheUI composition @ dotNetMarche
UI composition @ dotNetMarcheMauro Servienti
 
Wpf 4 what's new @ Community Tour (Cesena)
Wpf 4 what's new @ Community Tour (Cesena)Wpf 4 what's new @ Community Tour (Cesena)
Wpf 4 what's new @ Community Tour (Cesena)Mauro Servienti
 
NServiceBus - building a distributed system based on a messaging infrastructure
NServiceBus - building a distributed system based on a messaging infrastructureNServiceBus - building a distributed system based on a messaging infrastructure
NServiceBus - building a distributed system based on a messaging infrastructureMauro Servienti
 
Inversion of Control @ CD2008
Inversion of Control @ CD2008Inversion of Control @ CD2008
Inversion of Control @ CD2008Mauro Servienti
 
NServiceBus - introduction to a message based distributed architecture
NServiceBus - introduction to a message based distributed architectureNServiceBus - introduction to a message based distributed architecture
NServiceBus - introduction to a message based distributed architectureMauro Servienti
 
Croce e delizia del lavoro remoto
Croce e delizia del lavoro remotoCroce e delizia del lavoro remoto
Croce e delizia del lavoro remotoMauro Servienti
 
Brokering over WCF @ dotNetMarche
Brokering over WCF @ dotNetMarcheBrokering over WCF @ dotNetMarche
Brokering over WCF @ dotNetMarcheMauro Servienti
 
On working in Particular
On working in ParticularOn working in Particular
On working in ParticularMauro Servienti
 

Destaque (20)

Designing distributed, scalable and reliable systems using NServiceBus
Designing distributed, scalable and reliable systems using NServiceBusDesigning distributed, scalable and reliable systems using NServiceBus
Designing distributed, scalable and reliable systems using NServiceBus
 
Introduction to NserviceBus
Introduction to NserviceBusIntroduction to NserviceBus
Introduction to NserviceBus
 
designing distributed scalable and reliable systems
designing distributed scalable and reliable systemsdesigning distributed scalable and reliable systems
designing distributed scalable and reliable systems
 
Introduction to the Particular Platform
Introduction to the Particular PlatformIntroduction to the Particular Platform
Introduction to the Particular Platform
 
UI composition @ dotNetMarche
UI composition @ dotNetMarcheUI composition @ dotNetMarche
UI composition @ dotNetMarche
 
Utile e sostenibile
Utile e sostenibileUtile e sostenibile
Utile e sostenibile
 
Wpf 4 what's new @ Community Tour (Cesena)
Wpf 4 what's new @ Community Tour (Cesena)Wpf 4 what's new @ Community Tour (Cesena)
Wpf 4 what's new @ Community Tour (Cesena)
 
RavenDB in the wild
RavenDB in the wildRavenDB in the wild
RavenDB in the wild
 
System.AddIn @ Xe.Net
System.AddIn @ Xe.NetSystem.AddIn @ Xe.Net
System.AddIn @ Xe.Net
 
m-v-vm @ dotNetMarche
m-v-vm @ dotNetMarchem-v-vm @ dotNetMarche
m-v-vm @ dotNetMarche
 
NServiceBus - building a distributed system based on a messaging infrastructure
NServiceBus - building a distributed system based on a messaging infrastructureNServiceBus - building a distributed system based on a messaging infrastructure
NServiceBus - building a distributed system based on a messaging infrastructure
 
VS Package @ CD2008
VS Package @ CD2008VS Package @ CD2008
VS Package @ CD2008
 
AngularJS - directives
AngularJS - directivesAngularJS - directives
AngularJS - directives
 
Inversion of Control @ CD2008
Inversion of Control @ CD2008Inversion of Control @ CD2008
Inversion of Control @ CD2008
 
Angular js
Angular jsAngular js
Angular js
 
NServiceBus - introduction to a message based distributed architecture
NServiceBus - introduction to a message based distributed architectureNServiceBus - introduction to a message based distributed architecture
NServiceBus - introduction to a message based distributed architecture
 
Croce e delizia del lavoro remoto
Croce e delizia del lavoro remotoCroce e delizia del lavoro remoto
Croce e delizia del lavoro remoto
 
m-v-vm @ UgiAlt.Net
m-v-vm @ UgiAlt.Netm-v-vm @ UgiAlt.Net
m-v-vm @ UgiAlt.Net
 
Brokering over WCF @ dotNetMarche
Brokering over WCF @ dotNetMarcheBrokering over WCF @ dotNetMarche
Brokering over WCF @ dotNetMarche
 
On working in Particular
On working in ParticularOn working in Particular
On working in Particular
 

Semelhante a .Net 4.0 Preview @ UGIdotNet

Entity Framework 4 vs NHibernate 3
Entity Framework 4 vs NHibernate 3Entity Framework 4 vs NHibernate 3
Entity Framework 4 vs NHibernate 3Martino Bordin
 
High Level Synthesis Using Esterel
High Level Synthesis Using EsterelHigh Level Synthesis Using Esterel
High Level Synthesis Using EsterelAlberto Minetti
 
Dynamic Language Programming For The Statically Typed Programmer
Dynamic Language Programming For The Statically Typed ProgrammerDynamic Language Programming For The Statically Typed Programmer
Dynamic Language Programming For The Statically Typed ProgrammerMarco Parenzan
 
Deep diving C# 4 (Raffaele Rialdi)
Deep diving C# 4 (Raffaele Rialdi)Deep diving C# 4 (Raffaele Rialdi)
Deep diving C# 4 (Raffaele Rialdi)DotNetMarche
 
Continous Delivery & HQ Code
Continous Delivery & HQ CodeContinous Delivery & HQ Code
Continous Delivery & HQ CodeDaniele Mondello
 
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1dotnetcode
 
Alessandro Forte - ASP.Net 4.0
Alessandro Forte - ASP.Net 4.0Alessandro Forte - ASP.Net 4.0
Alessandro Forte - ASP.Net 4.0Alessandro Forte
 
Continuous Integration e High Quality Code
Continuous Integration e High Quality CodeContinuous Integration e High Quality Code
Continuous Integration e High Quality CodeDaniele Mondello
 
Database Project in Visual Studio 2010
Database Project in Visual Studio 2010Database Project in Visual Studio 2010
Database Project in Visual Studio 2010Gian Maria Ricci
 
WPF & LINQ: VB T&T Community After Hour @ Microsoft Days 08
WPF & LINQ: VB T&T Community After Hour @ Microsoft Days 08WPF & LINQ: VB T&T Community After Hour @ Microsoft Days 08
WPF & LINQ: VB T&T Community After Hour @ Microsoft Days 08Alessandro Del Sole
 
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...Presentazione: uno studio sull'efficacia di checker automatici per la moderni...
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...Idriss Riouak
 
Open Source Day 2015 - Migrare a JBoss: andare oltre gli aspetti tecnologici
Open Source Day 2015 - Migrare a JBoss: andare oltre gli aspetti tecnologiciOpen Source Day 2015 - Migrare a JBoss: andare oltre gli aspetti tecnologici
Open Source Day 2015 - Migrare a JBoss: andare oltre gli aspetti tecnologiciPar-Tec S.p.A.
 
.NET & Linux: la strana coppia - DotNetDay 2018
.NET & Linux: la strana coppia - DotNetDay 2018.NET & Linux: la strana coppia - DotNetDay 2018
.NET & Linux: la strana coppia - DotNetDay 2018Fabrizio Bernabei
 
Machine learning models continuous deployment on azure using devops
Machine learning models continuous deployment on azure using devopsMachine learning models continuous deployment on azure using devops
Machine learning models continuous deployment on azure using devopsIgor Antonacci
 
Primo Incontro Con Scala
Primo Incontro Con ScalaPrimo Incontro Con Scala
Primo Incontro Con ScalaFranco Lombardo
 

Semelhante a .Net 4.0 Preview @ UGIdotNet (20)

Entity Framework 4 vs NHibernate 3
Entity Framework 4 vs NHibernate 3Entity Framework 4 vs NHibernate 3
Entity Framework 4 vs NHibernate 3
 
High Level Synthesis Using Esterel
High Level Synthesis Using EsterelHigh Level Synthesis Using Esterel
High Level Synthesis Using Esterel
 
Dynamic Language Programming For The Statically Typed Programmer
Dynamic Language Programming For The Statically Typed ProgrammerDynamic Language Programming For The Statically Typed Programmer
Dynamic Language Programming For The Statically Typed Programmer
 
#dd12 Applicazioni a tre voci (Android e Domino)
#dd12 Applicazioni a tre voci (Android e Domino)#dd12 Applicazioni a tre voci (Android e Domino)
#dd12 Applicazioni a tre voci (Android e Domino)
 
Deep diving C# 4 (Raffaele Rialdi)
Deep diving C# 4 (Raffaele Rialdi)Deep diving C# 4 (Raffaele Rialdi)
Deep diving C# 4 (Raffaele Rialdi)
 
Vb.Net
Vb.NetVb.Net
Vb.Net
 
Continous Delivery & HQ Code
Continous Delivery & HQ CodeContinous Delivery & HQ Code
Continous Delivery & HQ Code
 
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1
Meetup DotNetCode Settembre 2018 - ASP.NET Core 2.1
 
Alessandro Forte - ASP.Net 4.0
Alessandro Forte - ASP.Net 4.0Alessandro Forte - ASP.Net 4.0
Alessandro Forte - ASP.Net 4.0
 
Continuous Integration e High Quality Code
Continuous Integration e High Quality CodeContinuous Integration e High Quality Code
Continuous Integration e High Quality Code
 
Kotlin hexagonal-architecture
Kotlin hexagonal-architectureKotlin hexagonal-architecture
Kotlin hexagonal-architecture
 
Database Project in Visual Studio 2010
Database Project in Visual Studio 2010Database Project in Visual Studio 2010
Database Project in Visual Studio 2010
 
Livecode
LivecodeLivecode
Livecode
 
WPF & LINQ: VB T&T Community After Hour @ Microsoft Days 08
WPF & LINQ: VB T&T Community After Hour @ Microsoft Days 08WPF & LINQ: VB T&T Community After Hour @ Microsoft Days 08
WPF & LINQ: VB T&T Community After Hour @ Microsoft Days 08
 
Ddive Xpage852
Ddive Xpage852Ddive Xpage852
Ddive Xpage852
 
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...Presentazione: uno studio sull'efficacia di checker automatici per la moderni...
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...
 
Open Source Day 2015 - Migrare a JBoss: andare oltre gli aspetti tecnologici
Open Source Day 2015 - Migrare a JBoss: andare oltre gli aspetti tecnologiciOpen Source Day 2015 - Migrare a JBoss: andare oltre gli aspetti tecnologici
Open Source Day 2015 - Migrare a JBoss: andare oltre gli aspetti tecnologici
 
.NET & Linux: la strana coppia - DotNetDay 2018
.NET & Linux: la strana coppia - DotNetDay 2018.NET & Linux: la strana coppia - DotNetDay 2018
.NET & Linux: la strana coppia - DotNetDay 2018
 
Machine learning models continuous deployment on azure using devops
Machine learning models continuous deployment on azure using devopsMachine learning models continuous deployment on azure using devops
Machine learning models continuous deployment on azure using devops
 
Primo Incontro Con Scala
Primo Incontro Con ScalaPrimo Incontro Con Scala
Primo Incontro Con Scala
 

Mais de Mauro Servienti

Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019Mauro Servienti
 
Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019Mauro Servienti
 
Welcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise ApplicationsWelcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise ApplicationsMauro Servienti
 
All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019Mauro Servienti
 
Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019Mauro Servienti
 
Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Mauro Servienti
 
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019Mauro Servienti
 
Living organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better ParmaLiving organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better ParmaMauro Servienti
 
Welcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted SoftwareWelcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted SoftwareMauro Servienti
 
PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018Mauro Servienti
 
Design a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT BetterDesign a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT BetterMauro Servienti
 
Microservices and pineapple on pizza what do they have in common - dos and ...
Microservices and pineapple on pizza   what do they have in common - dos and ...Microservices and pineapple on pizza   what do they have in common - dos and ...
Microservices and pineapple on pizza what do they have in common - dos and ...Mauro Servienti
 
All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)Mauro Servienti
 
Designing a ui for microservices
Designing a ui for microservicesDesigning a ui for microservices
Designing a ui for microservicesMauro Servienti
 
Po is dead, long live the po
Po is dead, long live the poPo is dead, long live the po
Po is dead, long live the poMauro Servienti
 
Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!Mauro Servienti
 
GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?Mauro Servienti
 
Dall'idea al deploy un lungo viaggio che passa per git flow e semver
Dall'idea al deploy   un lungo viaggio che passa per git flow e semverDall'idea al deploy   un lungo viaggio che passa per git flow e semver
Dall'idea al deploy un lungo viaggio che passa per git flow e semverMauro Servienti
 
Progettare una UI per i Microservices
Progettare una UI per i MicroservicesProgettare una UI per i Microservices
Progettare una UI per i MicroservicesMauro Servienti
 
The road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messagesThe road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messagesMauro Servienti
 

Mais de Mauro Servienti (20)

Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019
 
Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019
 
Welcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise ApplicationsWelcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise Applications
 
All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019
 
Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019
 
Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...
 
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
 
Living organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better ParmaLiving organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better Parma
 
Welcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted SoftwareWelcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted Software
 
PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018
 
Design a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT BetterDesign a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT Better
 
Microservices and pineapple on pizza what do they have in common - dos and ...
Microservices and pineapple on pizza   what do they have in common - dos and ...Microservices and pineapple on pizza   what do they have in common - dos and ...
Microservices and pineapple on pizza what do they have in common - dos and ...
 
All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)
 
Designing a ui for microservices
Designing a ui for microservicesDesigning a ui for microservices
Designing a ui for microservices
 
Po is dead, long live the po
Po is dead, long live the poPo is dead, long live the po
Po is dead, long live the po
 
Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!
 
GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?
 
Dall'idea al deploy un lungo viaggio che passa per git flow e semver
Dall'idea al deploy   un lungo viaggio che passa per git flow e semverDall'idea al deploy   un lungo viaggio che passa per git flow e semver
Dall'idea al deploy un lungo viaggio che passa per git flow e semver
 
Progettare una UI per i Microservices
Progettare una UI per i MicroservicesProgettare una UI per i Microservices
Progettare una UI per i Microservices
 
The road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messagesThe road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messages
 

Último

Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Associazione Digital Days
 
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Associazione Digital Days
 
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Associazione Digital Days
 
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Associazione Digital Days
 
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Associazione Digital Days
 
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Associazione Digital Days
 
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Associazione Digital Days
 
Programma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 TorinoProgramma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 TorinoQuotidiano Piemontese
 
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Associazione Digital Days
 

Último (9)

Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
 
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
 
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
 
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
 
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
 
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
 
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
 
Programma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 TorinoProgramma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 Torino
 
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
 

.Net 4.0 Preview @ UGIdotNet

  • 1.
  • 2. .NET 4.0 Preview da VS10 a C# 4.0 Mauro Servienti Microsoft MVP - Visual C# Software Mason @ Managed Designs http://blogs.ugidotnet.org/topics mauro.servienti@manageddesigns.it
  • 3. Agenda  Visual Studio 2010  C# & VB.Net  Framework 4.0
  • 4. Certo non c’è “Linq”, ma...  Nuovo ambiente di sviluppo;  Nuovo TFS;  +296 classi;  Nuovo CLR, con tanto di supporto per l’hosting side-by-side;  Nuovo linguaggio: F#
  • 5. ...e poi  Nuove versioni per: Wpf, Wcf, Wf, Asp.net, Entity Framework e pure per il “defunto” Linq2Sql;  Nuovi attori: Parallel Library e Plinq, Code Contracts;  Integrazione/diffusione di xaml e... morte di xoml;  Nuove feature per i “vecchi” linguaggi;  Nuovi strumenti di refactoring;  Nuovi designer;
  • 6.
  • 7. Visual Studio 2010  Multi-targeting: 2.0 -> 4.0;  Nuovi strumenti di Refactoring orientati anche al TDD;  Nuovi designer;  Sequence Diagram;  Layer Diagram e Architecture Explorer  Code dependencies;  Commenti nel debugger;  Historical Debugger;  Post-mortem debug;
  • 8. Visual Studio 2010  Code Hierarchy;  Nuova dialog Choose Toolbox Items:  Filtri, suddivisa in categorie, sempre lenta...  Wpf, wpf, wfp e ancora wpf;  IDE “quasi” completamente riscritto in wpf;  “Piena” retrocompatibilità con i package e gli add-in;  “Cider”, l’intellisense per xaml e la nuova PropertyGrid;  Wpf Tree Visualizer;
  • 9. Visual Studio 2010  Web.config transformation;  Solo per deploy  Solo per “Web”... Forse... ○ Usa MS Build  MEF & Extensions  Microsoft Extensibility Framework != IoC  Nuovo Extension Manager  “Pluggabilità” dell’IDE rivoluzionaria;
  • 10. Visual Studio 2010 a first look
  • 11. C# vs VB... new stuff  Optional and Named  Multiline Lambdas; Parameters  Implicit Line Continuation;  Auto-implemented  Safe Co- & Contra- Properties; variance  Collection Initializers;  Dynamically Typed  Array Literals; Objects  Nullable Optional Parameters;  Improved COM  Co- & Contra-variance Interoperability  Interop with Dynamic Languages  Compiling without PIAs; C# VB.Net
  • 12. Optional and Named Parameters  Vale anche per i metodi;  IMVHO viola l’incapsulamento;
  • 13. Co-variance Fx 2.0 Fx 4.0
  • 15. Dynamically Typed Objects Calculator calc = GetCalculator(); int sum = calc.Add(10, 20); object calc = GetCalculator(); Type calcType = calc.GetType(); object res = calcType.InvokeMember("Add", BindingFlags.InvokeMethod, null, new object[] { 10, 20 }); int sum = Convert.ToInt32(res); ScriptObject calc = GetCalculator(); object res = calc.Invoke("Add", 10, 20); int sum = Convert.ToInt32(res); dynamic calc = GetCalculator(); int sum = calc.Add(10, 20);
  • 16. Dynamically Typed Objects  Il DLR supporta la creazione di oggetti C# no;  Non sono supportati gli extension methods;  Non possono essere usati come parametri di una chiamata oggetti Expression;
  • 18. COM Interop news  La firma delle API COM passa da Object a dynamic:  ((Excel.Range)excel.Cells[1, 1]).Value;  excel.Cells[1, 1].Value;  No-PIA: A runtime le informazioni presenti, e necessarie a design- time, vengono inglobate dal compilatore, quindi le/i PIA non vengono più caricati;  No-ref: COM ref != C# ref -> diventa onere del compilatore generare le variabili temporanee da passare “by reference”;
  • 19. Framework  Hosting API;  Code Contracts & PEX;  Parallel Library;  TreadPool;
  • 20. Hosting API 2.0 3.0 3.5 4.0 add-in add-in add-in add-in 3.5 3.0 .NET 4.0 .NET 2.0 Processo Host
  • 21. Code Contracts  Sintassi per esplicitare i requisiti sui dati;  Requires();  RequiresAlways();  Static Checker: controllo a compile time;  (a parte per la B1, http://msdn.microsoft.com/en- us/devlabs/dd491992.aspx)  Possibilità di fornire i contratti separati;  Contract Invariance;
  • 22. Code Contracts Pre condizioni public MyMethod( String argument ) { Contract.Requires( argument != null ); … } Post condizioni public string GetValue() { Contract.Ensures( Contract.Result<String>() != null ); … return something; }
  • 23. PEX  Add-in per Visual Studio (anche 2008?)  Genera un set mirato di unit-tests;  Può sfruttare Code Contracts;
  • 24. Multi-Core/Threading/Task...  L’hardware ha preso la sua strada;  Scrivere software che sfrutti più core è un’operazione complessa, troppo; Il focus del developer deve essere sul problema e non sull’infrastruttura che serve per risolvere il problema;
  • 25. I nuovi attori  Parallel LINQ (aka PLinq)  Task Parallel Library:  Task, Task<T>  Parallel.For, Parallel.ForEach  Parallel.Invoke  Coordination Data Structures:  System.Collections.Concurrent  Primitive per la sincronizzazione ○ Barrier, CountdownEvent, etc.  Unified Cancellation Model:  CancelationToken, CancelationTokenSource;
  • 26. AsParallel is the word <cit.> var q = from p in people.AsParallel() where p.Name == query.Name && p.State == query.State && p.Year >= yearStart && p.Year <= yearEnd orderby p.Year ascending select p;