Sunday, April 24, 2011

wpf & wcf

.NET 3, being an extension to .NET 2, doesnt have to change anything. Its just a framework, you can use it if you want, you don't have to. It is more or less the new version of "Win32". It is not specific to the web at all, and certain parts don't adapt all that well with the web, actually.

WPF is the new GUI API that came out for Vista, but was backported to WinXP. It allows you to do full fledged graphical interfaces that tap into directx optimisations. Its very simple, and can be used inside the web in a Flash-like manner. A subset of WPF is available crossbrowser and crossplatform, called for now (its a codename), WPF Everywhere. All around, if you use WPF, you're not doing web development anymore, as its a rich client environment, not HTML/CSS/Javascript. It just so happen it can be served through a browser.

WCF Is an API to do distributed applications. So if you were using web services or remoting to distribute your app, it can handle that for you far more easily.

WWF Is a platform to use workflows to handle your business logic and processes. Like, you can graphically define, in a way that looks (a little bit) like UML how your business processes work, graphically, and then add code in those blocks. Google Windows Workflow and look at Images, it will be fairly obvious what it does at first glance.

You can go there for more info

Technically, you don't have to touch these at all, and, except for Windows Workflow, it might be a good idea to wait for the next visual studio to make it less painful. All of these things don't change how you work directly with ASP.NET (especially not WPF, obviously), but they can enhance it. For example, the Web Client Software factory integrates ASP.NET with workflows, if I remember well, to  help make very complicated processes using ASP.NET almost painlessly.

linq simple group by query sample

var orderGroups =
        from p in products
        group p by p.Category into g
        select new { Category = g.Key, Products = g };