Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the important rules in Object Model Design

We are developing an extension (in C# .NET env.) for a GIS application, which will has predefined types for modeling the real world objects, start from GenericObject, and goes to more specific types like Pipe and Road with their detailed properties and methods like BottomOfPipe, Diameter and so on.

Surely, there will be an Object Model, Interfaces, Inheritance and lots of other essential parts in the TypeLibrary, and by now we fixed some of them. But as you may know, designing an Object Model is a very ambiguous work, and (I as much as I know), can be done in many different ways and many different results and weaknesses.

Is there any distinct rules in designing O.M.: the Hierarchy, the way of defining Interfaces, abstract and coclasses enums?

Any suggestion, reference or practice?

like image 907
AliPST Avatar asked Jan 22 '09 13:01

AliPST


1 Answers

A couple of good ones:

SOLID

Single responsibility principle
Open/closed principle
Liskoff substitution principle
Interface segregation principle
Dependency inversion principle

More information and more principles here: http://mmiika.wordpress.com/oo-design-principles/

like image 92
Mendelt Avatar answered Oct 07 '22 00:10

Mendelt