Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

82
Välkommen till Sommarkollo 2007 2006

Transcript of Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Page 1: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Välkommen till Sommarkollo 2007

2006

Page 2: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

VISUAL STUDIO 2008

Page 3: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Agenda

Target vista & .NET 3.0 Handle Data Microsoft Office New Web Experience ALM

Page 4: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Wanna’ see a movie?

Friday the 6’th 15.00 Kista Centrum 100 seats for free

Page 5: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.
Page 6: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Visual Studio ”Orcas”

JScript IntelliSense

WPF and WCFvisual designers

“My” support for.NET Framework 3.0 VSTS support for

device development

VSTO for 2007 Office system

Language-integratedquery (LINQ)

Windows Vistadebugging & profiling

MFC forWindows Vista

Office Ribboncontrols

Load TestModeler

Full AJAX support

Diagnostics supportfor WCF applications

Test-driven profiling

Tools for DB ProsSupport fordistributed teams

VB, XAML,andXML Refactoring

Page 7: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Framework Multitargeting

Choose which Framework version to target when building an application .NET Framework 2.0 (Whidbey) .NET Framework 3.0 (Vista) .NET Framework 3.5 (Orcas)

VS IDE only shows feature appropriate for your selected target version Toolbox, Add New Item, Add Reference, Add

Web Reference, Intellisense, etc

Page 8: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Framework Multitargeting

Page 9: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Framework Multitargeting

Page 10: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Whidbey Vista Orcas

time

Version = Assembly references + compilersNo new CLR runtime

Framework Multitargeting

Page 11: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Framework 2.0 – no framework 3.0 required

Raw Vista Box – no Framework 3.5 Enhanced scenarios – LINQ, AJAX, full

framework 3.5 Easy upgrade for current VS2005

Developers Not available in Express SKUs

Multi-targeting Scenarios

Page 12: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Target vista & .NET 3.0

Page 13: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Target Vista – C++

Prepare for UAC – User Account Control Embed manifest through

property in project Leverage new controls

Task Dialog Command Link Split Button Network Address Sys Link

Use Aero style and appearance in your applications http://msdn.microsoft.com/msdnmag/issues/

07/06/Cpp/

Page 14: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Visual Designer for WPF creates a seamless designer/developer workflow with Expression Blend

XAML-based editing directly in the IDE Changes reflected in the designer in realtime

Control extensibility Project templates, debugger & deployment

support Side-by-side support for Winforms

ElementHost in Toolbox ClickOnce deployment support for WPF apps

Windows Presentation Foundation

Page 15: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Autohost for the hosting of WCF services WSDL test client allows message injection

(beta 2) Hosting Wizard eases migration of

services New WCF Project templates include both

the Autohost and Test Client into an out-of-the-box F5 experience

Simple item template for adding WCF services to an existing Project

Windows Communication &Windows Workflow Foundation

Page 16: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.
Page 17: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Windows Communication &Windows Workflow Foundation Activities to consume WCF services

Function similarly to the InvokeWebService activity available today

Hosting extensions to expose WF workflows as WCF services Messaging activities (send, receive) A workflow hosting environment to handle

instantiation and message routing

Page 18: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Mobile Development

Works side-by-side with Visual Studio 2005 In-box support for Windows Mobile 5.0

SDKs Unit Testing Integration with Visual Studio

Team System Security Aware IDE Device Emulator 3.0

Page 19: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Create unit tests for Create unit tests for device applications device applications using the VSTS Unit using the VSTS Unit Test infrastructureTest infrastructure

Page 20: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Ability to target Ability to target multiple multiple

versions of versions of the .NET the .NET Compact Compact

Framework Framework runtimeruntime

Page 21: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Device Security Device Security Manager makes it easy Manager makes it easy to deal with complex to deal with complex

device security device security settingssettings

Better Better understand understand

current device current device security security settingssettings

Easy to change the Easy to change the device into a specific device into a specific

security setting to test security setting to test application under application under different security different security

