Visual Studio 2008 and .NET 3.5 by dachou

VIEWS: 677 PAGES: 48

									David Chou
david.chou@microsoft.com

.NET Framework 3.5
LINQ ASP.NET 3.5
CLR Add-in Framework

Additional Enhancements

.NET Framework 3.0 + SP1
Windows Presentation Foundation Windows Communication Foundation Windows Workflow Foundation

Windows CardSpace

.NET Framework 2.0 + SP1

Windows CardSpace
• Streamlines user registration and one-click login • Mitigates common attack vectors (Phishing)

Windows Presentation Foundation
• Vector-based

• Resolution independent
• Rich media • 3D user interfaces

• Seamless integration with WCF

Windows Workflow Foundation
• Engine & tools for building workflowenabled composite apps

Windows Communication Foundation
• Secure Web services • Reliable transacted distributed apps • Interoperability with WS-* protocols • Any transport and any host

• System and human workflow
• Bringing workflow mainstream

ASMX

.NET Remoting

Interop with other platforms AttributeBased Programming
Enterprise Services

Extensibility Location transparency

WS-* Protocol Support
WSE

MessageOriented Programming
System.Messaging

INTEROPERABILITY

PRODUCTIVITY

SERVICE-ORIENTED DEVELOPMENT

• Broad Support for WS-* specifications • Compatible with existing MS distributed application technologies

• Unifies today’s distributed technologies • Attribute-based development • Visual Studio 2005 integration

• Enables development of loosely-coupled services • Config-based communication

Using Visual Studio .NET 2003
class HelloService {
[WebMethod] public String Hello(String Greeting) { X509CertificateCollection collection = new X509CertificateCollection(); IntPtr blob = Marshal.AllocHGlobal(Marshal.SizeOf( typeof(CRYPTOAPI_BLOB))); IntPtr data = (IntPtr)((int)blob + Marshal.SizeOf(typeof(CRYPTOAPI_BLOB))); … SeqAckRange range = new SeqAcknRange(id, low, high ); SeqAckRange[] ranges = { range }; ReliableQueue.ProcessAcks( ranges ); … BeginTransaction (NULL, ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, &pITransaction); … return Greeting; } }

20,379 lines
security

5,988 lines
reliable messaging

25,507 lines
transactions

4,442 lines
infrastructure

Total lines 56,296

