Blog

Thoughts about CAB & Naked Objects (1)

I am having hard time putting in practice the WorkItem or even the MVC/MVP patterns of the Composite Application Block. While starting to read the thesis on the Naked objects, I am wondering if it is not because I am more enclined to the latter approach which emphasis the behavioral completness of the objects...

Read more

Collections discrepencies

When the collection had their "Generic" version added, some features were changed:

IsSynchronized and SyncRoot do not exist in the ICollection, when they exist in the ICollection. IList does not declare a IsFixedSize property. The List have an instance AsReadOnly method than returns a new ReadOnly version of the list, while ArrayList have a ReadOnly static method to do the same. ReadOnly, Synchronized and FixedSize version where hidden and available to instanciation only through static method, whereas they are public derived class now.

The framework is getting messier... I am hoping, without really believing, that MicroSoft will attempt to clean this up and make good use of the Obsolete attribute.

Read more

INotifyCollectionChanged

There are two things I do not understand with INotifyCollectionChanged:

Why is it in the System.Collections.Specialized? System.Collections.ObjectModel or even System.Collections would have made more sense to me because it does not specialize a collection, it simply makes it observable. Why is it defined in the WindowsBase assembly? This interface could be used to build Observable collections when implementing Domain objects. But I do not want references to "windows" there, i.e. user interface related components.

Read more

ReadOnlyObservableCollection

What is the point on observing changes on a collection that is ReadOnly?

Well, I guess it is all in the name: you cannot change it but you can still know what is happening to it.

In framework 1.0 & 1.1, you had no ReadOnly implementation visible. You could create ReadOnly instances by calling static methods. I guess it was decided that it is clearer to explicitly expose the Collection as ReadOnly in the signature of the property itself, than having to read the documentation to discover it.

Read more