profilesprofiles

Page 22: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Device emulator Device emulator offers the ability to offers the ability to

emulate new emulate new hardware hardware

peripheralsperipherals

Device emulator Device emulator emulating Windows emulating Windows Embedded CE 6.0 Embedded CE 6.0 operating systemoperating system

Page 23: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Emulating a low battery scenario. This feature is Emulating a low battery scenario. This feature is very helpful for device developers to see how very helpful for device developers to see how their application will behave in a low battery their application will behave in a low battery

scenario on a real devicescenario on a real device

Page 24: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Core Language Enhancements

Page 25: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Extension Methods

namespace MyStuff{ public static class Extensions { public static string Concatenate(this IEnumerable<string> strings, string separator) {…} }}

using MyStuff;

string[] names = new string[] { "Axel", "Mia", "Niels" };string s = names.Concatenate(", ");

Extensionmethod

Brings extensions into scope

obj.Foo(x, y)

XXX.Foo(obj, x, y)

IntelliSense!

Page 26: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Object Initializerspublic class Point{ private int x, y;

public int X { get { return x; } set { x = value; } } public int Y { get { return y; } set { y = value; } }}

Point a = new Point { X = 0, Y = 1 };

Point a = new Point();a.X = 0;a.Y = 1;

Field or property assignments

Page 27: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Collection Initializers

List<int> numbers = new List<int> { 1, 10, 100 };

Must implement IEnumerable

List<int> numbers = new List<int>();numbers.Add(1);numbers.Add(10);numbers.Add(100);

Must have public Add method

Dictionary<int, string> spellings = new Dictionary<int, string> { { 0, "Zero" }, { 1, "One" }, { 2, "Two" }, { 3, "Three" } };

Add can take more than one

parameter

Page 28: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

IEnumerable<Contact> phoneListQuery = from c in customers where c.State == "WA" select new Contact { Name = c.Name, Phone = c.Phone };

Anonymous Types

public class Contact{ public string Name; public string Phone;}

+

Page 29: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

var phoneListQuery = from c in customers where c.State == "WA" select new { Name = c.Name, Phone = c.Phone };

Anonymous Types class XXX{ public string Name; public string Phone;}

IEnumerable<XXX>

foreach (var entry in phoneListQuery) { Console.WriteLine(entry.Name); Console.WriteLine(entry.Phone);}

XXX

Page 30: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Expression TreesCode as Data

Predicate<Customer> test = c => c.State == "WA";

Predicate<Customer> test = new Predicate<Customer>(XXX);

private static bool XXX(Customer c) { return c.State == "WA";}

public delegate bool Predicate<T>(T item);

Page 31: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Expression TreesCode as Data

Expression<Predicate<Customer>> test = c => c.State == "WA";

public delegate bool Predicate<T>(T item);

ParameterExpression c = Expression.Parameter(typeof(Customer), "c");Expression expr = Expression.Equal( Expression.Property(c, typeof(Customer).GetProperty("State")), Expression.Constant("WA") );Expression<Predicate<Customer>> test = Expression.Lambda<Predicate<Customer>>(expr, c);

Page 32: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Automatic properties

public class Product{ public string Name; public decimal Price;}

Page 33: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Automatic properties

public class Product{ string name; decimal price;

public string Name { get { return name; } set { name = value; } }

public decimal Price { get { return price; } set { price = value; } }}

Page 34: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Automatic properties

public class Product{ public string Name { get; set; } public decimal Price { get; set; }}

private string □;

public string Name { get { return □; } set { □ = value; }}

Must have both get and set

Page 35: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

C# 3.0 Language Innovations

var contacts = from c in customers where c.State == "WA" select new { c.Name, c.Phone };

var contacts = customers .Where(c => c.State == "WA") .Select(c => new { c.Name, c.Phone });

Extension methods

Lambda expressions

Query expressions

Object initializers

Anonymous types

Local variable type inference

Page 36: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Handle Data

