Download presentation
Presentation is loading. Please wait.
Published byElaine McBride Modified over 9 years ago
1
Scott Hanselman Principal Program Manager Community Liaison Microsoft Corporation TL49
2
XX02 YY03 Sessions with Deeper Detail
5
Scott Hanselman
11
Principal Program Manager Community Liaison Microsoft Corporation
12
Scott Hanselman Principal Program Manager Community Liaison Microsoft Corporation
13
Scott Hanselman Principal Program Manager Community Liaison Microsoft Corporation
15
BabySmash Client BabySmash Web BabySmash Web BabySmash Service Reporting Site w/Charts BabySmash “Big *ss Table”? 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! BabySmash Mobile BabySmash Mobile
16
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!
17
Get your copy at the AW Booth!
18
WebWeb CoreCore WorkflowWorkflow DataData CommComm ClientClient
19
WebWebCoreCore Work flow DataDataCommComm ClientClient
20
ClientClient
21
ClientClient
22
ClientClient
23
ClientClient PC46 PC07
24
ClientClient
25
ClientClient
26
ClientClient
28
Scott Hanselman
29
CoreCore PC49 TL02
30
public class ExampleClass { public int ExampleMethod(int n) { CodeContract.Requires(n > 0, "n must be greater than 0"); CodeContract.Ensures( CodeContract.Result () >= 0, "Return value must be positive"); //... } public IEnumerable 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.
31
CoreCore
32
CoreCore TL33 TL26 TL44
33
Scott Hanselman
37
DataData
38
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 DataData
39
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 LoadSQL Methods var 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(); } DataData TL20 TL07
40
DataData TL20 TL07
41
Scott Hanselman
42
CommCommWorkflowWorkflow &
43
Host (.exe, IIS, "Dublin",.NET Services, …) WF Runtime Extensions Tracking Persistence … … Tooling VS Designer VS Debugger Rehosted Designer Workflow Activity Library
44
CommCommWorkflowWorkflow & TL17 TL06 TL21
45
= CLR+BCL
46
Scott Hanselman PC10 Session with Deeper Detail
48
void 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]; } } } } CoreCore
49
void 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]; } }); } CoreCore
50
Scott Hanselman
51
WebWeb TL54 Sessions with Deeper Detail
52
WebWeb
53
ASP.NET Web Forms Dynamic Data MVC ASP.NET Ajax
54
Scott Hanselman
55
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); CoreCore
56
dynamic x = win.New.VELatLong(latitude, longitude); var pin = map.AddPushpin(x); pin.SetTitle(title); pin.SetDescription(description); map.SetCenterAndZoom(x, 7); CoreCore TL10 TL44 Sessions with Deeper Detail
57
Scott Hanselman
58
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!
59
DataData CommComm WebWeb CoreCore WorkflowWorkflow ClientClient
60
DataData CommComm WebWeb CoreCore WorkflowWorkflow ClientClient
61
DataData CommComm WebWeb CoreCore WorkflowWorkflow ClientClient DataData CommComm CoreCore WorkflowWorkflow ClientClient
65
Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
67
© 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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.