Understanding MVC in PHP
Subject:   Class hierarchy
Date:   2006-01-14 08:35:46
From:   MJF
Joe, great article; thanks!

Can you share your ideas on one aspect of your class hierarchy: why is FR_Object_Web in the inheritance hierarchy? Doesn't this imply that all applications are web-based? I suppose if you wanted a non-web based application you could have a peer to FR_Object_Web, called, say, FR_Object_Dekstop. But then you'd have to duplicate a lot of the descendants of FR_Object_Web into the descendancy of FR_Object_Desktop.

Similarly, instead of having FR_Module inherit from FR_Object_Web, why not have it own an FR_Object_Web?

Likewise, why have all modules (models) inherit from an auth type instead of owning an auth type?

I realize this is the typical "is-a" vs. "owns-a" design tradeoff that's typical in OO design; I'm interested in your thoughts on why you did it the way you did.

Thanks again.