Welcome Guest, Not a member yet? Register   Sign In
How to implement sth like a "module installation"


I am currently working on a rather big project for which I'd love to have something like a module-installation routine.

What do I think if when saying 'module-installation'?
For the current project, we have chosen to take the HMVC-approach and to separate pretty much everything into modules (like comments, user-galleries, forum, etc.).
To allow many developers to develop their own module based on our framework (which is an enhancement of the current CI-Reactor with some basic modules like ACL, User, Auth, ...) we would like to have something like an installation-routine so whenever a developer finishes his code and checks-out the module to the ./application/modules directory he first has to run an installation and "register" the module to the system (whether it's database stored or whatever doesn't matter so far).
Afterwards the module is accessible via the "public"-interface and also via other modules (with Modules::run(...)).

And now for the user surfing our application, CI would do something like this:
1) Grab the URI
2) Translate URI (via routes.php) to a module-controller-method combination
3) Check this combination is a valid combination i.e. the module/controller/method exists AND the module is a registered module for the application
4) If it's a valid combination proceed to the module and perform its stuff
5) otherwise drop an 404-error

So it's basically the stuff we all probably know from CMS's like Joomla where you can add additional components and then register them to the system.
But within CI it's so far pretty simple: Just drop the module to ./application/modules and you're done installing it.

As weird as the idea may sound, the questions are rather simple:
- Is it possible to make this with CI (I'm thinking of putting the code inside MY_Router)?
- Where would it be best to put the code for checking whether the module is installed? And how could I perform this check?
- Has anybody dealt with this kind of "problem" so far?

Any (relevant Wink ) questions will be answered and comments on this topic are welcome, too.



Theme © iAndrew 2016 - Forum software by © MyBB