330 likes | 515 Views
Richard Fennell Engineering Director Black Marble. Visual Studio Team System. Visual Studio 2008 Key Features. 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
E N D
Richard Fennell Engineering Director Black Marble
Visual Studio 2008 Key Features • 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
Multi-targeting in Visual Studio 2008 v2.0. 50727.xx v3.0.xx v3.5.xxxx.xx
.NET Framework Today .NET Framework 3.5 CLR Add-in Framework LINQ ASP.NET 3.5 Additional Enhancements .NET Framework 3.0 + SP1 Windows Presentation Foundation Windows Communication Foundation Windows Workflow Foundation Windows CardSpace .NET Framework 2.0 + SP1
Compiler Features C# 3.0 VB9 Collection Initializers Automatic Properties If Ternary Operator XML Literals Anonymous Types Lambda statements Extension Methods Nullable Syntax Relaxed Delegates Lambda expressions Partial Methods Object Initialisers Local Type Inference
Extension methods static class MyExtensions {public static string Reverse(this string s) {char[] c = s.ToCharArray();Array.Reverse(c);return new string(c); }} string name = “Microsoft Vista”; string reversed = name.Reverse();
Automatic properties (C#) class Customer {private string _name;public string Name {get { return _name; };set { _name = value; }; }} class Customer {public string Name { get; set; }}
Object initializers class Customer {public string Name { get; set; }public int Age { get; set; }} Customerc = new Customer();c.Name = “Bart”;c.Age = 24; var c = new Customer(){ Name = “Bart”, Age = 24};
Collection initializers (C#) int[] ints = new int[] { 1, 2, 3 };List<int> lst = newList<int>();lst.Add(1);lst.Add(2);lst.Add(3); int[] ints = new int[] { 1, 2, 3 };var lst = newList<int>() { 1, 2, 3 };
Anonymous types var person = new { Name = “Bart”, Age = 24 }; • Can’t be returned from a method • Variable type inference becomes a must • Used in LINQ var customer = new { Id = id, person.Name };
XML Literals (VB.Net) Dim Person = <Person Dept=“Sales"> <Name>John Smith</Name> </Person> Console.WriteLine(Person.Name) Console.WriteLine(Person.Element("Name")) Person 'This is the name of the person element <Name>John Smith</Name> 'This is the "Name" element
Lambda expressions delegate R BinOp<A,B,R>(A a, B b); int Calc(BinOp<int, int, int> 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);
LINQ Architecture Visual C# Visual Basic Others .Net Language Integrated Query (LINQ) LINQ-enabled data sources LINQ-enabled ADO.NET LINQ To SQL LINQ To Datasets LINQ To XML LINQ To Entities LINQ To Objects <book> <title/> <author/> <price/> </book> Databases Objects XML
LINQ (to Objects) • using System; • usingSystem.Query; • usingSystem.Collections.Generic; • classapp { • static void Main() { • string[] names = { "Burke", "Connor", "Frank", "Everett", "Albert”, "George", "Harris", "David" }; • Func<string, bool> filter = s => s.Length == 5; • Func<string, string> extract = s => s; • Func<string, string> project = s = s.ToUpper(); • IEnumerable<string> expr = names • .Where(filter).OrderBy(extract) • .Select(project); • foreach (string item inexpr) • Console.WriteLine(item); • } • }
LINQ to SQL Architecture db.Customers.Add(c1); c2.City = “Seattle"; db.Customers.Remove(c3); from c in db.Customers where c.City == "London" select c.CompanyName Enumerate Objects SubmitChanges() SQL Queryor SProc Rows DML or SProcs SQL Server INSERT INTO Customer … UPDATE Customer …DELETE FROM Customer … SELECT CompanyName FROM Customer WHERE City = 'London' Application LINQ to SQL
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
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.
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.
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. <select>)
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
ASP.NETAJAX A framework for building richer, more interactive, more personalized web experiences. • 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
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
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
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
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
Expand the “Ribbon” Use full power of Office Excel Task Pane linked to business data
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 Group Tab Control Ribbon
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
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
Resources • MSDN: http://msdn.microsoft.com/ • Visual Studio 2008 Training Kit:http://go.microsoft.com/?linkid=7602397 • OBA: http://msdn2.microsoft.com/en-us/architecture/aa699381.aspx • LINQ Samples 101: http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx
For Further Information • My random thoughts at http://blogs.blackmarble.co.uk/blogs/rfennell • You can also get in touch via: Email – richard@blackmarble.co.uk WebSite– www.blackmarble.co.uk