Microsoft .NET FoundationThis week Microsoft released Visual Studio 2008 and the .NET 3.5 Framework.  While the 3.0 framework has been out for sometime now, the 3.5 framework builds on this and adds some additional features to the Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF) and the Windows Workflow Foundation (WF).  So why is this worthy of a blog entry? 

The answer is simple! Microsoft’s latest strategy with the .NET platform is brilliant.  At a recent MSDN event I attended, the presenter stated that they had basically concluded that the only thing developers should have to worry about are the elements that are unique to the business requirements they are programming.  These fall into two simple categories, 1) the User Interface (UI) and 2) the business rules.  All other code components are not unique across applications nor across businesses and industries.

Sounds great, so how in the world are they doing this?  There again the answer is really simple.  They basically have studied what is common among applications and have written the logic into their core foundations (e.g. the WPF, WCF). 

I have heard a rough number that only 15% of an application’s code is really unique to that application.  That is if you were to take all the lines of code that exist to do the common things such as database calls, creating messages, reading / writing files, general UI formatting, etc…a lot of energy and coding hours have traditionally been consumed with the intricacies of these common elements.

MessageTake for instance the concept of messaging.  Just about every application used today communicates with some other application or system to send/receive data.  Lets say you have an application which composes a message and needs to transmit that message to another application via FTP.  In traditional programming, you’d be concerned with programming the logic to write the file, then setup all the required elements of an FTP connection, open the session, use FTP commands to put your file, then do the session closing all the while handling exceptions. 

Today with WCF, this is all a single line of code and a single configuration line in a config file to make it all happen.  The beauty of it is if you wanted to change the communication mechanism, say to HTTP, no problem, just alter a parameter in the config file and voila! now you are using a completely different protocol.  Want it encrypted and secure, no problem, just another parameter to turn that on.

This leaves a person to focus on what is truly unique to their business.  I wish the WCF was around when I wrote a tool I called the collector.  It is a polling tool that consumes trailer tracking GPS data from a variety of sources using FTP, HTTP and web services.  We leverage a mixed bag of Fleetilla, Skybitz and Terion, each of them using their own methods for exposing the GPS data to us.

It’s a mess since I had to waste cycles coding the communication mechanisms to support all the requirements of these protocols….this was more than a few lines of code to make it all work right.  And if the communication mechanism should change for one of these sources, it’d be a big deal, but not so much with the WCF since I don’t care about protocols anymore.  This is one application at some point will be re-written using the new framework.

One other interesting concept in the latest .NET framework is that everything is a service…again, they are making it easy to move to a Service Oriented Architecture (SOA) which is also cool!

There are ton’s of other new features, many of them very rich, most of them worthy of individual blog posts to really explain how powerful and advantageous they are.  The one I’m most excited about is a concept called XBap, similar to silverlight which many people have heard of, but much cooler.  I’ll do a follow-up post better explaining this and why this is note worthy.

If you want to know more, here’s a good blog posting with some great whitepapers detailing more on the subjects!

Popularity: 76% [?]

Other Posts that May Interest You