Presentation is loading. Please wait.

Presentation is loading. Please wait.

Visual Studio 2008 and the.NET Framework v3.5 Gill Cleeren Microsoft Regional Director.

Similar presentations


Presentation on theme: "Visual Studio 2008 and the.NET Framework v3.5 Gill Cleeren Microsoft Regional Director."— Presentation transcript:

1 Visual Studio 2008 and the.NET Framework v3.5 Gill Cleeren Microsoft Regional Director

2 Who do you see in front of you? Name: Gill Cleeren Age: 29 Company: Ordina Belgium Function: @Ordina: Software Architect Lead Developer @Microsoft: Regional Director MVP ASP.NET Blog: www.snowball.be and www.codeflakes.netwww.snowball.bewww.codeflakes.net Email: gill@snowball.be

3 Agenda The evolution of.NET A Tour around Visual Studio 2008 and.NET 3.5 IDE enhancements Language Enhancements Web Development Services (Workflow and Communication Foundation) Client and Mobile Development Office Development.NET Framework 3.5 new assemblies Questions & Answers

4 Agenda The evolution of.NET A Tour around Visual Studio 2005 and.NET 3.5 IDE enhancements Language Enhancements Web Development Services (Workflow and Communication Foundation) Client and Mobile Development Office Development.NET Framework 3.5 new assemblies Questions & Answers

5 .NET Through the Ages 20022003200520062007 Tool (Visual Studio) VS.NET 2002 VS.NET 2003 VS2005 + Extension s VS2008 Languages C# v1.0 VB.NET (v7.0) C# v1.1 VB.NET (v7.1) C# v2.0 VB2005 (v8.0)as before C# v3.0 VB9 Framework Libraries NetFx v1.0NetFx v1.1NetFx v2.0NetFx v3.0 NetFx v3.5 Engine (CLR) CLR v1.0CLR v1.1CLR v2.0 same version Team system

6 Visual Studio Team System

7 Visual Studio in the year 2008 + Service Pack 1+ SP1 Update for Vista + WF Extensions + WPF & WCF Extensions + SharePoint Workflow + Visual Studio Tools for Office Second Edition + ASP.NET AJAX Extensions + Device Emulator v2.0 +.NETCF v2.0 SP2 + WM 5.0 Pocket PC SDK+ WM5.0 Smartphone SDK + Service Pack 1+ SP1 Update for Vista + WF Extensions + WPF & WCF Extensions + SharePoint Workflow + Visual Studio Tools for Office Second Edition + ASP.NET AJAX Extensions + Device Emulator v2.0 +.NETCF v2.0 SP2 + WM 5.0 Pocket PC SDK+ WM5.0 Smartphone SDK Visual Studio 2008

8 2006 20072008.NET Framework - VS Roadmap “Rosario” VS Extensions for WF VS Extensions for WF VS Extensions for WCF/WPF CTP VS Extensions for WCF/WPF CTP ASP.NET AJAX 1.0 SQL Server 2008 ADO.NET Entity Framework VS 2008 Beta 2VS 2008 Beta 2.NET Framework 3.5 Beta 2.NET Framework 3.5 Beta 2 3.0 RTM 3.5 RTM

9 What is the.NET Framework 3.5?.NET Framework 2.0 + SP1 Windows Presentation Foundation Windows Communication Foundation Windows Workflow Foundation Windows CardSpace.NET Framework 3.0 + SP1.NET Framework 3.5 LINQLINQ ASP.NET 3.5 CLR Add-in Framework Framework Additional Enhancements

10 Agenda The evolution of.NET A Tour around Visual Studio 2008 and.NET 3.5 IDE enhancements Language Enhancements Web Development Services (Workflow and Communication Foundation) Client and Mobile Development Office Development.NET Framework 3.5 new assemblies Questions & Answers

11 A tour around VS 2008 &.NET 3.5 Lifecycle Tools,.NET Framework, & languages Services Windows Apps Web Apps Office Apps Mobile Apps

12 Visual Studio 2008 Lifecycle Tools,.NET Framework, & languages Services Windows Apps Web Apps Office Apps Mobile Apps

13 Visual Studio 2008 Highlights Side-by-Side support Works side-by-side with Visual Studio 2005 Multi-target Support.NET framework version 2.0, 3.0 and 3.5 No project model or build changes Solution can contain projects with different targets Enables organizations to move to Visual Studio 2008 without upgrading all of your source code

14 Multi-targeting in Visual Studio 2008