Page 37: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Problem:Data != Objects

Page 38: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

The LINQ Project

Objects

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

XML

.NET Language Integrated Query

C# 3.0 VB 9.0 Others…

Relational

LINQ toObjects

LINQ toSQL

LINQ toXML

LINQ toEntities

LINQ toDataSets

Page 39: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

LINQ Operators

Restriction Where

Projection Select, SelectMany

Ordering OrderBy, ThenBy

Grouping GroupBy

Joins Join, GroupJoin

Quantifiers Any, All

Partitioning Take, Skip, TakeWhile, SkipWhile

Sets Distinct, Union, Intersect, Except

Elements First, Last, Single, ElementAt

Aggregation Count, Sum, Min, Max, Average

Conversion ToArray, ToList, ToDictionary

Casting OfType<T>, Cast<T>

Page 40: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

SqlConnection c = new SqlConnection(…); c.Open(); SqlCommand cmd = new SqlCommand( @"SELECT c.Name, c.Phone

FROM Customers c WHERE c.City = @p0"

); cmd.Parameters.AddWithValue("@po", "London"); DataReader dr = c.Execute(cmd); while (dr.Read()) { string name = dr.GetString(0); string phone = dr.GetString(1); DateTime date = dr.GetDateTime(2); } dr.Close();

Data Access In APIs Today

Queries in quotes

Arguments loosely bound

Results loosely typed

Compiler cannot help

catch mistakes

Page 41: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Data Access with LINQ

public class Customer { public int Id; public string Name; public string City; public string Phone; }

----------------------------

GridView1.DataSource = from customer in db.Customers where customer.City == "London" select customer;

GridView1.DataBind();

Classes describe data

Query is natural part

of the language

The compiler provides

IntelliSense and type-checking

Page 42: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

LINQ Architecture

ObjectsObjects

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

XMLXMLRelationalRelational

LINQ enabled data sourcesLINQ enabled data sources

LINQ LINQ To ObjectsTo Objects

LINQ LINQ To XMLTo XML

LINQ enabled ADO.NETLINQ enabled ADO.NET

VBVB Others…Others…

LINQ LINQ To EntitiesTo Entities

LINQ LINQ To SQLTo SQL

LINQ LINQ To DatasetsTo Datasets

.Net Language Integrated Query (LINQ).Net Language Integrated Query (LINQ)

C#C#

Page 43: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

LINQ Basics

Query Operators can be used against any .NET collection (IEnumerable<T>) Built-in examples: Select, Where, GroupBy, Join,

etc. Extensibility model supports adding/replacing

them

Query Expressions can operate on information sources and apply query operators against them to return IEnumerable<T> sequences

Page 44: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Searching/Sorting an Array

string [] cities = { “Auckland”, “Oslo”, “Sydney”, “Seattle”, “Paris”, “Los Angeles” };

IEnumerable<string> places = from city in cities where city.Length > 5

orderby city descending select city;

GridView1.DataSource = places;GridView1.DataBind();

Array implements

IEnumerable<T>

LINQ Query Expression using Query Operators

IEnumerable<string>sequence result can

be used w/ databinding

Page 45: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Projections

Sometimes you want to modify or transform the data you return from a query

LINQ enables powerful “data shaping” scenarios using projections

Can optionally be used in conjunction with new “anonymous type” compiler support

Page 46: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Projections w/ Anonymous Types

List<City> cities = CityUtilityHelper.GetCities();

var places = from city in cities where city.DistanceFromSeattle > 1000 select new { City = city.Name, Country = city.Country, DistanceInKm = city.DistanceFromSeattle * 1.61 };

GridView1.DataSource = places; GridView1.DataBind();

Anonymous type used to custom shape data

results and apply miles->kilometer conversion

Page 47: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Projections w/ Anonymous Types

