General OO: Is it possible to dynamically extend a class?
(I may be on the wrong track from the start here, so my question title may
need editing...)
For an ecommerce app, I have a StoreBase class, and subclasses
StoreCheckout, StoreCart and other modules/objects within the app.
Some clients have module specific biz logic, so we create classes with
custom functionality as needed -- eg StoreCartClientX extends StoreCart
and overrides some calculation.
Some clients also have custom base biz logic -- eg StoreBaseClientX
extends StoreBase and restricts access to certain parts of the app based
on custom rules.
My problem is that I need a way to tell StoreCart to extend
StoreBaseClientX when StoreBaseClientX exists which would seem to require
dynamic extension and that seems like a bad idea based on various posts
(taken on faith) in SO (and in anycase, I'm using ColdFusion (go ahead,
laugh) and dynamic expressions are not allowed for extension.)
No comments:
Post a Comment