Geeks With Blogs
Mike Nichols - SonOfNun Technology If I were the captain on a big steamboat... C#
Moving Day - Feeds, Update Thineselves (both of you)

We've moved

New blog found here at http://blogs.chayachronicles.com/sonofnun/Default.aspx

RSS is here at http://blogs.chayachronicles.com/sonofnun/Rss.aspx

Thanks to GWB for parking me here for a spell :) MIKE

Posted On Wednesday, October 4, 2006 11:13 AM

Patterns, voicings, and rudiments
For the first 14 years of my professional life, I was a touring musician with a Master's in Music Performance in percussion. By the grace of God, I've been moved along into a fun profession of Software Development. For the most, I've been a lone ranger and have had to learn everything on my own, which is fine since I enjoy problem solving. As I've matured (ok..I am still in Beta :)) in my 'skills' - not the numbchuck kind - I've seen many parallels to music composition/arrangement and development. ......

Posted On Thursday, September 14, 2006 4:40 PM

Visitor Pattern For DataBinding ListControls with Model View Presenter
Implementing the Model-View-Presenter has been fun. I appreciate it's tendency to enforce discipline in keeping any business decisions out of the View layer. I was always bewildered when I would read that the business logic should be separated from the 'code-behind' source and then see millions of DataSet examples where that was tons of business logic embedded in Web Pages. However, trying to separate the presentation logic away and keep the client as dumb as possible presents (forgive the pun) some ......

Posted On Saturday, September 9, 2006 10:30 PM

Domain Validation Considerations
I have an Aggregate called Person that has a method called AddAddress which accepts an IAddress invariant to (hopefully) be added to the Person.Addresses collection. Within the method body of AddAddress, I am invoking a Command object that goes down a list of Specifications and if all are passed, then the address is added to the collection. So far so good. Now, i am calling this method from my Service layer and am expecting an IAddress object in return. If it fails, what is the best way of communicating ......

Posted On Tuesday, September 5, 2006 12:59 PM

Wintellect's PowerCollections come thru again
While trying to tighten down access to invariants within an Aggregate, I'd like to make the exposed collections ReadOnly. Then I control the addition of child objects thru exposed methods, thus enforcing the Aggregate's role as gatekeeper for these objects. The problem is, I am mapping NHibernate to my fields which implement IList which, of course, allow .Add(T entity) and casting to an ReadOnlyCollection in the exposed property isn't going to work. So I poked around the Algorithms utility class ......

Posted On Friday, September 1, 2006 11:09 AM

NHibernate Composite User Type (ICompositeUserType) gets even better
In a previous post I proposed a Generic class for building custom types using NHibernate. This lets us keep our Domain entities free from requiring hidden fields or other methods to persist Value Objects. While a Component may be used, this little Generic class lets us keep the power of HQL for our complex types. One situation that is not addressed in the Hibernate in Action book, though, is what to do when you want to combine these Value Objects into one Value Object. For example, if we have a Money ......

Posted On Wednesday, August 30, 2006 12:25 PM

The Subclass Me Reflex
One of the side-effects of being new out to learning Object Oriented Principles is the propensity to see everything as a subclass of something else. As if all objects shoudl derive from IThing since surely they might ALL have to have some common behaviour, right?!? This is motivated by a GOOD desire...wanting to eliminate duplication of code. So the novice reaches into his toolbox and gets *the* hammer and subclasses, hoping that all inheritors need something like the method he is building. There ......

Posted On Wednesday, August 23, 2006 12:59 PM

Generic ICompositeUserType implementation for NHibernate mapping
Here's an attempt to generalize (sorry Haack) various Value Objects I need to be mapped using NHibernate. Previously, I posted an example of using the ICompositeUserType NHibernate interface for JP Boodhoo's Money example, but it becomes clear after doing a couple of these implementations that you'll get sick of the repetition. It becomes clear after doing a couple of these implementations that you'll get sick of the repetition. :) I don't fully understand a couple of the methods how they are used ......

Posted On Sunday, August 13, 2006 6:30 PM

Value Object and its collection
Here's a nifty way to build a Value Object for consumption across your app and then have access to each type as a collection. First the test: [Test] public void CanLoadStreetTypesList() { IList<StreetTypes> types = StreetTypes.ALL; foreach(StreetTypes type in types) { Console.Out.WriteLine(type.... + " - " + type.Abbreviation); } Assert.IsTrue(types.Count&g... } So basically I want a list of all the types of a StreetTYpes Value object. Here's my StreetTypes VO : public sealed class StreetTypes ......

Posted On Friday, August 11, 2006 12:39 PM

Code Documentation compiler
According to this post, MS is rolling out a CTP of their own documentation compiler fo C#, code named Sandcastle (let's hope it is tested better than sandcastles).

Posted On Thursday, July 20, 2006 7:44 PM

Copyright © Mike Nichols | Powered by: GeeksWithBlogs.net