Interface and class relationships

JackOfHearts

New member
Joined
Mar 29, 2005
Messages
3
Programming Experience
10+
I am posting this in this group as I am currently programming in VB.NET. However this might equally be an issue related to other .NET languages.

My query relates to the OOP elements of VB.NET and specifically the relationship between interfaces and classes.

My understanding is that a single class can implement multiple interfaces. This makes sense to me as different interfaces can be seen almost as different viewpoints on the same object but only exposing properties and methods which are relevant to a particular application element.

My further understanding is that multiple classes cannot implement a single interface (one class implementing part of the interface and another the rest). It is at this point that I start to become concerned about the value of interfaces and whether they have any value in object oriented programming.

Surely the interfaces sole responsibility should be creating controlled access between objects on one side of the interface to objects on the other with both sides being equal partners? The .NET implementation of interfaces appears to assume that one side is more equal than the other and creates a large and potentially hierarchal class on the less equal side.

The only way that I can see of overcoming this problem is to create a classes that fully encompasses the interface and use this to delegate responsibility to lower level objects. In which case why do I need the interface at all?

I do not know how well I have expressed the above and I have to admit that I may have missed the point of interfaces altogether.

The whole thing stinks of a situation that I encountered years ago when relational database systems were built on top of hierarchal database systems.

Perhaps one of the more OOP oriented members can put me right on my thinking? I am more than ready to be proved a fool!
 
Top Bottom