<asp:GridView ID="GridView1" AutoGenerateColumns="false" runat="server"> <Columns> <asp:BoundField HeaderText="Country" DataField="Country" /> <asp:BoundField HeaderText="City" DataField=“City" /> <asp:BoundField HeaderText="Dist (KM)" DataField="DistanceInKm" /> </Columns></asp:GridView>

Page 48: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

LINQ for SQL

Maps .NET classes to relational SQL data Translates LINQ queries to SQL execution Supports change tracking for insert,

update, delete operations Built on top of ADO.NET and integrates

with connection-pooling and transactions

Page 49: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

LINQ for SQL Basics

public partial class Product { public int ProductID; public string ProductName; public Nullable<int> SupplierID; public Nullable<int> CategoryID;}

public class NorthwindDataContext : DataContext { public Table<Product> Products;}

NorthwindDataContext db = new NorthwindDataContext();

DataList1.DataSource = from product in db.Products where product.UnitsInStock > 0 select product;

DataList1.DataBind();

Page 50: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

PK/FX Relationships in DatabaseProducts Table Suppliers Table

Categories Table

Foreign Key Relationshipsto the Suppliers and Categories Tables

Page 51: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Associations in the O-R Designer

Page 52: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Code Associations in Model public partial class Product { public int ProductID; public string ProductName; public Nullable<int> SupplierID; public Nullable<int> CategoryID;

public Supplier Supplier; public Category Category; }

public partial class Supplier { public int SupplierID; public string CompanyName; public EntitySet<Product> Products; }

public partial class Category { public int CategoryID; public EntitySet<Product> Products; }

Page 53: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Programming XML today…

XmlDocument doc = new XmlDocument();XmlElement contacts = doc.CreateElement("contacts");foreach (Customer c in customers) if (c.Country == "USA") { XmlElement e = doc.CreateElement("contact"); XmlElement name = doc.CreateElement("name"); name.InnerText = c.CompanyName; e.AppendChild(name); XmlElement phone = doc.CreateElement("phone"); phone.InnerText = c.Phone; e.AppendChild(phone); contacts.AppendChild(e); }doc.AppendChild(contacts); <contacts>

<contact> <name>Great Lakes Food</name> <phone>(503) 555-7123</phone> </contact> …</contacts>

Imperative model

Document centric

No integrated queries

Memory intensive

Page 54: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

LINQ to XML

XElement contacts = new XElement("contacts", from c in customers where c.Country == "USA" select new XElement("contact", new XElement("name", c.CompanyName), new XElement("phone", c.Phone) ));

Declarative model

Element-centric

Integrated queries

Smaller and faster

Page 55: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

ADO.NET vNext

Data as Objects The Entity Data Model (EDM), which allows developers

to model data at a higher level of abstraction Client-views/mapping engine to map to and from

store schemas Full query support over EDM schemas using Entity

SQL and LINQ Open provider model that allows other stores to plug

into the ADO.NET Entity Framework Data Integration to core languages

Language-Integrated Query (LINQ) LINQ to Entities: formulate queries using LINQ against

your EDM schemas LINQ to DataSet: the DataSet with full query

capabilities LINQ queries can go against one or more DataTable

objects

Page 56: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

ADO.NET Entity Framework (1/2) "Client Views" map existing relational schema to a

rich conceptual entity model Conceptual entity model exposes concepts that make

sense to your application Different apps may have different views of the same

data Application and storage schemas may evolve

independently Exposed as an "Entity Client" ADO.NET Data

Provider Common, familiar ADO.NET Programming pattern

Compatible with existing applications/tools Canonical Entity SQL “eSQL” used to query Conceptual

Model Supports 3rd party ADO.NET Data Providers

Page 57: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

ADO.NET Entity Framework (2/2) Entities presented as CLR Objects

Work with higher level "ObjectContext" Tracks object identity, changes

Query through Entity SQL or LINQ queries Entity Data Model Designer

Integrated into the Orcas IDE Create entities from scratch or generate

EDM models from an existing database Easily consume existing EDM models

Page 58: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Sync Services for ADO.NET

