Hi,
I'm building an MVC architecture site and have hit a design issue. I have
varoius Control subclasses which relate to different templates with
different behaviour. Now my problem is that I have to assign which
Subclass I want to instantiate, based on the script and params. I my last
effort I went for a Shared datastructure holding (script, control module
pairs) which then allowed one to be dynamically "eval 'use..'"'ed in the
main content handler. I found that clunky. I'm building from scratch
again and am thinking of just firing up a template and allowing the
control to be loaded INTO the view as a template toolkit plugin. What I
hate about this is that I'm surrendering my View layer.
Is there a neat way of dynamically loading in the appropriate control
subclass? Something proven and widely used.
Cheers,
Fiq
"__ __ _ __ __
| \/ | ___ __| | ___ _ __ _ __ | \/ | __ _ _ __
| |\/| |/ _ \ / _` |/ _ \ '__| '_ \| |\/| |/ _` | '_ \
| | | | (_) | (_| | __/ | | | | | | | | (_| | | | |
|_| |_|\___/ \__,_|\___|_| |_| |_|_| |_|\__,_|_| |_|
a pathetic example of his organic heritage"
- Bad Religion