38

Next gen JIT (“RyuJIT”) SIMD (Data Parallelization) RuntimeCompilers.NET Compiler Platform (“Roslyn”) Languages innovation BCL and PCL Entity Framework

Embed Size (px)

Citation preview

The Present and Future of .NET in a World of Devices and Services

Habib HeydarianProgram Manager, [email protected]

.NETvNext Web and services

Future of .NET

Device optimized Native compilation Small footprint, side-by-side Cross-device enabled

Cloud optimized High throughput Small footprint, side-by-side Cross-platform enabled

Windows Store, WPF, Windows Forms, Console apps and related libraries.

ASP.NET vNext: Web Forms, MVC, Web Pages, Web API, SignalRWCF

Client apps

Next gen JIT (“RyuJIT”)

SIMD (Data Parallelization)

Runtime

Compilers.NET Compiler Platform (“Roslyn”)

Languages innovationBCL and PCLEntity Framework

Libraries

Common

Openness

Multi-purpose

Specialized

Announcing .NET 4.5.2

Numerous performance, compatibility, reliability fixesSix small, but impactful features

Enable ASP.NET apps to reliably schedule Async work itemsResize Windows Forms controls using system DPI settingsEnhancements for Microsoft Distributed Transaction Coordinator (MSDTC) transactionsOut-of-process, activity tracing based on ETW (Event Tracing for Windows)New debugging APIs (ICorDebug)New profiler APIs (ICorProfiler)

Complete feature list available at http://blogs.msdn.com/dotnet

What’s New in .NET 4.5.2?

.NETvNext Web and services

Future of .NET

Device optimized Native compilation Small footprint, side-by-side Cross-device enabled

Cloud optimized High throughput Small footprint, side-by-side Cross-platform enabled

Windows Store, WPF, Windows Forms, Console apps and related libraries.

ASP.NET vNext: Web Forms, MVC, Web Pages, Web API, SignalRWCF

Client apps

Next gen JIT (“RyuJIT”)

SIMD (Data Parallelization)

Runtime

Compilers.NET Compiler Platform (“Roslyn”)

Languages innovationBCL and PCLEntity Framework

Libraries

Common

Openness

Multi-purpose

Specialized

Modernizing business applications with .NET on Devices and Services

Core-Business.NET Applications

WIN

DO

WS

Build new experiences on modern devices

CLOUD

Azure Active Directory

Re-use .NET skills in cloud environments

AzureMobileServiceson .NET

AzureWeb Sites and Serviceson .NET

CRO

SS DEV

ICE

Build native or browser-based apps across any device

C#

ASP.NET updates in Visual Studio 2013 Update 2• Updates in MVC, WebAPI, SignalR• Web forms: scaffolding and

Dynamic Data updates• ASP.NET Identity 2• Entity Framework 6.1• Web jobs (preview)• Browser Link SSL support

Azure Mobile Services on .NET• Backend .NET development• New Visual Studio tooling

ASP.NET updatesIn Visual Studio 2013 UPDATE 2

Azure mobile services.NET development and VS Tooling

.NET in Cloud, Web, and Services

Announcing: .NET Client Libraries for MS Services

It’s easy to build .NET apps that use Microsoft services, and share your service code across apps that target Windows, iOS and Android (Xamarin).

Add a service to your app

in Visual Studio

Write code to use the service

Use in desktop,

device and server apps

Azure Active Directory for authentication

Office 365 for mail, calendar, contacts, users and groups and files

Azure Mobile Services for auth and data

Application Insights for analytics

Using services gets much easierUsing service directlyprivate async Task AddToCalendar() { Office365ServiceInfo serviceInfo = await Office365ServiceInfo.GetExchangeServiceInfoAsync(); if (!serviceInfo.HasValidAccessToken){ return; } CalendarEvent calendarEvent = CreateCalendarEvent(); string requestUrl = String.Format(CultureInfo.InvariantCulture, "{0}/Me/Calendar/Events", serviceInfo.ApiEndpoint); using (HttpClient client = new HttpClient()) { Func<HttpRequestMessage> requestCreator = () => { HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, requestUrl); request.Content = new StringContent(JsonConvert.SerializeObject(calendarEvent)); request.Headers.Add("Accept", "application/json;odata=minimalmetadata"); request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); return request; }; } using (HttpResponseMessage response = await Office365Helper.SendRequestAsync(serviceInfo, client, requestCreator)) { string responseString = await response.Content.ReadAsStringAsync(); if (response.IsSuccessStatusCode) { string message = "Calendar event for the charge on " + charge.ExpenseDate.ToString("D") + " was added successfully."; await new MessageDialog(message, "Success!").ShowAsync(); } else { await Office365Helper.ShowErrorMessageAsync(serviceInfo, responseString); } } } private CalendarEvent CreateCalendarEvent() { return new CalendarEvent() { EntityType = "#Microsoft.Exchange.Services.OData.Model.Event", Subject = charge.BilledAmount.ToString("C2") + " @ " + charge.Merchant + "; " + charge.Description, Start = charge.ExpenseDate.Date.ToUniversalTime(), End = charge.ExpenseDate.Date.AddDays(1).AddTicks(-1).ToUniversalTime(), Location = new CalendarLocation() { DisplayName = this.charge.Location } };  } private class CalendarEvent { [JsonProperty("@odata.type")] public string EntityType { get; set; } public string Subject { get; set; } public DateTime Start { get; set; } public DateTime End { get; set; } public CalendarLocation Location { get; set; } }  private class CalendarLocation { public string DisplayName { get; set; }  }