15 Demo Multi-targeting in VS 2008

16 VB9 Compiler Features Most are LINQ enablers XML Literals Relaxed Delegates C# 3.0 Extension Methods Object Initialisers Anonymous Types Local Type Inference Lambda expressions Collection Initializers Partial Methods Automatic Properties If Ternary Operator Nullable Syntax Lambda statements

17 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 Expression trees Automatic properties Partial methods

18 string name = “Bart”; string reversed = MyExtensions.Reverse(name); string name = “Bart”; string reversed = MyExtensions.Reverse(name); Extension methods Add methods to existing types “virtually” Static method with first “this” parameter Scoping using namespaces static class MyExtensions { public static string Reverse(string s) { char[] c = s.ToCharArray(); Array.Reverse(c); return new string(c); } } string name = “Bart”; string reversed = name.Reverse(); static class MyExtensions { public static string Reverse(this string s) { char[] c = s.ToCharArray(); Array.Reverse(c); return new string(c); } } Promoted first parameter

19 Automatic properties Tired of writing properties? Compiler can generate the get/set plumbing class Customer { private string _name; public string Name { get { return _name; }; set { _name = value; }; } } class Customer { public string Name { get; set; } } Setter required; can be private or internal

20 Object initializers Ever found the constructor of your taste? Insufficient overloads, so pick one Call various property setters class Customer { public string Name { get; set; } public int Age { get; set; } } Customer c = new Customer(); c.Name = “Bart”; c.Age = 24; var c = new Customer(){ Name = “Bart”, Age = 24}; Can be combined with any constructor call

21 Collection initializers Arrays easier to initialize than collections?! int[] ints = new int[] { 1, 2, 3 }; List lst = new List (); lst.Add(1); lst.Add(2); lst.Add(3); int[] ints = new int[] { 1, 2, 3 }; var lst = new List () { 1, 2, 3 }; Works for any ICollection class by calling its Add method

22 Anonymous types Let the compiler cook up a type Can’t be returned from a method Local variable type inference becomes a must Used in LINQ query projections var person = new { Name = “Bart”, Age = 24 }; var customer = new { Id = id, person.Name }; Infers the name of the target property by looking at the rhs

23 Lambda expressions Functional-style anonymous methods delegate R BinOp (A a, B b); int Calc(BinOp f, int a, int b) { return f(a, b) } int result = Calc( delegate (int a, int b) { return a + b; }, 1, 2); var result = Calc((a, b) => a + b, 1, 2); Parameter types inferred based on the target delegate

24 Demo Anonymous types, automatic properties, collection initializers, extension methods

