View Single Post
Old 11-14-2007, 06:24 AM   #4 (permalink)
dschreck
The Contributor
 
Join Date: Nov 2007
Location: California
Posts: 56
Thanks: 0
dschreck is on a distinguished road
Default

Nice write up.

As far as how interfaces and abstract classes work differently, here's the first things that come to mind..

Firstly, an interface is great because you can stack them, and they enforce the rules of a framework. You can work up crazy interfaces for each section or module you may want to implement, or just come up with a general sense of what you'll need for classes to work together.

I personally prefer to use only one or two interfaces, and rely upon abstract classes to do a lot of the dirty work. The great thing about abstract classes, in my opinion, is that they can actually contain larger chunks of my most common methods, and dictate my future methods.

Using them together can add some benefits if you dont want to always rely upon polymorph ism. If you always know that you need to have certain methods, that will need to be declared, but you don't want to continuously extend your classes downwards.

Dunno if any of that helps, just some of the things that popped into my head as I read the write up / comments.
dschreck is offline  
Reply With Quote