Forum OpenACS Q&A: Class design question

Collapse
Posted by Michael Bluett on
Having been on an ArsDigita Bootcamp, I'm thinking about creating a small site using OpenACS (PostgreSQL).

I was planning to create an abstract "ISP service" class derived from the "Content Revision" class and then subclassing this to broadband or dial-up classes (to represent individual services offered by ISPs). Are there any inherent problems in creating two layers of subclasses? Is there such a thing as too many layers as I might want to create Satellite, ADSL and Cable subclasses of abstract Broadband?

Collapse
Posted by Stephen . on
Depends...  Unlike say Java, subclassing in the ACS data model incurrs a noticeable performance penalty when you join the tables in the hierarchy to get the complete object.  It may or may not be a problem for you in this case depending on the depth of your hierarchy, the number of objects, the type of queries, your performance requirements etc.  In general, keep it short.  Or, build it 'correctly', then test it.