Using client libraryprivate async Task AddToCalendar() { var authenticator = new Authenticator(); var result = await authenticator.AuthenticateAsync("Calendar",ServiceIdentifierKind.Capability); var client = new ExchangeClient(result.ServiceUri, result.GetAccessToken); Event calendarEvent = new Event { Subject = charge.BilledAmount.ToString("C2") + " @ " + charge.Merchant; Start = charge.ExpenseDate.Date.ToUniversalTime(), End = charge.ExpenseDate.Date.AddDays(1).AddTicks(-1).ToUniversalTime(), Location = new Location() { DisplayName = this.charge.Location, } }; await client.Me.Calendar.Events.AddEventAsync(calendarEvent); string message = "Charge on " + charge.ExpenseDate.ToString("D") + " was added"; await new MessageDialog(message, "Success!").ShowAsync(); }

API and Auth examples

// Authenticate with Mailvar auth = new Authenticator();var result = await auth.AuthenticateAsync(“Mail",ServiceIdentifierKind.Capability);

Easy authentication – shows auth UI on each platform

Simple to call Microsoft APIs// Create a client objectvar calendar= new ExchangeClient(result.ServiceUri, result.GetAccessToken);// Get upcoming meetingsvar eventsRequest = await (from i in calendar.Me.Events where i.End >= DateTimeOffset.UtcNow select i).Take(10).ExecuteAsync();

Client Libraries Experience in Visual Studio

Services Managerenables you to add Microsoft services support in your app

Registers your app with the service

Adds NuGet packages to your app

.NET Client Libraries for Microsoft ServicesDemo

Preview available today!

Visual Studio Extensions Office 365 API Tools Preview HTML Multi-device Hybrid Apps

Libraries: Microsoft Azure Active Directory Graph API Microsoft Office 365 Auth API Microsoft Office 365 Mail, Calendar and Contacts API Microsoft Office 365 Files API Azure Mobile Services Application Insights

Check http://aka.ms/ClientLibraries to get started Please give us feedback on the experience

.NETvNext Web and services

Future of .NET

Device optimized Native compilation Small footprint, side-by-side Cross-device enabled

Cloud optimized High throughput Small footprint, side-by-side Cross-platform enabled

Windows Store, WPF, Windows Forms, Console apps and related libraries.

ASP.NET vNext: Web Forms, MVC, Web Pages, Web API, SignalRWCF

Client apps

Next gen JIT (“RyuJIT”)

SIMD (Data Parallelization)

Runtime

Compilers.NET Compiler Platform (“Roslyn”)

Languages innovationBCL and PCLEntity Framework

Libraries

Common

Openness

Multi-purpose

Specialized

Universal Windows appsShared across Windows and Windows Phone 8.1 apps

.NET NativeNative code compilation

.NET Native compilation• Optimized with the C++ optimizer while

getting C# productivity• V1 targets just store apps• Preview available today as VS 2013 add-in• Learn: http://aka.ms/dotnetnative

Universal app project

.NET in Windows Store devices

.NET NativeDemo

Device-independent

Full access to device features and power

Cross-platform and client development trends

Native

Web

C# + XIB C# + AXML C# + XAML

Native UI Native UI Native UI

Shared client app C# logic

Fully native apps written entirely in C#

Xamarin exposes 100% of iOS and Android APIs in C#

Partnership

“With Xamarin, developers combine all of the productivity benefits of C#, Visual Studio and Windows Azure with the flexibility to quickly build for multiple device targets.” S. Somasegar, Corporate Vice President,

Microsoft

Native cross-device appspowered by Xamarin and Microsoft .NET

.NETvNext Web and services

Future of .NET

Device optimized Native compilation Small footprint, side-by-side Cross-device enabled

Cloud optimized High throughput Small footprint, side-by-side Cross-platform enabled

Windows Store, WPF, Windows Forms, Console apps and related libraries.

ASP.NET vNext: Web Forms, MVC, Web Pages, Web API, SignalRWCF

Client apps

Next gen JIT (“RyuJIT”)

SIMD (Data Parallelization)

Runtime

Compilers.NET Compiler Platform (“Roslyn”)

Languages innovationBCL and PCLEntity Framework

Libraries

Common

Openness

Multi-purpose

Specialized

ASP.NET vNext and the Modern Web

Choose your Editors and Tools

Open Source with Contributions

OSS

Seamless transition from on-prem to cloud

Faster Development CycleTotally Modular

Fast

Enabling the Modern Web and Cloud

Common Improvements

Consistency ModularizationTracing & DiagnosticsDependency Injection

Extending Application Types

Enterprise LOB on WebEnterprise LOB desktop apps with web backendModern Web applications

Familiar frameworks

