Welcome Guest, Not a member yet? Register   Sign In
CI Oriented to Modules (Problems)
#1
Bug 

Hi,

I'm trying to modify the CI to be oriented to Modules, not just a simple MVC.
Buy I have a lot of problems to do this from "application" directory. Sometimes the "core" and "hooks" files doesn't work as expected.

I found some problems:
- I can't change the path of "controllers", "models" and "views" from just a variable or constant
- I can't replace "CodeIgniter.php" file from "~/application/core"
- I don't know if I'm missing something, but I can't replace just a Class from a core file. I can just replace all core file content.


Talking just a little about my ideas:
I'm thing about create a framework, based on CI security, to work with modules. For exemple:

- If I'll develop a login system, this will be my tree of files
application/
application/modules/
application/modules/login/
application/modules/login/Controller_login.php
application/modules/login/Model_login.php
application/modules/login/View_index.php
application/modules/login/style.less
application/modules/login/Forge.php
application/modules/login/UnitTest.php

With this, I can reutilize my code just copying and pasting my "application/modules/login/" directory.



That's it. If somebody help me to understand CI core to do this modification, I thanks a lot!

See ya!
Luiz Felipe F M Costa
Cloud Application Developer
http://TheNets.org/
Reply
#2

I guess you're searching for is CI HMVC.
Reply
#3

(01-17-2016, 02:37 AM)johnny Wrote: I guess you're searching for is CI HMVC.

wow! Big Grin
That's really nice! I'll fork this project and add suport to LESS compilation and Coffee files from module folders.
Luiz Felipe F M Costa
Cloud Application Developer
http://TheNets.org/
Reply
#4

https://bitbucket.org/wiredesignz/codeig...sions-hmvc

This is the one you need. It will allow you to create a modules directory next to your regular application and system directory. Each module can have its ow controllers,models, views, helper, configs etc. I love it because it keeps my code nice together and it's easy to copy a module from site A to site B etc.
Reply
#5

What about the built in Packages support? https://codeigniter.com/user_guide/libra...t=packages
Best regards,
José Postiga
Senior Backend Developer
Reply
#6

(01-17-2016, 04:42 AM)thenets Wrote:
(01-17-2016, 02:37 AM)johnny Wrote: I guess you're searching for is CI HMVC.

wow! Big Grin
That's really nice! I'll fork this project and add suport to LESS compilation and Coffee files from module folders.

Using CI HMVC since CodeIgniter version 2.
Heart  it and really works like a charm !

Just one remark... 
Take care about the compatibility between your MY_Controller and MY_Model versions over your different projects... 

Grtz,
Johnny
Reply
#7

I have added support to JS and SCSS to CI HMVC! Big Grin
Let's check at http://forum.codeigniter.com/thread-64442.html

I'm working to add more and more features to create the best way to develop a modular application!
I need feedback to keep working! Smile
Luiz Felipe F M Costa
Cloud Application Developer
http://TheNets.org/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB