scott hanselman principal program manager community liaison microsoft corporation tl49

Post on 02-Jan-2016

220 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Scott HanselmanPrincipal Program ManagerCommunity LiaisonMicrosoft Corporation

.NET Framework: Overview

& Apps for Babies

TL49

What’s useful in .NET 3.5What’s useful in .NET 4.0See how things fit together

Demystify complexityEschew obfuscation

EdutainSuggest other Sessions

The Goal of This Session

XX02YY03

Sessions with Deeper Detail

BabySmash!

Scott Hanselman

Demo

BabySmash Co-Op

BabySmash Baby Clans

BabySmash Baby vs. Baby

World of BabyCraft

Scott HanselmanPrincipal Program ManagerCommunity LiaisonMicrosoft Corporation

World of BabyCraft

Scott HanselmanPrincipal Program ManagerCommunity LiaisonMicrosoft Corporation

MMORPGBS!w/.NET

Scott HanselmanPrincipal Program ManagerCommunity LiaisonMicrosoft Corporation

BabySmash Client

BabySmashWeb

BabySmashService

Reporting Site w/Charts

BabySmash“Big *ss Table”? DB

JIST: Babies smash, metrics are sent up to the server and the reporting site shows a nice histogram bell curve of what keys are being smashed. Then we take the babies’ money. PayPal FTW!

BabySmashMobile

BabySmash WPF

BabySmash Silverlight

BabySmash

ADO.NET Data Service

Reporting Site ASP.NET

MVC

BabySmash

Surface SQL2k8

JIST: Babies smash, metrics are sent up to the server and the reporting site shows a nice histogram bell curve of what keys are being smashed. Then we take the babies’ money. PayPal FTW!

BabySmash Windows Mobile

Today

Get your copy at the AW Booth!

WebCore

Workflow

DataCommClient

Web Core Workflow

DataCommClient

Client

WPFDeveloper != DesignerData BindingSurface

Deployment ClickOnce (and FireFox) .NET Client Profile

Silverlight 2Silverlight Mobile

Client

Client

Client

LOTS. Can’t tell you, go to the Keynote then to

PC46!

PC46PC07

Client

LOTS Can’t tell you, go to the Keynote then to

PC46!

PC46PC07

Client

LOTS Can’t tell you, go to the Keynote then to

PC46!

PC46PC07

Client

LOTS Can’t tell you, go to the Keynote then to PC46!

PC46PC07

It' s a giant table! With a baby on it!

BabySmash! Surface

Scott Hanselman

Demo

Core

Multi-targetingSide by Side in the

same processCode by Contract

*cough* Spec# *cough*

PC49TL02

public class ExampleClass {

public int ExampleMethod(int n)

{

CodeContract.Requires(n > 0,

"n must be greater than 0");

CodeContract.Ensures(

CodeContract.Result<int>() >= 0,

"Return value must be positive");

//...

}

public IEnumerable<String> Contents

{ get; set; }

[ContractInvariantMethod]

protected void ObjectInvariant() {

CodeContract.Invariant(

CodeContract.ForAll(Contents,

s => s != null));

//...

}

}

Contracts come at the

beginning of

methods.

Precondition

stating that the

input parameter to the

method must be greater than 0 for the

method to

function properly

.

Postcondition

guaranteeing

that the result of

the method will be

positive. Callers

can count

on this.

Developers can provide a string

to be displayed when

the contract

is violated

.

All object

invariants are

contained in a single

method, which

may contain many

calls to CodeContract.ObjectInvariant and no other calls.

Guarantees that

all elements in the

IEnumerable are

not null.

In-process SxS

CLR v2 and CLR v4 activated in the same processNo support for v1.0 and v1.1

New Host APINew Activation Policy

Core

Core

Parallel LINQSystem.NumericsMEF - ComponentModel.CompositionSystem.XamlSystem.Threading

SpinLock, Parallel, LazyInitSystem.IO.MemoryMappedFiles“Dynamic”

TL33TL26TL44

MEF

Scott Hanselman

Demo

My New Friends

My New Friends

My New Friends

Data

LINQ to SQLEntity FrameworkADO.NET Data ServicesSQL 2008

ADO Data Services Semantics

Underlying data model - Entity Data Model - Entities Resources - Associations Links

Operation semantics - Mapping of HTTP methods - GET retrieve resource - POST create resource - PUT update resource - DELETE delete resource

Data

Entity Framework v2

