The Dynamics Duo talk about CRM and WPF

Category : CRM, Dynamics CRM
Date : August 15, 2008

In this episode The Dynamics Duo dive into the deep rich coolness that is WPF.  We also spend some time talking about the offline data framework that Dynamics CRM provides developers. 

In past sessions we built solutions on SharePoint and Office and those are great for the specific scenarios they were intended for.  Windows Presentation Foundation (WPF) gives developers the ability to build rich interactive smart clients.  You’ll have to admit that nothing beats the inherent coolness of a well written WPF app.  I’ve worked on a few WPF projects (here and here) and it never ceases to amaze me the way you can reduce complexity and immerse users in the experience.

If your solution requires a desktop apps then WPF is absolutely the way to go.  If you’re building web apps then Silverlight is the right way to go.  When you’re not sure then you should think a little harder about your requirements.  Things like access to local PC resources require WPF.  Also if you’re doing heavy graphics that would require graphics acceleration then WPF is the right choice.  Finally if your app needs to be both online and offline then WPF also would be a good choice.

In keeping with the series of demos for a professional services organization, Girish shows off an eye-popping jaw-dropping WPF app that radically improves the time sheet entry process.  The scenario is an offline one.  Dynamics CRM provides a great offline framework as part of both the end-user experience and the developer toolkit.  By designating an entity in the system as available offline, the framework will automatically pull data from the CRM server and store it locally.  In order to make the experience a natural one a local web server (Cassini) and database server (SQL Server Express) are used.  In this demo we used the Microsoft Office Outlook client to take CRM offline.  I even surprised Girish by yanking out the network cable.  


The Dynamics Duo talk about CRM and WPF


Since CRM is built on web services and has a local web server, you call the exact same web service whether you’re offline or online.  The only difference is that when you’re offline the endpoint is local and when you’re online the endpoint is on the server.  Girish shows us the code to do that and it’s pretty simple.  Something on the order 10-15 lines.  Sweet!

The WPF TimeManager app is a composite app that pulls info from the outlook calendar (something you wouldn’t be able to do with a web app) and from CRM itself to reduce the time and effort required to submit a time sheet.  When you’re done it then posts that back to CRM for tracking, reporting and billing.  Obviously since we’re using WPF here the user experience is a cool rich immersive one.   We also take full advantage of WPF to show off some of the rich data visualization possibilities.  Girish switches easily from project to category view to look at the time sheet from different perspectives.  We also shows off some cool 2D data visualizations of historical data by month, quarter or year.  Finally, Girish adds a third dimension to the story (showing project, time and team member) to show off some fascinating 3D data visualization.  Since we were offline when he submitted the time sheet, we hit the local web service endpoint which stored the data locally until we were back online and synchronize all the offline data back to the server.  That part was automatic since CRM knows which entities are offline and how to sync them back up. 

CRM is built from the ground up using web services so it’s a pretty standard experience to build the WPF app using the well known Visual Studio for developers and Expression Studio for the user interface and interaction designers.  WPF supports data binding so it’s simple to pull the data in from CRM and surface it in WPF using standard or even 3rd party controls.


Technorati Tags: ,,,