ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Modular Separation - PHP5 (Modules)

July 02, 2009 12:38am

Subscribe [88]
  • #1 / Jul 02, 2009 12:38am

    wiredesignz

    2882 posts

    I have created a set of module library extensions which provide the modular separation part of the Modular Extensions HMVC libraries, without the HMVC component.

    Update:
    Modular Separation now runs on the same code base as Modular Extensions - HMVC and is available via my bitbucket repository.

    http://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc

    Check it out, to use Modular Separation only, simply do not include the MX/Controller file.

    Feedback is appreciated.

  • #2 / Aug 03, 2009 11:04am

    Johan André

    412 posts

    What exactly does this do?
    What is the difference between this and Modular Extensions HMVC?

  • #3 / Aug 03, 2009 9:10pm

    wiredesignz

    2882 posts

    Hi Johan,

    Modular Separation allows you to use modules for code organization in your application while only using a single controller per request. (no HMVC)

    It works the same way as Zach’s Matchbox, But is much faster in execution and does the job without using additional module_xxxx() calls.

    Modules now comply with CI 1.7.2 also, Controllers in sub-directories are supported and resources may be cross loaded from other modules.

    You should be able to take any CodeIgniter application and place it into a module and it should work without alteration. However routes might need altering to allow for the added separation of a module.

  • #4 / Aug 19, 2009 8:06am

    wiredesignz

    2882 posts

    Modular Separation - PHP5 version 1.01 is attached to this post. As usual any feedback is appreciated.

    EDIT:
    deprecated file removed

  • #5 / Aug 26, 2009 5:04pm

    Dhanova

    2 posts

    hi wiredesignz,

    i did a quick test for this, use Modular Separation 1.1 running on fresh CI 1.7.1 installed. Seems {elapsed_time} doesn’t work.

    thanks..

  • #6 / Aug 29, 2009 9:11pm

    wiredesignz

    2882 posts

    Modular Separation - PHP5 version 1.02 is attached to this post.

    Fixed MY_Loader bug when loading or reloading libraries.

    @Dhanova, I cannot reproduce your {elapsed_time} problem.

    EDIT:
    deprecated file removed

  • #7 / Aug 30, 2009 9:41am

    darkhouse

    323 posts

    wiredesignz: this sounds very cool, can’t wait to test it out.  Thanks!

  • #8 / Aug 31, 2009 3:57pm

    Dhanova

    2 posts

    This is my steps:
    - extract a fresh CI 1.7.1 (or 1.7.2) to local server and change the base url to respect my installation dir
    - hit a base url:

    <a href="http://localhost/ci_test/">http://localhost/ci_test/</a>

    - output: welcome message with correct elapsed time (eg. Page rendered in 0.0157 seconds)

    - extract a fresh Modular Separation 11 (or 12) and put MY_Loader.php and MY_Router.php in application/libraries
    - hit a base url:

    <a href="http://localhost/ci_test/">http://localhost/ci_test/</a>

    - output: welcome message with incorrect elapsed time (at the bottom: Page rendered in {elapsed_time} seconds)

    Did anyone have a same problem with me?

  • #9 / Sep 25, 2009 1:23am

    wiredesignz

    2882 posts

    Modular Separation - PHP5 version 1.03 is attached to this post.

    EDIT:
    deprecated file removed

  • #10 / Oct 13, 2009 9:35am

    Phil Sturgeon

    2889 posts

    I like this so far, it seems to require a LOT less code to get it working nicely.

    Does it support modular language files? I can’t spot anything in the code that suggests it would.

    Also, I see no reason for database(), helpers(), models(), plugins() or _ci_assign_to_models() to be in MY_Loader as they are no different to the parent class.

  • #11 / Oct 13, 2009 9:39am

    Phil Sturgeon

    2889 posts

    Does it support modular language files? I can’t spot anything in the code that suggests it would.

    /dumbass

    Sorry I spotted the language() and config() methods now meaning while it does support modular config and language, it does not do it the normal CodeIgniter way. I thought that was the main appeal of this library?

    Sadly that is the reason Matchbox has to extend so many other libraries as it tries to get ALL CodeIgniter calls to work in the same way.

    I’m not being a Matchbox fanboy here, I am genuinely concidering converting as right now I feel the code is cleaner. That said, I have not seen the new Matchbox yet. 😊

  • #12 / Oct 13, 2009 10:12am

    wiredesignz

    2882 posts

    Hey Phil,

    Yes it works fine if you use $load->config() instead of the $config->load() and likewise with language files. An added bonus is that it returns the loaded item for you too.

    $app_config = $this->config->load('application');
  • #13 / Oct 15, 2009 9:58am

    wiredesignz

    2882 posts

    Modular Separation - PHP5 version 1.04 is attached to this post.

    Added module routes.

    EDIT:
    deprecated file removed

  • #14 / Oct 15, 2009 12:40pm

    idong

    1 posts

    Hi wiredezigns,

    is there any place I can find the library documented?

    Thanks a lot!
    idong

  • #15 / Oct 15, 2009 3:50pm

    wiredesignz

    2882 posts

    Documentation:

    Modular Separation allows you to use modules for code organization in your application.

    Modules now comply with CI 1.7.2, Controllers in sub-directories are supported and resources may be cross loaded from other modules.

    You should be able to take any CodeIgniter application and place it into a module and it should work without alteration. However routes might need altering to allow for the added separation of a module.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases