170 likes | 304 Views
C#/.NET. The state of the art. The shape of things to come (1). Who are you? What is your language Why do you use it? What kind of projects is it most suited to? What kind of projects is it least suited to? What are you using it for today? 3 exciting new developments
E N D
C#/.NET The state of the art Ian Cooper http://iancooper.livespaces.com
The shape of things to come (1) • Who are you? • What is your language • Why do you use it? • What kind of projects is it most suited to? • What kind of projects is it least suited to? • What are you using it for today? • 3 exciting new developments • Frameworks that fuel adoption Ian Cooper http://iancooper.livespaces.com
The shape of things to come (2) • What is the future for your language? • What is the future for dynamic and scripting languages in general? • What other languages do you use? Ian Cooper http://iancooper.livespaces.com
Who do you think you are? Foxpro Windows 1992: C++ MFC 1994: Win 32 COM ATL C# .NET 2002: NUnit LDNUG Wilson Wix MVP NHibernate Nant Monorail Ian Cooper http://iancooper.livespaces.com
Cool, sharp, lightning • 1997: Project Lightning • COM+ 2.0 • The Universal Runtime • Project Cool • Anders Hejlsberg worked on derailed J++ • C# shows J++ heritage (delegates, WFC) • C# • C-family language for .NET • Open source and commercial implementations Ian Cooper http://iancooper.livespaces.com
Why? Object Oriented using System; namespace ShowFeatures { class Program { static void Main(string[] args) { Program program = new Program(); program.PrintGreeting(args[0]); } private void PrintGreeting(string to) { System.Console.WriteLine("Hello {0}", to); } } } C family language Garbage Collection Strongly Typed Access to extensive .NET libraries Ian Cooper http://iancooper.livespaces.com
Where can you use it? C# VB XAML Others… .NET Framework ADO.NET ASP.NET Windows Forms Windows Communication Foundation Windows Presentation Foundation … Base Class Library Common Language Runtime Ian Cooper http://iancooper.livespaces.com
Where is it not suitable? • Not a systems development language • Restricts ‘unsafe’ operations like pointer manipulation • Overhead of runtime, not ‘to the metal’ Ian Cooper http://iancooper.livespaces.com
What are you using it for today? • Web based underwriting system • Geographically distributed user base • Internet and intranet access • Highly scalable • Document Generation system • Highly reliable, scalable, and robust • Multi-threaded • Extensible pipes and filters architecture Ian Cooper http://iancooper.livespaces.com
<book> <title/> <author/> <year/> <price/> </book> Relational Objects XML LINQ C# 3.0 VB 9.0 Others… .NET Language Integrated Query LINQ toObjects LINQ toDataSets LINQ toSQL LINQ toEntities LINQ toXML Ian Cooper http://iancooper.livespaces.com
C# 3.0 Language Extensions Query expressions var contacts = from c in customers where c.State == "WA" select new { c.Name, c.Phone }; Lambda expressions var contacts = customers .Where(c => c.State == "WA") .Select(c => new { c.Name, c.Phone }); Extension methods Anonymous types Object initializers Ian Cooper http://iancooper.livespaces.com
Workflow Foundation Classes • Workflow Runtime Engine • In-process, multiple hosting options • Provides support for long-running transactions • Leverages idea of code as data • Activities are .NET components • Both off-the-shelf and custom • Both simple and composite • Flow is described by XAML • Both rules and conditions supported Ian Cooper http://iancooper.livespaces.com
Dynamic Language Runtime • Services that run on top of CLR • Dynamic type system • Dynamic method invocation • Implement dynamic languages like Python and Ruby on the .NET Framework • Microsoft issued under permissive source, so can ship with open source projects like Moonlight • VBx • VB to be recast as scripting language? Ian Cooper http://iancooper.livespaces.com
What drives adoption? • Windows Forms • RAD smart-client development • Successor to VB, PowerBuilder, et al. • Webforms • Moved rich-client developers to web • Incorporates ASP.NET Ajax • Monorail challenging page controller approach • Silverlight • Rich media content via CLR on the browser Ian Cooper http://iancooper.livespaces.com
The future • Cw or Comega • Asynchronous concurrency constructs • PLINQ may use Cw features • F# • Mixed functional/imperative language • Influenced by Ocaml • DSLs • Partial methods and classes, Guidance Toolkit • Software factories, MDA, something else? Ian Cooper http://iancooper.livespaces.com
Dynamic Languages? Source: Tiobe Programming Community Index Ian Cooper http://iancooper.livespaces.com
Guilty Pleasures • Don’t use others but • Learning Ruby, because the smart kids are. • Early Ruby adoption around Watir or scripting • Later Ruby adoption around IronRuby • Intrigued by Boo • Used by Monorail for Brail • Little Knowledge outside .NET space Ian Cooper http://iancooper.livespaces.com