Using Visual Studio .NET 2003 and WSE
class HelloService {
[WebMethod] public String Hello(String Greeting) { foreach ( SecurityToken tok in requestContext.Security.Tokens { X509SecurityToken token = tok as X509SecToken } … SeqAckRange range = new SeqAcknRange(id,low,high ); SeqAckRange[] ranges = { range }; ReliableQueue.ProcessAcks( ranges ); … BeginTransaction (NULL, ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, &pITransaction); … return Greeting; } }

10 lines
security

1,804 lines
reliable messaging

25,507 lines
transactions

Total lines 27,321

Using Visual Studio .NET 2005 and WCF
[ServiceContract] class HelloService { [OperationContract] [PrincipalPermission(SecurityAction.Demand, Role = “Adminstrators")] [TransactionFlow(TransactionFlowOption.Mandatory)] [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)] String Hello(String Greeting) {return Greeting;} } <bindings> <wsHttpBinding> <binding name="Binding1“ transactionFlow="true"> <security mode="Message"> <message clientCredentialType="Windows“/> </security> <reliableSession enabled="true" /> </binding> </wsHttpBinding> </bindings>

1 code + 2 config (elem.)
security

0 code + 1 config (elem.)
reliable messaging

2 code + 1 config (attr.)
transactions

Total lines: 3 code (what) + 4 config (how)

Visual Designer

Key Concepts
Workflows are a set of Activities Workflows run within a Host Process: any application or server Developers can build their own Custom Activity Libraries

Workflows Activity
Custom Activity Library Windows Workflow Foundation

Components
Base Activity Library: Out-of-box
activities and base for custom activities Runtime Engine: Workflow execution and state management

Base Activity Library Runtime Engine Runtime Services

Runtime Services: Hosting flexibility and
communication

Visual Designer: Graphical and codebased construction

Host Process

Next-generation UI platform for delivering innovative applications Unified approach to UI, media, & documents
   Integrated into a single, simplified framework DirectX-based vector graphics and resolution independent composition engine Leverages hardware acceleration

Enhanced designer-developer productivity




Expression Studio for designers; Visual Studio IDE for developers Declarative programming (XAML) for tool-driven collaboration

Flexible and simplified deployment
   ClickOnce and XBAP for on-demand (browser-based) Zip, MSI, EXE, etc. for local installation Common code base

Leverage existing code base and skill set
  Interoperability with WinForms, Win32, DirectX, MFC, ActiveX Leverage vested knowledge in .NET Framework, CLR languages, and Visual Studio IDE

Improve Developer Productivity
Address new business problems while decreasing the total cost of solution construction Developers, designers and database professionals see new tools and frameworks become available to simplify their tasks

Manage the Application Life Cycle
Enhances the end-to-end value of Visual Studio Team System Increases role-based coverage and delivers enhanced traceability throughout the SDLC Deeper integration across roles in the software life cycle and the Team Foundation Server

Employ the Latest Technologies
Targets Vista, 2007 Office System, and Web Enables teams to deliver safe, robust and compelling user experience in any type of application Preserves existing efforts by supporting multiple .NET Frameworks in Visual Studio

Visual Studio – multi-targeting (.NET Framework 2.0, 3.0, and 3.5) Platform LINQ – new programming model for data access that integrates query support directly within the .NET languages (to SQL, XML,Language ) collections WF & WCF – integrated support for rich, connected applications using a Services variety of types of services (REST, JSON, Workflow Services, SOAP, etc.) WPF Designer – provides design-time support for building WPF Windows Applications applications and a streamlined workflow between developers and designers (XAML IntelliSense, ClickOnce, Side-by-Side support for WinForms) ASP.NET AJAX – integrated into .NET 3.5 Web Applications JavaScript – Intellisense and debugging VSTO – enables developers to build Office Business Applications for Office Regions, Office on the client or server (Ribbon Designer, Outlook FormApplications integrated SharePoint tools, etc.) CLR Add-ins – generic framework for hosting add-ins within applications (loading/unloading, sandboxing, isolation, lifetime management, discovery, activation, backwards compat, forward compat, sharing) Mobile Applications .NET Compact Framework – new Device Emulator improves the mobile development experience (plus LINQ, WCF, etc. in NetCF 3.5)

New programming model for data access that integrates query support directly within the .NET languages Designed to reduce the complexity when working with data Query operators can be used against any collection
Built-in examples: Select, Where, GroupBy, Join, etc. Extensibility model supports extending/replacing these

Benefits
Work with data in a consistent way, regardless of the type of data Interact with data as objects Better integration with programming languages Improved productivity through IntelliSense in Visual Studio

C# 3.0

Visual Basic 9.0
.NET Language-Integrated Query LINQ enabled data sources
LINQ enabled ADO.NET LINQ to DataSet s

Others

LINQ to Objects

LINQ to SQL

LINQ to Entities

LINQ to XML

<book> <title/> <author/> <price/> </book>

Objects

Relational

XML

Accessing data today
Queries in Dim c As New SqlConnection(…) quotes c.Open() Dim cmd As SqlCommand( _ "SELECT c.Name, c.Phone “ & _ Loosely bound "FROM Customers c” & _ arguments "WHERE c.City = @p0") cmd.Parameters("@p0“) = "London" Dim dr As DataReader= c.Execute(cmd) Loosely typed While (dr.Read()) result sets Dim name As String = r.GetString(0) Dim phone As String= r.GetString(1) Dim date As DateTime = r.GetDateTime(2) End While No compile r.Close() time checks

Accessing data with LINQ
Public Class Customer … Classes describe data

Public Class Northwind Inherits DataContext

Public Property Customers As Table(Of Customer) … End Class Strongly typed Dim db As New Northwind(…) Dim contacts = _ From cust in db.Customers _ Where cust.City = "London" Select cust.Name, cust.Phone connection Integrated query syntax

Tables are like collections

For Each custInfo in contacts Strongly ColdCall(custInfo.Name, custInfo.Phone) typed results Next

Dim highThreadProcs = _ From proc In Process.GetProcesses _ Where proc.Threads.Count > 10 _ Select proc.ProcessName, proc.Threads.Count Dim highThreadProcs = Process.GetProcesses(). _ Where(Function(proc As Process) proc.Threads.Count > 10). _ Select (Function(proc As Process) _ New With {.ProcessName = proc.ProcessName _ .Count = proc.Threads.Count)

Function _Filter1(proc As Process) As Boolean Return proc.Threads.Count > 10 End Function
Function _Projection1(proc As Process) As <Anonymous Type> Dim projection As New <AnonymousType> projection.ProcessName = proc.ProcessName projection.Count = proc.Threads.Count Return projection End Function

Project Filter Test Join Group

Select <expr> Where <expr>, Distinct Any(<expr>), All(<expr>) <expr> Join <expr> On <expr> Equals <expr> Group By <expr>, <expr> Into <expr>, <expr> Group Join <decl> On <expr> Equals <expr> Into <expr> Count([<expr>]), Sum(<expr>), Min(<expr>), Max(<expr>), Avg(<expr>) Skip [ While ] <expr>, Take [ While ] <expr> Union, Intersect, Except Order By <expr>, <expr> [ Ascending | Descending ]

Aggregate Partition Set Order

Technologies added in .NET 3.0
WCF – Unified programming model and runtime for services WF - Flexible, declarative workflow runtime and activities

New enhancements in .NET 3.5
Http Programming Model JSON serialization & ASP.NET AJAX integration Syndication via RSS & ATOM Integrated support for WF & WCF (“Silver”) Partial Trust

Integrated developer tools in Visual Studio 2008
Add Service Reference Integrated WF Designer Project & item templates Autohost & test client WCF Configuration Editor

Services Services

Streaming

Integrated support for ASP.NET AJAX 1.0
Included in the .NET Framework 3.5 ASP.NET AJAX Project Templates

Web Application Projects included in Visual Studio Javascript IntelliSense & Debugging Richer HTML/CSS Designer Support
Split View (simultaneous source and designer) Nested Master Page preview in designer CSS Properties, Manage/Apply Styles windows, and direct style application toolbar Improved CSS/HTML layout and visualization in designer

New Web data controls
LinqDataSource, ListView, DataPager

HTML, Script, ASP.NET AJAX Markup

Service Proxies

ASP.NET AJAX ASP.NET Pages

Web Services

Client Script Library ASP.NET AJAX Server Extensions
Controls, Components Component Model and UI Framework ASP.NET AJAX Server Controls App Services Bridge Web Services Bridge

Client Application Services
Browser Integration

Base Class Library

ASP.NET 2.0
Script Core Browser Compatibility Page Framework, Server Controls Application Services

Client Framework and Services

Server Framework

Live ID Live Search

Live Alerts
Live Events

Live Spaces
Silverlight Streaming Live Contacts

Virtual Earth

Live Expo

Visual Studio Designer for WPF (“Cider”)
XAML-based editing directly in the IDE
Changes reflected in the designer in real-time XAML IntelliSense Selection Synchronization

ClickOnce deployment support for WPF apps Project templates, debugger & deployment support Side-by-side support for WinForms

Creates a seamless designer/developer workflow with Expression Interactive Designer (“Sparkle”)

VS 2008 includes Visual Studio Tools for Office 3.0 Provides integrated visual designers for:
Word and Excel documents and templates Fluent Ribbon Task & Action panes Outlook Form Regions

Integrated Workflow & Microsoft SharePoint Support Data binding in Word Content Controls Application-level add-ins for most client programs (both 2003 & 2007) Document-level add-ins for Excel & Word 2007 Improved deployment and security using ClickOnce

Ribbon Customization

Tab

Ribbon

Group

Control

Outlook custom form regions

Actions Pane

Browser
• •
Calculated data and charts

•

Spreadsheets rendered in web parts Set parameters, sort, filter, drill to explore and view the right data High fidelity to Excel client

Spreadsheets

Excel 2007
Design and author

Spreadsheets/snapshots Spreadsheets/ Calculated data

Excel 2007
• • Open in Excel for rich exploration and analysis Open snapshots

Office SharePoint Servers & Excel Services
• • • Spreadsheets stored in document libraries Spreadsheet calculation and rendering External data retrieval and caching

Custom Applications
• • Set values, perform calculations, get updated values via Web Services Retrieve full workbook file

Visual Studio Tools for Devices
Unit Testing for Device Applications Device Emulator 3.0 – Certificate support, Xml config Broad Platform and runtime Support

.NET Compact Framework 3.5
Support for LINQ (XML, Objects and Dataset) Windows Communication Foundation CLR Profiler / Performance Monitor BCL enhancements: Compression support, Client-side certificates, Sound APIs

Potala People

All Mobile Casino

JL Mobile XSales Rep

JL Mobile XSales Visor

Microsoft CRM Mobile

CCPocket

Pocket Humanity

Cross Browser Cross Platform .NET Media Experiences RIAs

Enhanced richness in graphics, interactivity, and media content delivery capabilities

Compelling Cross-Platform User Experiences
Internet Explorer, Firefox, Safari, Opera Windows (XP, Vista, Server), Apple OS X, Linux Windows Mobile, Nokia S60/S40 (Symbian)

Low Cost, High-Quality Media
SMPTE VC-1 HD video standard; WMV (v7-v10), WMA, MP3 PlayReady digital rights management Adaptive streaming with Windows Media technologies

Sophisticated .NET Platform Capabilities
Multi-language support – C#, VB, Ruby, Python, and JavaScript/AJAX Rich frameworks – WPF UI, LINQ, DeepZoom, extensible controls and templating models, layout management, integrated data binding, internationalization, local data cache/storage, etc. Robust networking – WS-*/SOAP, REST/POX/JSON, RSS, sockets, cross-domain access, etc. Enhanced performance in compiled managed code

Rich Internet Applications

Services

Office Business Applications

Windows Applications

David Chou
david.chou@microsoft.com blogs.msdn.com/dachou

© 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.

Microsoft® Popfly™ is the fun, easy way for anyone to build and share mashups, gadgets, Web pages, and applications. Popfly consists of two parts: Popfly Creator is a set of online visual tools for building Web pages and mashups. Popfly Space is an online community of creators where you can host, share, rate, comment and even remix creations from other Popfly users.

Blocks

Blocks enable Popfly users to do things like get their photos from Live Spaces or Flickr and visually display them using Silverlight blocks like a slideshow or an interactive photo carousel, all without writing code. Design Surface The interactive design surface enables you to drag and drop blocks and connect them together to build your application.
Fully Customizable HTML

Advanced users who want to fully control the rendered HTML can switch to the custom HTML view that provides you the ability to create any custom HTML, CSS, or JavaScript code you want. Think of it as your free area to experiment on the Web.

End-to-End Development Platform
Visual authoring environments Visual programming language

3D physics-based simulation tool
Cross-domain network access

Lightweight REST-Style, Service-Oriented Runtime
Concurrency and coordination library

Asynchronous, message-oriented model
Services based framework Real-time monitoring

Application Model
Consume sensory input
Orchestrate actuators response output Manage concurrent input and output RESTful eventing and data manipulation

XNA Game Studio Extends Visual Studio to create games using C#

Framework

XNA Framework Cross-platform game development framework and runtime .NET Framework for Xbox 360 Custom version of the .NET Compact Framework

Application Life Cycle Management (ALM) Solution

Business Analyst

Web Clients and XML Web Services

Operations, QA and Help Desk

Third-Party IDEs

Team Foundation Server 2008
Built-in support for Continuous Integration TFS Migration Toolkit “Get latest on checkout” Annotate Folder Diff

For developers:
Code metrics Performance “hotpathing” Profiler baselining Much faster unit testing performance

For testers:
Load testing support for AJAX applications Better UI for load test monitoring / reporting

And much more…


								
To top