Simplifying the Client “Golden Nugget” Application works against a local data cache and

periodically synchronizes with the server Experience unchanged on lost connectivity

“Want local caching, but can’t spend time getting the basics right” All the heavy lifting handled by the Framework

“Want to leverage/extend your my ADO.NET knowledge”

“Want to build real world N tier Application” Sync via services with pluggable proxy/service Server Data Components can use any ADO.net Provider

Application supports Occasionally Connected Scenarios

Page 59: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Sync Component Architecture

Data FormsData Forms

SyncAgentSyncAgent

Data AccessData Access

Work against local database

Sync keeps the local and remote stores in sync

Can push changes directly or via services

SyncTableSyncTableSyncAdaptercommandsSyncAdaptercommands

SyncAdapterSyncAdapter

ServerSyncProviderServerSyncProvider

DBCommandDBCommand

SQL Server SQL Server CompactCompact

Edition 3.5Edition 3.5

TransportTransport

ServiceServiceServiceServiceProxyProxy

ClientClientSyncProviderSyncProvider

SyncGroupSyncGroup Server DBServer DB

Page 60: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Guidance for LINQ to Relational Data LINQ to SQL

Emphasis on rapid application development Direct mapping to Microsoft SQL Server family of

databases Available in Orcas

LINQ to Entities Focus on enterprise-grade data scenarios Flexible mapping to relational data Access to Microsoft SQL Server family and

other databases through ADO.NET provider model

Available in first half of 2008 CTP’s and Betas on top of Orcas releases through 2007

Page 61: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Microsoft Office

Page 62: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Visual Studio Tools for Office - “Orcas” Strategic platform infrastructure based on .NET

3.0 & Managed Add-In Foundation (MAF) Highly-streamlined developer experience

New designers: ribbon, custom task pane, Outlook form region

ClickOnce deployment and security Document-level solutions

Word, Excel, InfoPath: 2003 onwards Managed controls on the document surface Doc-level Actions Pane ServerDocument – manipulate documents without

automating Office Word content control support

Page 63: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Visual Studio Tools for Office - “Orcas” Application-level add-Ins

Application domain isolation Remote updateability All 2007 Office system apps App-level custom task pane Ribbon customization Support for legacy “Shared Add-ins”

Page 64: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Workflow without VS2008 Create workflow in Visual Studio

2005 Author the feature definition file

Add GUID Add title Add description Add manifest location

Author workflow template definition file Add GUID Add name Add description

Compile the workflow files into a .NET assembly

Sign the assembly Add key file

Design the actual workflow, add code etc. (This is the “real” developer task)

Install assembly into the Global Assembly Cache

Extract public key token Add key token to workflow

template definition file Deploy feature definition file to

SharePoint file system Deploy workflow definition file to

SharePoint file system Reset Internet Information

Services Press F5 Attach to WPW3.exe process Associate workflow with

document library

Page 65: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Workflow with VS2008

Create workflow in Visual Studio Tools for Office “Orcas”

Design the actual workflow, add code etc. (This is the “real” developer task)

Press F5

Page 66: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

New Web Experience

Page 67: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

“Orcas” Web Tools Objectives Address top customer issues in VS 2005 Reduce cost and increase effectiveness

of Web UI design Enabling developers & designers to

program "AJAX-style" interactive web user interfaces

Programming model and design experience around language/data access (LINQ)

Best tool for the Vista platform (WCF, IIS7)

Page 68: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Design Surface

WYSIWYG layout CSS editing experience

CSS Properties Window Direct Style Application Style Management Tool Windows WYSIWYG Positioning Support

Split View Nested Master Pages Support

Page 69: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Design Surface

Page 70: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Enabling AJAX for DevelopersGoals Enable highly interactive AJAX Web apps Retain the ease of the ASP.NET model Powerful tools for AJAX client

development Key Features Jscript IntelliSense and Editor Support Jscript Debugging Support

Page 71: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

