Visual Studio 2008
Agenda Multitargetting   Occasionally connected Systems Office Applications Client Applications Windows Communication Foundation ASP.NET Web Applications C# 3.0 and LINQ
Release History
Multitargetting No longer a hard link between Visual Studio and the application’s target framework  VS 2008
Sync Framework & Services Connected Single data source Database driven Hard coded Monolithic & rigid Occasionally connected Multiple data sources Information based Model driven SOA
ADO.NET Sync Services Client App Sync Services No active connection to the database required Data is persisted using  SQL Server Everywhere Edition Local Change Tracking for  Sending Updates When Connected VS2008 Developer Productivity  “ Pay to Play”, RAD Component Architecture  Leveraging Developers ADO.NET Knowledge Auto Creation of Database and Table Schema SQL Server  Everywhere Edition SQL Server
{  ADO.NET Sync Services   }
Office Applications (VSTO)
Ribbon Customization New Look and Feel for Office UI Replaces Command Bars in “the big 5” Office apps VSTO Ribbon Designer Tab Group Control Ribbon
Custom Task & Actions Panes VSTO simplifies and speeds up task pane UI design process with visual designers and .NET hookup Actions Pane More robust, easier to program alternative to Office’s built-in “Smart Document” technology Custom Task Pane The same general idea as Actions Pane, only on the application add-in level, not individual doc
Outlook Form Region Features New technology in Outlook 2007 for enhancing and replacing Outlook’s built-in forms Code behind form region is implemented  as COM add-in New controls provide built-in look & feel and data binding to Outlook data
{  Office Applications   }
Client Applications
{  WPF Support in VS2008   }
WF and WCF
ASP.NET Web Applications
{  WCF Support in VS2008, ASP.NET Applications   }
Language Features in VS 2008 Most are LINQ enablers VB9 C# 3 Collection Initialisers Partial Methods Automatic Properties Extension Methods Object Initialisers Anonymous Types Local Type Inference Lambda expressions If Ternary Operator Nullable Syntax Lambda statements
C# 3.0: Local Variable Type Inference Local variable type inference is a feature in C# 3.0 where you can use the  var  keyword instead of explicitly specifying the type of a variable. The C# 3.0 compiler makes the type of the variable match the type of the right side of the assignment.  public   void  Foo() { var  i = 5; var  s =  "Hello" ; var  d = 1.0; var  z; // compiler error, no initializer z =  DateTime .Today; }
C# 3.0: Object Initializers public   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
C# 3.0: Anonymous Types  Different anonymous object initializers that define properties with same names in  the same order  generate the same anonymous type var  emp =  new  { Name =  "Fons" , Salary = 2000, DateTime .Today.Year }; var  year = emp.Year; class   XXX  { public   string  Name {  get ;  set ; } public   int  Salary {  get ;  set ; } public   int  Year {  get ;  set ; } }
C# 3.0: Extension Methods Extend existing types with additional methods. namespace  MyStuff { public   static   class   Util  { public   static   bool  IsWeekend( this   DateTime  value) { return  (value.DayOfWeek ==  DayOfWeek .Sunday || value.DayOfWeek ==  DayOfWeek .Saturday); } } } using  MyStuff; Brings extensions into scope dt.IsWeekend()  MyStuff.Util.IsWeekend(dt) DateTime  dt =  DateTime .Today; bool  b = dt.IsWeekend();
C# 3.0:  Lambda Expressions delegate   string   SomeDelegate ( string  s); private   static   string  TestMethod1( string  s) { return  s.ToUpper(); } ... SomeDelegate  d1 =  new   SomeDelegate (TestMethod1); string  a = d1( "abcde" ); SomeDelegate  d3 =  delegate ( string  s) { return  s.ToUpper(); }; string  a = d3( "abcde" ); SomeDelegate  d4 = s => s.ToUpper(); string  a = d4( "abcde" ); SomeDelegate  d2 = TestMethod1; string  a = d2( "abcde" ); Delegate Inference Anonymous Method Lambda Expression OO Function- Pointer C# 1.x C# 2.0 C# 2.0 C# 3.0
{  C# 3.0   }
Language INtegrated Query? Lots of code written today in order to  loop, filter, sort, group, etc. Why not build better support for this? sort loop sum
Why Have LINQ? Access to common data like XML or SQL is harder than accessing in memory objects; Why not have better API’s than this? hope! pray! hope!
Language Integrated Query from  data   in  someDataSource join   otherData  in  someOtherSource   on  keyExpr   equals  keyExpr  (into  itemName )? let   someVariable   =  someExpression where somePredicate orderby  ( expression   (ascending | descending)?)* select  expression group   expression  by  keyExpression   into  itemName   .NET Framework V3.5 Language Features ( C# V3 and VB V9 ) Custom Objects XML SQL
How Does LINQ Work? Implementations already present in the .NET Framework for those cases Compiler rewrites as method calls No need to implement  Select()  etc. if  myData  is either IEnumerable IQueryable
IEnumerable & IQueryable? IEnumerable – query is executed in memory Execute Execute where select where select Parse & Execute IQueryable – query is  parsed  then translated to SQL and finally executed on to the database
LINQ to SQL from  c  in  db.Customers where  c.City ==  &quot;London&quot; select  c.CompanyName; IQueryable<T> SELECT CompanyName FROM Customer WHERE City = 'London' SQL Query or SProc Resultset Objects db.Customers.InsertOnSubmit(c1); c2.City =  &quot;Asten&quot; ; db.Customers.DeleteOnSubmit(c3); SubmitChanges() INSERT INTO Customer … UPDATE Customer … DELETE FROM Customer … DML or SProcs Application LINQ to SQL SQL Server
{  LINQ to Objects,   LINQ to SQL   }
Summary Visual Studio 2008 Great for Windows Vista Development Great for Client Development Great for Web Development Great for Database Applications Development Great for .NET Framework v3.5 Service Pack 1 will add even more features ADO.NET Entity Framework ADO.NET Data Services ASP.NET Dynamic Data
Resources http://msdn.microsoft.com/en-us/vstudio   http://msdn.microsoft.com/en-us/sync   http://msdn.microsoft.com/en-us/office http://windowsclient.net   http://netfx3.com/content/WCFHome.aspx http://www.asp.net http://msdn.microsoft.com/en-us/vcsharp http://www.datadeveloper.net   Visual Studio 2008 Upgrade Training http://www.reflectionit.nl/Training/default.aspx#orcas

Visual studio 2008

  • 1.
  • 2.
    Agenda Multitargetting Occasionally connected Systems Office Applications Client Applications Windows Communication Foundation ASP.NET Web Applications C# 3.0 and LINQ
  • 3.
  • 4.
    Multitargetting No longera hard link between Visual Studio and the application’s target framework VS 2008
  • 5.
    Sync Framework &Services Connected Single data source Database driven Hard coded Monolithic & rigid Occasionally connected Multiple data sources Information based Model driven SOA
  • 6.
    ADO.NET Sync ServicesClient App Sync Services No active connection to the database required Data is persisted using SQL Server Everywhere Edition Local Change Tracking for Sending Updates When Connected VS2008 Developer Productivity “ Pay to Play”, RAD Component Architecture Leveraging Developers ADO.NET Knowledge Auto Creation of Database and Table Schema SQL Server Everywhere Edition SQL Server
  • 7.
    { ADO.NETSync Services }
  • 8.
  • 9.
    Ribbon Customization NewLook and Feel for Office UI Replaces Command Bars in “the big 5” Office apps VSTO Ribbon Designer Tab Group Control Ribbon
  • 10.
    Custom Task &Actions Panes VSTO simplifies and speeds up task pane UI design process with visual designers and .NET hookup Actions Pane More robust, easier to program alternative to Office’s built-in “Smart Document” technology Custom Task Pane The same general idea as Actions Pane, only on the application add-in level, not individual doc
  • 11.
    Outlook Form RegionFeatures New technology in Outlook 2007 for enhancing and replacing Outlook’s built-in forms Code behind form region is implemented as COM add-in New controls provide built-in look & feel and data binding to Outlook data
  • 12.
    { OfficeApplications }
  • 13.
  • 14.
    { WPFSupport in VS2008 }
  • 15.
  • 16.
  • 17.
    { WCFSupport in VS2008, ASP.NET Applications }
  • 18.
    Language Features inVS 2008 Most are LINQ enablers VB9 C# 3 Collection Initialisers Partial Methods Automatic Properties Extension Methods Object Initialisers Anonymous Types Local Type Inference Lambda expressions If Ternary Operator Nullable Syntax Lambda statements
  • 19.
    C# 3.0: LocalVariable Type Inference Local variable type inference is a feature in C# 3.0 where you can use the var keyword instead of explicitly specifying the type of a variable. The C# 3.0 compiler makes the type of the variable match the type of the right side of the assignment. public void Foo() { var i = 5; var s = &quot;Hello&quot; ; var d = 1.0; var z; // compiler error, no initializer z = DateTime .Today; }
  • 20.
    C# 3.0: ObjectInitializers public 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
  • 21.
    C# 3.0: AnonymousTypes Different anonymous object initializers that define properties with same names in the same order generate the same anonymous type var emp = new { Name = &quot;Fons&quot; , Salary = 2000, DateTime .Today.Year }; var year = emp.Year; class XXX { public string Name { get ; set ; } public int Salary { get ; set ; } public int Year { get ; set ; } }
  • 22.
    C# 3.0: ExtensionMethods Extend existing types with additional methods. namespace MyStuff { public static class Util { public static bool IsWeekend( this DateTime value) { return (value.DayOfWeek == DayOfWeek .Sunday || value.DayOfWeek == DayOfWeek .Saturday); } } } using MyStuff; Brings extensions into scope dt.IsWeekend()  MyStuff.Util.IsWeekend(dt) DateTime dt = DateTime .Today; bool b = dt.IsWeekend();
  • 23.
    C# 3.0: Lambda Expressions delegate string SomeDelegate ( string s); private static string TestMethod1( string s) { return s.ToUpper(); } ... SomeDelegate d1 = new SomeDelegate (TestMethod1); string a = d1( &quot;abcde&quot; ); SomeDelegate d3 = delegate ( string s) { return s.ToUpper(); }; string a = d3( &quot;abcde&quot; ); SomeDelegate d4 = s => s.ToUpper(); string a = d4( &quot;abcde&quot; ); SomeDelegate d2 = TestMethod1; string a = d2( &quot;abcde&quot; ); Delegate Inference Anonymous Method Lambda Expression OO Function- Pointer C# 1.x C# 2.0 C# 2.0 C# 3.0
  • 24.
    { C#3.0 }
  • 25.
    Language INtegrated Query?Lots of code written today in order to loop, filter, sort, group, etc. Why not build better support for this? sort loop sum
  • 26.
    Why Have LINQ?Access to common data like XML or SQL is harder than accessing in memory objects; Why not have better API’s than this? hope! pray! hope!
  • 27.
    Language Integrated Queryfrom data in someDataSource join otherData in someOtherSource on keyExpr equals keyExpr (into itemName )? let someVariable = someExpression where somePredicate orderby ( expression (ascending | descending)?)* select expression group expression by keyExpression   into itemName .NET Framework V3.5 Language Features ( C# V3 and VB V9 ) Custom Objects XML SQL
  • 28.
    How Does LINQWork? Implementations already present in the .NET Framework for those cases Compiler rewrites as method calls No need to implement Select() etc. if myData is either IEnumerable IQueryable
  • 29.
    IEnumerable & IQueryable?IEnumerable – query is executed in memory Execute Execute where select where select Parse & Execute IQueryable – query is parsed then translated to SQL and finally executed on to the database
  • 30.
    LINQ to SQLfrom c in db.Customers where c.City == &quot;London&quot; select c.CompanyName; IQueryable<T> SELECT CompanyName FROM Customer WHERE City = 'London' SQL Query or SProc Resultset Objects db.Customers.InsertOnSubmit(c1); c2.City = &quot;Asten&quot; ; db.Customers.DeleteOnSubmit(c3); SubmitChanges() INSERT INTO Customer … UPDATE Customer … DELETE FROM Customer … DML or SProcs Application LINQ to SQL SQL Server
  • 31.
    { LINQto Objects, LINQ to SQL }
  • 32.
    Summary Visual Studio2008 Great for Windows Vista Development Great for Client Development Great for Web Development Great for Database Applications Development Great for .NET Framework v3.5 Service Pack 1 will add even more features ADO.NET Entity Framework ADO.NET Data Services ASP.NET Dynamic Data
  • 33.
    Resources http://msdn.microsoft.com/en-us/vstudio http://msdn.microsoft.com/en-us/sync http://msdn.microsoft.com/en-us/office http://windowsclient.net http://netfx3.com/content/WCFHome.aspx http://www.asp.net http://msdn.microsoft.com/en-us/vcsharp http://www.datadeveloper.net Visual Studio 2008 Upgrade Training http://www.reflectionit.nl/Training/default.aspx#orcas

Editor's Notes

  • #2 03/16/10 19:18 © 2007 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.
  • #6 Slide 9 - The Next Data Explosion part 2 As we enter this new environment of distributed d evices, desktops, servers, clusters, and services in the cloud, we need to think differently about data and applications. Data will now be on t he move, processed close to the application, f ederated from m ultiple data sources, connected and disconnected. The default application model will evolve from client-server to multi-tier. Applications living on the edge of networks will be adaptive to connected and disconnected states, and will seamlessly synchronize with one or more data hubs. Applications today and moving forward are dealing in terms of “entities” – the “stuff” flowing between composite apps is not rows or objects but collections of rows that make a logical unit of work for an application, a message perhaps. Databases today don’t always provide the right level of abstractions for this entity based world To support all of this we really need to look at Data Management in a different way. From Jim Grey: We’re in a transition from session oriented databases to service oriented databases. Session Oriented Database: Input &amp; Events processed by application, Passive Data, Little binding between data and “logic” Service Oriented Database: Service Logic bound to Services, Query Notifications, and Events. Service Logic Triggered by data changes, by message arrival, by timer firing, etc. Data becomes “active”
  • #8 03/16/10 19:18 © 2007 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.
  • #13 03/16/10 19:18 © 2007 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.
  • #15 03/16/10 19:18 © 2007 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.
  • #18 03/16/10 19:18 © 2007 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.
  • #25 03/16/10 19:18 © 2007 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.
  • #32 03/16/10 19:18 © 2007 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.