Paul Gielens:ThoughtsService

another Endpoint to my thoughts

News

Syndication

Ads


Favorites

Projects

Uphill the OOP mountain,

To generalize or not to generalize that’s the question. The rule is only to generalize only if the entity in question has additional attributes over its super.

class Person
{
  string _name;
}

class Employee : Person
{}

vs.

class Person
{
  string _name;
  Enums.Type _type;
}

For some reason this makes perfectly good sense in the domain in which I’m currently experimenting. Although it leaves me confused, mommy…

The last construction would save me a whole lot of time during the implementation phase regarding inheritance mapping, but… Good thing eXtreme Programming backs me up by encouraging “just making a decision NOW and revising later”. Typical Monday morning syndrome.

Comments

No Comments