JScript Editor Support

Intellisense experience for JScript Better Jscript language IntelliSense

Type inferencing, Script library includes

IntelliSense against ASP.NET AJAX class model IntelliSense against Web service proxies

ASMX and WCF Services ASP.NET Services (e.g. Membership, Roles, Profile)

Rich editor support Syntax validation (squiggles) Formatting and colorization

Page 72: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

JScript Debugging

IE Developer Improvements Switch to enable script debugging HTTP trace in developer toolbar

Visual Studio improvements Move Script Explorer to

Solution Explorer Breakpoints in ASPX map to

rendered HTML Filter properties, methods, events

in watch window

Page 73: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

XML IDE support and Tools

XSLT Debugger Enables Input Data Breakpoints allowing

the user to break the execution of the style-sheet whenever a certain node in input document is hit.

IDE Improves the experience a user has when

working with an XML Schema in textual and graphical mode at the same time

Page 74: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

ALM

Page 75: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Visual Studio Team System

New scenarios Improved Development Productivity

Code metrics, ‘hotpathing’, base-lining Load Testing Enhancements

Improved load modeling, reporting, graphing Continuous Integration

Build Queuing, Queue Management, Drop Management

Version Control Enhancements Lower adoption blockers

TFS Deployment & Administration Migration Toolkit

Page 76: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Metric: Class Coupling# of Dependencies Between Types

GUI

Business Logic

Transaction

Customer Account

Page 77: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Metric: Class Inheritance# of Base Types

Component

Control

Label

ListBox

ListControl

LinkLabelComboBox

Page 78: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Metric: Lines of Code# of Executing Lines of Code

123

4

5

static class Program{

#region Application Entry Point/// <summary>/// The main entry point for the application./// </summary>[STAThread]static void Main(string[] args){

Application.EnableVisualStyles();Application.SetCompatibleTextRenderingDefault(false);Workflow(args);

}#endregion

#region Static Methods/// <summary> Primary workflow for the application. </summary>/// <param name="args"> Command line arguments. </param>private static void Workflow(string[] cmdargs){

// Collect the list of command line argumentsList<string> args = new List<string>(cmdargs);

// Show usage syntax if the user so asksif (UseArg(args, "/?")) { ShowAbout(); return; }

Page 79: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Metric: Cyclomatic Complexity# of Branches

12

3

45

6,7

89

10

11

bool ParseCommandLine(string[] args){

if (args.Length == 0) ShowHelp(); return;for (int i = 0; i < args.Length; i++)

switch (args[i]){

case "/?" :ShowHelp();return false;

case "/input" :if (args.Length > i && File.Exists(args[i + 1]))

InputFile = args[i++];break;

case "/c" :Colapse = true;break;

}return true;

}

Page 80: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Metric: Maintainability Index

Overall indication of complexity byaggregation of several factors [Carnegie 1]

Lines of Code Cyclomatic Complexity Computational Complexity [Halstead 1]

Used on the Windows Code Base

[Halstead 1] Halstead, Maurice H. Elements of Software Science, Operating, and Programming Systems Series Volume 7. New York, NY: Elsevier, 1977.

Maintainability Index = 171 - 5.2 * log2(Halstead Volume) - 0.23 * (Cyclomatic Complexity) - 16.2 * log2(Lines of Code)

[Carnegie 1] Carnegie Mellon University, Software Engineering Institute, Maintainability Index Technique for Measuring Program Maintainability, http://www.sei.cmu.edu/str/descriptions/mitmpm.html

Page 81: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.

Resources

Web http://ajax.asp.net http://msdn.microsoft.com/vcsharp/

default.aspx Blogs

http://blogs.msdn.com/msbuild http://blogs.msdn.com/vbteam http://blogs.msdn.com/adonet http://blogs.msdn.com/johanl http://blogs.msdn.com/pahlberg

Page 82: Välkommen till Sommarkollo 2007 2006. VISUAL STUDIO 2008.