how do i autoload classes?
Posted: Thu Oct 08, 2009 8:42 pm
Ok, the title, might not be 100% accurate. This is what i want to do:
I have my application which is working fine, but then, i want to be able to extend it by simply dropping a file with a class in a certain folder.
For example, lets say i have an online stores selling books, CDs and DVDs. Each of these sections would have its own class with some specific functionality and, if i wanted to add a section, say videogames, i could just drop a file containing it.
What i am looking for is sort an equivalent (yet not only limited to that) to Java interfaces.
I thought about a few ways this could be possibly achieved, but i want it to be properly made. I believe this is done out there by many so feel free to point an example.
Elegant/light/neat solutions are welcome rather than complex/fancy/advanced ones.
Thans
I have my application which is working fine, but then, i want to be able to extend it by simply dropping a file with a class in a certain folder.
For example, lets say i have an online stores selling books, CDs and DVDs. Each of these sections would have its own class with some specific functionality and, if i wanted to add a section, say videogames, i could just drop a file containing it.
What i am looking for is sort an equivalent (yet not only limited to that) to Java interfaces.
I thought about a few ways this could be possibly achieved, but i want it to be properly made. I believe this is done out there by many so feel free to point an example.
Elegant/light/neat solutions are welcome rather than complex/fancy/advanced ones.
Thans