Vous êtes sur la page 1sur 8

Overview

VISUAL STUDIO 2008 NEW FEATURES


Eduardo Castro Microsoft MVP ecastrom.blogspot.com edocastro@simsasys.com
http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

Introduction to Visual Studio 2008 .NET Framework Multi-Targeting Support MultiC# and VB.NET Language Enhancements Introduction to Language Integrated Query (LINQ) Major HTML / CSS Designer Enhancements Rich AJAX and JavaScript Support And much more
http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

Visual Studio 2008 Editions


Several editions of Visual Studio 2008 are available:
Visual Basic 2008 Express Edition Visual C# 2008 Express Edition Express Visual C++ 2008 Express Edition Visual Web Developer 2008 Express Edition Standard Professional Team Suite
http://ecastrom.spaces.live.com/

Topic: Visual Studio 2008 Team Suite


Visual Studio 2008 Team Suite contains four main components:
Architect Developer Test Database

System, service, application, data center designers Code editors, visual designers, debugging, unit tests, code metrics Create, edit, manage and run tests Database project templates, rename refactoring, visual diff/merge, test data generation

Visual Studio 2008 Standard Edition Visual Studio 2008 Professional Edition Visual Studio 2008 Team Suite (Architect, Developer, Test and Database)
http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

Topic: Visual Studio 2008 Feature Highlights


Visual Studio 2008 provides many new features that significantly enhance developer productivity:

Framework Multitargeting
Visual Studio 2008 supports targeting multiple versions of the .NET Framework Choose which Framework version to target when opening or creating an application
.NET Framework 2.0 (Whidbey) .NET Framework 3.0 (Vista) .NET Framework 3.5 (Orcas)

HTML split view designer LINQ to SQL Designer JavaScript Intellisense CSS property viewer WPF designer Office designer support .NET framework multi-targeting support

Visual Studio IDE only shows feature appropriate for your selected target version
Toolbox, Add New Item, Add Reference, Add Web Reference, Intellisense, etc Intellisense,
http:// ecastrom.blogspot.com http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

2001 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Framework Multitargeting
Version = Assembly references + compilers No new CLR runtime
.NET Fx 3.5 .NET Fx 3.0 Update .NET Fx 2.0 Update 2008

Topic: Configuring an Application's Target Framework


Visual Studio 2008 can target multiple versions of the .NET framework

.NET Fx 3.0 .NET Fx 2.0 Update Vista

.NET Fx 2.0

Whidbey

time
http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

Topic: Developing and Maintaining .NET 2.0 Applications


.NET framework 2.0 applications can be developed using Visual Studio 2008 Leverage VS 2008 editor features without requiring applications to be updated to .NET 3.5 MultiMulti-targeting support simplifies future application maintenance

Object Browser Framework Version Filtering


The Visual Studio 2008 Object Browser supports framework version filtering:

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

HTML Designer
Massively improved HTML designer
Same WYSIWYG designer as in Expression

Demo
MultiMulti-Targeting

New features:
Rich CSS editing support Split view editor Fast designer/source switching Nested master pages

Enable better designer/developer workflow


http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

2001 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

C# and VB.NET Language Enhancements


Language Enhancement Overview Object Initializers Anonymous Types Extension Methods How to define Extension Methods in C# How to define Extension Methods in VB.NET Lambda Expressions

Language Enhancement Overview


C# and VB.NET have been enhanced to reduce the amount of code that has to be written:
Object Initializers Anonymous types Extension Methods Lambda Expressions Assign values to object fields or properties without explicit constructors when the object is created Compiler infers types without requiring explicit type definitions Add methods to existing types without creating a derived type Expression used in place of a delegate to simplify coding and allow for more expressive code
http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

