4 ms·
Spot on about reuse - I think it's really the core of a lot of problems people have. Models get complicated because people naturally want to design them for reu
by nlawalker 16y ago
Spot on about reuse - I think it's really the core of a lot of problems people have. Models get complicated because people naturally want to design them for reuse, when in almost every case it's just not feasible. You can't point to something like .NET and say "look at that level of reuse, our LOB applications should shoot for that," because entities in .NET represent things used by all computer programs, regardless of what they do. They model the machine and the network at a level of abstraction appropriate for the vast majority of computer programs out there - not all, but most.
Trying to achieve reuse like that - hell, trying to achieve any reuse in a collection of LOB apps - is incredibly tough, and in most cases not worth it. What's an "employee?" Height/weight/age? ID number? Location? Skillset? LOB apps are just like people: they have different ideas of what are and what are not defining characteristics of an employee.
Software development needs to focus on reuse of ideas, patterns and knowledge (both domain knowledge and computer knowledge), not code. The key to object modeling is making things loosely coupled and encapsulated enough that you can easily modify and add behavior later on, when you realize you actually need it, not throwing everything including the kitchen sink into your model. Even then, you can never be sure that your app or domain isn't going to take a hard left turn at some point and you need to do some major refactoring/remodeling.