Modern Web – Agility

Faster Development Cycle

Features are shipped as packagesFramework ships as part of the application

More Control

Zero day security bugs patched by MicrosoftSame code runs in development and productionDeveloper opts into new versions, allowing breaking changes

Modern Web - Fast

Runtime Performance

Faster startup timesLower memory / higher density (> 90% reduction)Modular, opt into just features neededUse a raw socket, framework or both

Development productivity and low friction

Edit code and refresh browserFlexibility of dynamic environment with the power of .NETDevelop with Visual Studio, third party and cloud editors

Modern Web – Cloud

Cloud readyConfigurationSessionCache

DiagnosticsRun/Debug in CloudTracing/Logging without re-deploy

Seamless transition from on-premises to cloud

ASP.NET vNext - Summary

Feature .NET vNext

.NET vNext (Cloud Optimized)

Cloud Ready * *

Modular Design * *

Dependency Injection * *

Consistent Tracing / Debugging * *

Faster Development (No Build Step) * *

Open Source * *

Full Side by Side (framework deployed inside application)

*

Fast startup, Low memory / High throughput (best of class)

*

MVC, Web API, Web Pages 6, SignalR 3, EF 7

.NETvNext Web and services

Future of .NET

Device optimized Native compilation Small footprint, side-by-side Cross-device enabled

Cloud optimized High throughput Small footprint, side-by-side Cross-platform enabled

Windows Store, WPF, Windows Forms, Console apps and related libraries.

ASP.NET vNext: Web Forms, MVC, Web Pages, Web API, SignalRWCF

Client apps

Next gen JIT (“RyuJIT”)

SIMD (Data Parallelization)

Runtime

Compilers.NET Compiler Platform (“Roslyn”)

Languages innovationBCL and PCLEntity Framework

Libraries

Common

Openness

Multi-purpose

Specialized

.NET Compiler Platform (“Roslyn”)

FROMIsolated/closed compilers

Hard to extend dev experience

C#, VBSource code

.exe/.dilIL assemblies

Established .NET compilers

TOAPI: open platform

Rich IDE experiences/refactoring

Code analysis

Custom diagnostics

Open Source compilers.NET Compilers Platform

(a.k.a. ROSLYN)

C#, VBSource code

.exe/.dilIL assemblies

Open platform for developers

Language and IDE

VS dev experience extensibility

Open Source

.NET Compiler Platform (“Roslyn”)

OSS

API

C#VB

Public preview availablehttp://aka.ms/NETCompilerPlatform

Basis for .NET and Visual Studio vNext

Is OPEN SOURCEhttp://aka.ms/RoslynOSS

.NET Compiler Platform (“Roslyn”)Demo

.NETvNext Web and services

Future of .NET

Device optimized Native compilation Small footprint, side-by-side Cross-device enabled

Cloud optimized High throughput Small footprint, side-by-side Cross-platform enabled

Windows Store, WPF, Windows Forms, Console apps and related libraries.

ASP.NET vNext: Web Forms, MVC, Web Pages, Web API, SignalRWCF

Client apps

Next gen JIT (“RyuJIT”)

SIMD (Data Parallelization)

Runtime

Compilers.NET Compiler Platform (“Roslyn”)

Languages innovationBCL and PCLEntity Framework

Libraries

Common

Openness

Multi-purpose

Specialized

Openness

Community

Rapid innovation

The .NET Foundation

.NET API for Hadoop WebClient

.NET Compiler Platform ("Roslyn").NET Map Reduce API for Hadoop

.NET Micro Framework

ASP.NET MVCASP.NET Web API

ASP.NET Web Pages

ASP.NET SignalR

Composition (MEF2)

Entity Framework

Linq to Hive

MEF (Managed Extensibility Framework)

OWIN Authentication Middleware

Rx (Reactive Extensions)

Web Protection Library

Windows Azure .NET SDK

Windows Phone Toolkit

WnsRecipe

Mimekit Xamarin.Auth

Xamarin.Mobile

Couchbase for .NET

Miguel de Icaza (Xamarin)

Laurent Bugnion (IdentityMine)

Niels Hartvig (Umbraco)

Anthony van der Hoorn (Glimpse)Paul Betts (GitHub)

Nigel Sampson (Compiled Experience)Join the conversation with the

community http://www.dotnetfoundation.org@dotnetfdn // #dotnetfdn

Mailkit

System.Drawing

You wanted it, you got it

Lean

Open

Cross-platform

Introducing: The Future of .NET on the Server (DEV-B385)

Related content

Deep Dive: The Future of .NET on the Server (DEVB411)The Future of Visual Basic and C# (DEV-B336)

Native Mobile App Development for iOS, Android and Windows in C# and VS using Xamarin (DEVB221)

Resources

Learning

Microsoft Certification & Training Resources

www.microsoft.com/learning

msdn

Resources for Developers

http://microsoft.com/msdn

TechNet

Resources for IT Professionals

http://microsoft.com/technet

Sessions on Demand

http://channel9.msdn.com/Events/TechEd

Complete an evaluation and enter to win!

Evaluate this session

Scan this QR code to evaluate this session.

© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.