using (NorthwindContext context = new NorthwindContext()){ //--- EF LINQ query with POCO Product var products = from p in context.Products select p; foreach (Product product in products) { //--- Lazy load the Category Console.WriteLine(String.Format("{0}:{1}", product.ProductName, product.Category.CategoryName)); } }

POCO & Lazy Load

SQL Methodsvar people = from e in context.Employees where EdmMethods.Month(e.BirthDate) == EdmMethods.Month(NorthwindContext.MyGetUtcDate()) select e;____________________________________________________________________________________ [EdmFunction("SqlServer", "GETUTCDATE")] public static System.DateTime? MyGetUtcDate() { throw new Exception(); }

• New Stored procedure Capabilities• TVF Support• Query Re-Writing• New n-tier API’s• Model Defined Functions• Template Based Code-Generation

Data

TL20TL07

ADO.NET Data Services v2

Data bound UI Enhanced data binding support in .NET and SL client library

Performance Enhancements Query caching

Working with BLOB content Automatic BLOB deferral Server side media link entry support

Mashups Support microformats in feeds Map Entity properties to ATOM-defined elements

REST interface extensions Server driven paging Expose # results in a set as a URL

Data

TL20TL07

BabySmashSmashy Services Scott Hanselman

Demo

Comm

WCFWeb ServicesUnified StackConsume from Silverlight

RESTServiceModel.SyndicationADO.NET Data Services

Workflow

Workflow&

Host (.exe, IIS, "Dublin", .NET Services, …)

WF Runtime Extensions

Tracking

Persistence

Windows Workflow Foundation (WF) 4.0WF programs

coordinate work with minimal ceremony

It’s ART:ActivitiesRuntimeTooling Tooling

VS Designer

VS Debugger

Rehosted Designer

WorkflowActivity Library

Why Workflow?Coordinate Asynchronous WorkWrite Persistable ApplicationsGain Visibility into your

ApplicationCustomizable Vocabulary &

Design Experience

Comm Workflow&

TL17TL06TL21

MEF (Beta)

= CLR+BCLBabySmash Line of

Business

BabySmash!Silverlight 2for Mobile

Scott Hanselman

Demo

PC10

Session with Deeper Detail

Agenda – What is the point of this talk?

Parallel Programming Example

Sequentialvoid MultiplyMatrices(int size, double[,] m1, double[,] m2, double[,] result) { for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { result[i, j] = 0; for (int k = 0; k < size; k++) { result[i, j] += m1[i, k] * m2[k, j]; } } } }

Core

Parallel Programming Example

Parallelvoid MultiplyMatrices(int size, double[,] m1, double[,] m2, double[,] result)

{ Parallel.For(0, size, i => { for (int j = 0; j < size; j++) { result[i, j] = 0; for (int k = 0; k < size; k++) { result[i, j] += m1[i, k] * m2[k, j]; } } }); }

Core

MasssivelyParallelBabies

Scott Hanselman

Demo

Web

ASP.NET WebFormsASP.NET MVC (Beta)ASP.NET Dynamic DataASP.NET Ajax

AJAX Control Tookit jQuery

Silverlight 2Hybrids welcome!

System.Web.Routing TL54

Sessions with Deeper Detail

Web

ASP.NET Web Forms 4.0Control over your HTML & ViewStateASP.NET Ajax 4.0 + Templating jQuery embraced, not eatenCharts

ASP.NET Dynamic Data 2.0ASP.NET MVC + Dynamic DataSilverlight 2

Silverlight Toolkit and Controls

ASP.NET > Web Forms

ASP.NET

WebForms

Dynamic Data

MVC

ASP.NET Ajax

TPS Reports (and TPS Charts!)

Scott Hanselman

Demo

DOM interop pre DLR

ScriptObject x = win.CreateInstance("VELatLong",latitude,longitude);

ScriptObject pin = (ScriptObject)map.Invoke("AddPushpin", x);pin.Invoke("SetTitle", title);pin.Invoke("SetDescription", description);map.Invoke("SetCenterAndZoom", x, 7);

Core

DOM interop with DLR

dynamic x = win.New.VELatLong(latitude, longitude);var pin = map.AddPushpin(x);pin.SetTitle(title);pin.SetDescription(description);map.SetCenterAndZoom(x, 7);

Core

TL10TL44

Sessions with Deeper Detail

http://tinyurl.com/bigdemo

Scott Hanselman

Big Final Demo

BabySmash WPF

BabySmash Silverlight

BabySmash

ADO.NET Data Service

Reporting Site ASP.NET

MVC

BabySmash

Surface SQL2k8

JIST: Babies smash, metrics are sent up to the server and the reporting site shows a nice histogram bell curve of what keys are being smashed. Then we take the babies’ money. PayPal FTW!

BabySmash Windows Mobile

Today

DataComm

WebCore

Workflow

Client

DataComm

WebCore

Workflow

Client

DataComm

WebCore

Workflow

ClientData

Comm

Core

Workflow

Client

Kit George and Brad Abrams Grant Archibald - http:/garchibald.com Giorgio Sardo and Amit Chopra Rob Conery Stephen Toub Felix Corke & Richard Griffin – Conchango Robert Levy – Surface John Bowen and Interknowlogy Jason Olson

Credits

Evals & Recordings

Please fill

out your

evaluation for

this session at:

This session will be available as a recording at:

www.microsoftpdc.com

Please use the microphones provided

Q&A

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

top related