Sometimes I’m wondering, what am I doing in computer science? I’m good at it, or I think I am, but there always something new to learn.
Ever since the beginning of my career and may be before that I have to learn new things, new concepts, new technologies, new practice to do my job. I’m not complaining, I love to learn. It keeps me motivated, but who should pay the price.
I rarely did the same kind of project twice. Anyway it would be boring. I’m the kind of guy that like to build new things, to boldly go where no one has gone before (Start Trek). But this time I think I took the biggest leap of my career.
In my current project I use many new and emerging technologies, and beside the fact I’m coding in C# it’s all new to me.
Microsoft CRM 4.0
First our whole project is built on top of Microsoft CRM 4.0, it acts as our repository. We chose CRM because it has most of the data structure we need for our project. Hopefully I’m working with Alexandre Leduc who knows all the bells and whistles of MS CRM.
LINQ to CRM
One of the technology we use to connect our application to CRM is Linq to CRM. This is a fairly new project on codeplex, in fact it’s not final yet. There still many Linq command missing from this framework. But because it uses CRM as an IQueryable<T>, it gives us the performance we need.
ADX Studio CRM Metal
Because entities generated by linq to CRM are somewhat hard to manage (all the names are lower case and some of them have custom prefix), we use CRM Metal to generate our plain domain model. CRM Metal annotate all the classes and properties with attributes that helps to find the underlying linq to CRM types. We use those information as mapping when we load a new object in memory.
Because we want to be able to bind our UI to our domain model and it doesn’t implement INotifyPropertyChanged we use a find and replace regular expression to change all auto properties to properties with a backing field and a RaisePropertyChanged. At first we used PostShap to do that but it was way too slow to compile and because our data model is so big it was generating OutOfMemoryException every once in a while.
Windows Presentation Framework (WPF)
Just because its the new trend and a little because we want to be able to style our application, we chose to use WPF for our front end application. This is my first real experience with WPF, so I have everything to learn. I have to rethink the way I build an application layout. Expression Blend is an awesome tool when you finally understand how it works.
Composite Application Block for WPF and Silverlight 2.0 (formerly known as Prism)
I merely had the chance to work with the CAB framework with winform in a previous project, so Prism was almost all new stuff for me. Besides all the CAB concepts of shell, modules, views, services, commands, messages, Prism introduce Unit Application Block. Unity is an Inversion Of Control (IOC) container and a Dependency Injection (DI) framework. The basic concept is, the framework will handle the discovery and/or the creation of instance and will give you that instance on demand when you request it by its interface. This saves a lot of code and removes hard dependencies. When you start a new module (class) you only have to declare interfaces arguments to your constructor and Unity will handle you the appropriate instance. It a little overwhelming at first because you look like you loose control of your code. After a while you get used to it.
Who should pay the price?
As you can imagine, learning all that takes time, and the project still has a budget and a timeframe. It’s hard to throw all those costs to the customer. So, I take most of that on my shoulder hoping that someday I will reuse all this knowledge.