Check out my new blog at

Tuesday, May 13, 2008

Microsoft Project Fx (mpFx) - A Little Refactor

After writing last night's post I realized that I am already violating one of my design goals.  The idea that the object model should represent the underlying application structures isn't held up by having to make calls to separate methods to retrieve data such as enterprise resource custom fields values.

The semantics I am looking for are like this:  string myAddress = projectServer.EnterpriseResources["colby africa"].CustomFields["address"].Value

So, I am in the process of rearrange some of the code to enable this. 

Extending the object model to include an EnterpriseResources collection class with a CustomFields collection class increases the memory footprint, but the implementation employs the lazy load pattern so the balance between lightness and ease of use is maintained.   

Something I glossed over last night is the concept of filters.  The class library allows the developer to load just the data needed (where supported by the PSI).  For a list of the PSI methods that support filtering, read this:

I am thinking about creating a separate class library that allows developers to create and persist filters for reuse.  I am thinking of using .Net's configuration infrastructure to create strongly-typed filters.  After defining a filter and saving it using this technology, you could reuse it in your application through property gets like Filters.Default.GetResourceBasicInformation.   Just an idea.

I don't have much time tonight and frankly I am a bit fried...

No comments :


Content on this site is provided "AS IS" with no warranties and confers no rights. Additionally, all content on this site is my own personal opinion and does not represent my employer's view in any way.