Object Initializers
Object initializers allow accessible field or property values to be initialized with values without explicit constructor calls
[Visual C#]

Anonymous Types
Anonymous types allow read-only readproperties to be defined for an object without an explicit type definition
[Visual C#]

Person p = new Person {FirstName = "John", LastName="Doe",State="AZ"};

var p = select new {FirstName = "John", LastName="Doe"};

[Visual Basic] [Visual Basic] Dim p As New Person With {.FirstName = "John", .LastName = "Doe", _ .State="AZ"} Dim p = New With {.FirstName = "John", .LastName = "Doe"}

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

Extension Methods
Extension methods allow existing types to be extended without creating a derived type Extension method guidelines:
Cannot be used to override existing methods Extension method with the same name and signature as an instance method will not be called The concept of extension methods cannot be applied to fields, properties or events Use extension methods sparingly
http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

How to Define Extension Methods in C#


Extension methods are defined as static methods but act like instance methods at runtime
namespace StringExtensions { public static class StringExtensionsClass { public static string RemoveNonAlphaNumeric(this string s) { (this MatchCollection col = Regex.Matches(s,"[A-Za-z0-9]"); StringBuilder sb = new StringBuilder(); foreach (Match m in col) sb.Append(m.Value); return sb.ToString(); } } } . string phone = "123-123-1234"; string newPhone = phone.RemoveNonAlphaNumeric();

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

2001 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Lambda Expressions
A lambda expression is a function without a name that evaluates a single expression and returns its value
[Visual C#] List<string> names = new List<string> { "John", "Jim", "Michelle" }; IEnumerable<string> filter = names.Where(p => p.StartsWith("J")); ("J")); [Visual Basic] Dim names As New List(Of String) names.Add("John") names.Add("Jim") names.Add("Michelle") Dim filter As IEnumerable(Of String) = _ names.Where(Function(p) p.StartsWith("J"))
http://ecastrom.spaces.live.com/ http://ecastrom.spaces.live.com/

Demo
Language Enhanments

http:// ecastrom.blogspot.com

http:// ecastrom.blogspot.com

Introduction to LINQ
What is LINQ? LINQ Operators LINQ Syntax Fundamentals LINQ to SQL Designer

Working with Data


Querying and manipulating data has always been a fundamental part of our jobs as programmers, and always will be Data formats change, but core needs remain the same With Orcas we are trying to take the concept of querying, manipulating, and updating data to the next level

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

Introducing LINQ
(Language Integrated Query)
Query, Set and Transform Operations for .NET Makes querying data a core programming concept Works with all types and shapes of data
Relational database XML Objects

What is LINQ?
LINQ = Language Integrated Query Native C# and VB.NET language feature Comprehensive query technology:
Query Objects Query Databases Query XML Query custom data stores

Works with all .NET languages


New VB and C# have integrated language support Support for both static typed and dynamic languages
http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

Reduces complexities associated with accessing data that isn't defined using OO technology Provides static typing and compile-time syntax compilechecking
http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

2001 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

LINQ Operators
LINQ supports several different operations:
Filter Sort Select Group Join

LINQ Syntax Fundamentals


LINQ queries specify the data source to query, the filter clause and the data to select
[Visual C#] string[ ] states = { "Arizona", "Alaska", "Utah", "Nevada" }; var selectedStates = from s in states where s.StartsWith("A") select s; [Visual Basic] Dim states As String() = { "Arizona", "Alaska", "Utah", "Nevada" } Dim selectedStates = From name In states _ Where name.StartsWith("A") _ Select name

LINQ operators are expressed declaratively using C# or VB.NET Visual Studio 2008 provides Intellisense support for operators
http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

LINQ to SQL Designer


Visual Studio 2008 provides a LINQ to SQL designer that handles mapping relational data to CLR objects

Demo
LINQ

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

ASP.NET AJAX
Works on top of ASP.NET 2.0 and VS 2005
Fully supported V1.0 shipped last week on the web

ASP.NET AJAX Control Toolkit


Separate download from core ASP.NET AJAX
Great library of free ASP.NET AJAX enabled controls Download from http://ajax.asp.net/

Delivers core ASP.NET AJAX foundation:


JavaScript type-system typeJavaScript<JavaScript<->.NET Networking Serialization JavaScript library of common routines ASP.NET Server Control Integration

Developed using a collaborative source model


All source freely available with modification license Both Microsoft & non-Microsoft developers can contribute non-

ASP.NET AJAX 1.0 features


Examples: richer web part integration, richer data serialization support, more client controls
http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

Already contains 35 really cool controls


Goal is to get 50-100 great controls over the next months 50-

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

2001 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

AJAX Control Extenders


Controls that can AJAX-enable existing AJAXHTML UI and ASP.NET Server Controls
<asp:LinkButton ID=ShowHideBtn" runat="server">Details...</asp:LinkButton> ID=ShowHideBtn" runat="server">Details...</asp:LinkButton> <asp:Panel ID="detailsPanel" runat="server" CssClass="DetailsPanel"> ID="detailsPanel" runat="server" CssClass="DetailsPanel"> Blah, Blah, Blah <br /> Blah, Blah, Blah <br /> Blah, Blah, Blah </asp:Panel> </asp:Panel> <ajaxToolkit:CollapsiblePanelExtender TargetControlID="detailsPanel TargetControlID="detailsPanel CollapseControlID="ShowHideBtn" CollapseControlID="ShowHideBtn" ExpandControlID="ShowHideBtn" ExpandControlID="ShowHideBtn" Collapsed="true" SuppressPostBack="true" SuppressPostBack="true" runat="server runat="server />
http:// ecastrom.blogspot.com

Visual Studio AJAX Support


JavaScript Intellisense
Code intellisense for client-side JavaScript clientIntegrated editor support for ASP.NET AJAX JS Library Intellisense against JSON enabled .asmx web services .asmx BuildBuild-time syntax checking

JavaScript Debugging
Improved discoverability Breakpoints in .aspx documents .aspx New visualization features for variables

ASP.NET AJAX Extender Control Support


Easy design-time to attach extenders designhttp://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

Data Improvements in ASP.NET


New <asp:LinqSqlDataSource> control <asp:LinqSqlDataSource>
Enables easy databinding to LINQ entities

Demo
LINQ

New <asp:ListView> control <asp:ListView>


Enables richer data UI flexibility

Scaffolding UI generator for getting started


Creates LINQ object model and UI pages Will ship as separate download in Orcas

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

Testing Features
VSTS Unit Testing Moving to VS Professional
Improved performance and workflow

Introduction to Windows Communication Foundation


Windows Communication Foundation (WCF):
Framework for creating distributed applications that communicate using services Service-oriented programming API Support latest WS-* standards Expose services over HTTP, TCP, Named Pipes, plus more Create data and service contracts Consume services and integrate data into .NET applications Expose workflows as services

New AJAX Web Testing Features in VSTS


Automated scenario testing of ASP.NET AJAX applications

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

2001 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

New WCF Features in .NET 3.5


Key New Windows Communication Foundation Features include:
Support for RSS and ATOM Syndication XML or JSON serialization for AJAX integration Support for additional partial trust mode scenarios Windows Workflow Foundation Send/Receive activities

Team Foundation Server 2008


Share Point 2007 support Enable use of Sharepoint on any server and any port Support for MOSS 2007 Enable support for Reporting Services on any server and any port (new) (RTM) Support for SQL Named Instances This will allow customers to share a SQL server between multiple TFS instances, or with other applications. This has been a commonly requested feature by enterprises. Longhorn server support TFS will support the next version of the server (and corresponding new version of IIS) that is currently under development. Sync Large Groups This is a set of work to improve the performance and robustness of TFSs handling large groups of users (~30,000 or more) granted permission to a TFS instance. Today this can result in a support call to recover from it. NonNon-default ports Weve gotten a bunch of feedback from enterprise customers about TFSs limited support for alternate web sites and ports running afoul of data center policies. We are going to be improving TFSs configurability in this respect in Orcas. http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

Team Foundation Server 2008


Simplify installation In Orcas, we will be doing a variety of things to attempt to make installing TFS easier and quicker than it is now. Improvements include eliminating the separate data-tier installation, simplifying the datarequirements around required domain accounts by supporting the built in machine accounts (like Network Service) where we can, etc. Official testing and support for more configurations - This includes clustering, mirroring, log shipping, Virtual machine deployment, and more. Support for client certificates Upgrade from TFS 2005 Support for SQL 2008 (aka Katmai) (new) (RTM) TFSDeleteProject now permanently deletes (destroys) version control content (new) (RTM) New role for many operations activities (new) (RTM) - You don't have to be server administrator to run many of the admin utilities any longer. Enhancements to tfsadminutil (new) (RTM) - New capability to configure accounts, connections, etc on both TFS and the TFS proxy.
http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

Team Foundation Server 2008


Support multi-threaded builds with the new MSBuild. multiMSBuild. Continuous Integration There are many components to this, including build queuing and queue management, drop management (so that users can set policies for when builds should be automatically deleted), and build triggers that allows configuration of exactly how when CI builds should be triggered, for example every checkin, rolling build (completion of one build starts the checkin, next), etc. Improved ability to specify what source, versions of source, and other build properties. Improved extensibility of the build targets such as ability to easily execute targets before and after each solution/project is built. Improved ability to manage multiple build machines. Stop and delete builds from within VS. .NET Object model for programming against the build server. Simplified ability to specify what tests get run as part of a build.

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

Team Foundation Server 2008


Performance & Scale improvements A variety of improvements that will make both the work item server and client faster and able to handle larger servers. Query builder usability improvements - Drop down filtering based on current project, better MRU lists, column drag & drop, shift-click mouse based multishiftmulticolumn sorting, etc. Attachments improvements - Save button, drag & drop for adding an attachment, multi-select for attaching files. multiTooltips on field names contain the field name used for querying Server side support for deleting work items & work item types - We didn't have time to do client UI support for it but we plan to release a Power Tool that will take advantage of the new server side feature. Support for security on the iteration hierarchy (new)

2008 is going to be an exciting year


Major advances and improvements coming

Developing applications will be easier


Build-on existing VS 2005 / ASP.NET skills/code Significant productivity gains with LINQ, AJAX, etc

Upgrading will be easy


Can use HTML designer, JavaScript intellisense/debugging, and new language features of VS Orcas on ASP.NET 2.0 projects
http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

2001 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Premios de este evento!!!

Oferta Visual Studio 2008


El Libro Introducing Microsoft LINQ por asistir al menos a una charla. Introducing
Restricciones: Restricciones: 1 libro de estos mximo por persona por todo el evento. Los libros sern entregados entre finales de Enero y Febrero.

Un libro de la siguiente lista por cada da completo de charlas asistidas:


Programming Microsoft Visual C# 2005: The Language Microsoft Visual C# 2005 Express Edition: Build a Program Now! Microsoft Visual Basic 2005 Step by Step Working with Microsoft Visual Studio 2005 Team System I. M. Wright's "Hard Code" Practical Project Initiation: A Handbook with Tools The Enterprise and Scrum Managing Projects with Microsoft Visual Studio Team System Programming Microsoft Composite UI Application Block and Smart Client Restricciones: Restricciones: Si una persona asiste a dos das completos, podr escoger 2 libros y as sucesivamente. Los libros sern entregados entre finales finales de Enero y Febrero.

Adquiere ya Visual Studio 2005 con suscripcin MSDN y recibe inmediatamente Visual Studio 2008. 2008. Adems participa durante el mes de Diciembre ganando puntos por tu compra de Visual Studio y cmbialos por productos, libros o entrenamiento de productos, .NET, Expression, Silverlight y mucho ms: Expression, ms:
Para ms informacin escribe a srojas@microsoft.co.cr

Un juego de la siguiente lista por asistir a todas las charlas del evento:
Zoo Tycoon2: Marine Mania (para PC) (para Halo 2 PC 32-Bit Vista (para PC) 32 Flight Simulator X (para PC) (para Fable The Lost Chapters (para PC) (para Combat Flight Sim 3 (para PC) (para Age of Empires III (para PC) (para Restricciones: Restricciones: Mximo 1 juego por persona por todo el evento. Los juegos sern entregados entre finales de Enero y Febrero.

Para estos premios se validar la asistencia contra hoja de evaluacin entregada sin excepciones. http:// ecastrom.blogspot.com http://ecastrom.spaces.live.com/ http:// ecastrom.blogspot.com

http://ecastrom.spaces.live.com/

2005 Microsoft Corporation. All rights reserved.


This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

http://ecastrom.spaces.live.com/

http:// ecastrom.blogspot.com

2001 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Vous aimerez peut-être aussi