Custom Class Properties

I've been reading a lot about custom application design lately, and I have a book proposing using a dictionary or collection for storing properties in business objects.  I wondered about that for a while, and while reading about object design, came across this article:  http://www.codeproject.com/gen/design/AOM_Property.asp.

I guess I'm somewhat torn; on one case I see the lack of type specificity, as well as the potential to not know all of the values assigned (more so in a dictionary setting).  However, I see the power in this, as after reading it, I saw some of my own limitations and excessiveness in my code.  It makes sense to use an attribute collection for properties.

But I also have to wonder whether that will make it worse with all of the boxing and unboxing of values that will occur.  Maybe not so much from a performance perspective, but a design one.  I think that is one of the reasons developers do prefer creating properties in the objects directly.

I have to say that is a better approach in some situations (although I wouldn't implement it in a factory pattern), but there is something in me that makes it feel different or awkward for me, as if it is an unnatural way to do things, even though it may be better........

Comments

No Comments

The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.