25 First, A Taste of LINQ using System; using System.Query; using System.Collections.Generic; class app { static void Main() { string[] names = { "Burke", "Connor", "Frank", "Everett", "Albert", "George", "Harris", "David" }; var expr = from s in names where s.Length == 5 orderby s select s.ToUpper(); foreach (string item in expr) Console.WriteLine(item); } BURKE DAVID FRANK

26 Query Expressions Introduce SQL-Like Syntax to Language Compiled to Traditional C# (via Extension Methods) from itemName in srcExpr join itemName in srcExpr on keyExpr equals keyExpr (into itemName)? let itemName = selExpr where predExpr orderby (keyExpr (ascending | descending)?)* select selExpr group selExpr by keyExpr into itemName query-body

27 LINQ Architecture LINQ-enabled data sources LINQ To Objects LINQ LINQ To XML LINQ LINQ-enabled ADO.NET Visual Basic OthersOthers LINQ To Entities LINQ LINQ To SQL LINQ LINQ To Datasets LINQ.Net Language Integrated Query (LINQ) Visual C# Objects XMLXML Databases

28 LINQ Architecture LINQ-enabled data sources LINQ To Objects LINQ LINQ To XML LINQ LINQ-enabled ADO.NET Visual Basic OthersOthers LINQ To Entities LINQ LINQ To SQL LINQ LINQ To Datasets LINQ.Net Language Integrated Query (LINQ) Visual C# Objects XMLXML Databases

29 using System; using System.Query; using System.Collections.Generic; class app { static void Main() { string[] names = { "Allen", "Arthur", "Bennett" }; IEnumerable ayes = names.Where(s => s[0] == 'A'); foreach (string item in ayes) Console.WriteLine(item); names[0] = "Bob"; foreach (string item in ayes) Console.WriteLine(item); } Arthur LINQ to Objects Native query syntax in C# and VB IntelliSense Autocompletion Query Operators can be used against any.NET collection (IEnumerable ) Select, Where, GroupBy, Join, etc. Deferred Query Evaluation Lambda Expressions using System; using System.Query; using System.Collections.Generic; class app { static void Main() { string[] names = { "Allen", "Arthur", "Bennett" }; IEnumerable ayes = names.Where(s => s[0] == 'A'); foreach (string item in ayes) Console.WriteLine(item); names[0] = "Bob"; foreach (string item in ayes) Console.WriteLine(item); } Allen Arthur using System; using System.Query; using System.Collections.Generic; class app { static void Main() { string[] names = { "Burke", "Connor", "Frank", "Everett", "Albert", "George", "Harris", "David" }; IEnumerable expr = from s in names where s.Length == 5 orderby s select s.ToUpper(); foreach (string item in expr) Console.WriteLine(item); } BURKE DAVID FRANK using System; using System.Query; using System.Collections.Generic; class app { static void Main() { string[] names = { "Burke", "Connor", "Frank", "Everett", "Albert", "George", "Harris", "David" }; Func filter = s => s.Length == 5; Func extract = s => s; Func project = s = s.ToUpper(); IEnumerable expr = names.Where(filter).OrderBy(extract).Select(project); foreach (string item in expr) Console.WriteLine(item); } BURKE DAVID FRANK

30 LINQ Architecture LINQ-enabled data sources LINQ To Objects LINQ LINQ To XML LINQ LINQ-enabled ADO.NET Visual Basic OthersOthers LINQ To Entities LINQ LINQ To SQL LINQ LINQ To Datasets LINQ.Net Language Integrated Query (LINQ) Visual C# Objects XMLXML Databases

31 LINQ to SQL Overview

32 LINQ to SQL Architecture Application LINQ to SQL SQL Server from c in db.Customers where c.City == "London" select c.CompanyName Enumerate SELECT CompanyName FROM Customer WHERE City = 'London' SQL Query or SProc Rows Objects db.Customers.Add(c1); c2.City = “Seattle"; db.Customers.Remove(c3); SubmitChanges() INSERT INTO Customer … UPDATE Customer … DELETE FROM Customer … DML or SProcs

33 Demo LINQ to Objects LINQ to SQL

34 A tour around VS 2008 &.NET 3.5 Lifecycle Tools,.NET Framework, & languages Services Windows Apps Web Apps Office Apps Mobile Apps

35 Web Applications ASP.NET 3.5 Microsoft AJAX libraries and project templates ListView, DataPager, LinqDataSource Visual Studio 2008 IDE Enhancements New HTML Designer Shared with Expression Web Rich CSS support, Nested Master Pages Split view with better switching performance Javascript IntelliSense and Debugging

36 HTML Designer New Split View mode View source and design side by side Updates in real-time Dramatically faster than previous versions Switch between design, source, or split view with no lag.

37 CSS Designer Dramatically simplifies building and managing CSS styles. Intuitive visual designer Summary mode helps troubleshoot/trackdown where styles are being applied. Shares same CSS engine as Expression Web Developers and designers have access to same features.

38 ListView New data-bound control Evolution of DataList and Repeater Designer-friendly Full control over markup, including container Use CSS to style layout Bind arbitrary elements (e.g. )

39 DataPager Follows extender model Add paging to any control that supports it (e.g. ListView) Flexible layout – choose from a number of fields to create a customized pager

40 ASP.NET AJAX Increased productivity Fewer concepts, fewer lines of code Easier to author, debug, and maintain Well integrated with design and development tools Seamlessly integrated application model Works with ASP.NET pages and server controls Works everywhere – cross-browser, standards based A framework for building richer, more interactive, more personalized web experiences. A framework for building richer, more interactive, more personalized web experiences.

41 Demo JavaScript debugging CSS Support Ajax controls

42 A tour around VS 2008 &.NET 3.5 Lifecycle Tools,.NET Framework, & languages Services Windows Apps Web Apps Office Apps Mobile Apps

43 Windows Applications Windows Forms ClickOnce improvements Consume ASP.NET Provider Services ASP.NET login, roles and profiles Caching Consume WCF Services in Partial Trust Host WPF controls and Content (and vice versa) Windows Presentation Foundation XAML Visual Designer Integrated into Visual Studio XBAP deployment to FireFox

44 Mobile Applications NETCF v2.0 SP2 and v3.5 Unit Testing Cert manager Config Manager Device Emulator 3.0 CoreCon wrapper WM5 SDKs C#3 and VB9 LINQ WCF CLR Profiler / RPM Compression Client-side certs Sound APIs

45 Demo Windows Applications

46 A tour around VS 2008 &.NET 3.5 Lifecycle Tools,.NET Framework, & languages Services Windows Apps Web Apps Office Apps Mobile Apps

47 Services (WF and WCF) Windows Communication Foundation HTTP without SOAP XML or JSON serialisation Syndication RSS + ATOM Support Partial Trust Support Windows Workflow Foundation WCF Send/Receive WorkflowServiceHost

48 A tour around VS 2008 &.NET 3.5 Lifecycle Tools,.NET Framework, & languages Services Windows Apps Web Apps Office Apps Mobile Apps

49 Office Business Applications 2003 & 2007 Support 2007 Customisations Document Level Application Level Office Ribbon Designer Outlook Form Region Designer Custom & Action Task Panes Word Content Controls ClickOnce Deployment and improved Security VBA VSTO interop Workflow and SharePoint support

50 Expand the “Ribbon” Use full power of Office Excel Task Pane linked to business data

51 Extend the Office Ribbon New Look and Feel for Office UI Replaces Command Bars in “the big 5” Office apps Introduces a new extensibility model called RibbonX Enables you to: Customize tabs Add to built-in tabs Remove tabs, groups, controls Add to Office menu Override built-in UI Tab Group Control Ribbon

52 Extend the Office Ribbon Visual Ribbon Designer Office built-in support for XML-based customization model VSTO 2005 SE support: Simplifies hookup from.NET via pre-generated classes and sample XML VSTO – Visual Studio 2007 support: Adds full-blown visual designer support “Export to XML” option A more robust programming layer Property Grid Ribbon Control Toolbox Design Surface

53 Extend the Office Ribbon Ribbon XML structure requires a specific hierarchy For example:

54 Create Custom Task & Actions Panes VSTO simplifies and speeds up task pane UI design process with visual designers and.NET hookup Actions Pane: Associated with a specific Word or Excel document 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

55 Demo Office applications

56 Agenda The evolution of.NET A Tour around Visual Studio 2005 and.NET 3.5 IDE enhancements Language Enhancements Web Development Services (Workflow and Communication Foundation) Client and Mobile Development Office Development.NET Framework 3.5 new assemblies Questions & Answers

57 Framework v3.5 New assemblies System.Core.dll System.Data.Linq.dll System.Xml.Linq.dll System.Data.DataSetExtensions.dll System.Web.Extensions.dll System.WorkflowServices.dll System.ServiceModel.Web.dll System.AddIn.dll, System.AddIn.Contract.dll System.Windows.Presentation.dll System.Net.dll System.DirectoryServices.AccountManagement.dll System.Management.Instrumentation.dll System.VisualC.STLCLR.dll AddIn framework

58 Add-in framework An add-in is custom code (i.e., a customization) usually written by a third party that is dynamically loaded and activated by a Host application, based upon some context (e.g., Host startup, document loading, security, lifetime,…) and typically not tested by the Host The Add-in provides a service to a Host, Automates a Host, or provides Hosting functionality via public API’s (i.e., Object Model), which are typically made available via an SDK.

59 Resources MSDN: http://msdn.microsoft.com/http://msdn.microsoft.com/ MSDN BELUX: http://www.msdn.behttp://www.msdn.be Visual Studio 2008 Training Kit: http://go.microsoft.com/?linkid=7602397 http://go.microsoft.com/?linkid=7602397 OBA: http://msdn2.microsoft.com/en- us/architecture/aa699381.aspxhttp://msdn2.microsoft.com/en- us/architecture/aa699381.aspx LINQ Samples 101: http://msdn2.microsoft.com/en- us/vcsharp/aa336746.aspxhttp://msdn2.microsoft.com/en- us/vcsharp/aa336746.aspx Channel9: http://channel9.msdn.com/http://channel9.msdn.com CodePlex: http://www.codeplex.com/http://www.codeplex.com/

60 Agenda The evolution of.NET A Tour around Visual Studio 2005 and.NET 3.5 IDE enhancements Language Enhancements Web Development Services (Workflow and Communication Foundation) Client and Mobile Development Office Development.NET Framework 3.5 new assemblies Questions & Answers

61 Gill Cleeren Software Architect gill@snowball.bewww.snowball.be


Download ppt "Visual Studio 2008 and the.NET Framework v3.5 Gill Cleeren Microsoft Regional Director."

Similar presentations


Ads by Google