EllisLab text mark
Advanced Search
1 of 22
1
   
Modular Separation - PHP5 (Modules)
Posted: 02 July 2009 12:38 AM   [ Ignore ]
Avatar
Joined: 2007-06-10
2919 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.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 03 August 2009 11:04 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2008-03-28
430 posts

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

 Signature 

———————————————————————————————————————————-
Imac 27” Core i7 / 12GB RAM
Macbook Pro 15” C2D 2.53Ghz / 4GB RAM / NVIDIA GeForce 9400M + 9600M GT 512MB
iPhone 4 16Gb Black

http://www.rockkarusellen.se

 
Posted: 03 August 2009 09:10 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 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.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 19 August 2009 08:06 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

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

EDIT:
deprecated file removed

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 26 August 2009 05:04 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2009-08-26
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..

 
Posted: 29 August 2009 09:11 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 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

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 30 August 2009 09:41 AM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2008-08-19
340 posts

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

 
Posted: 31 August 2009 03:57 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2009-08-26
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:

http://localhost/ci_test/ 

- 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:

http://localhost/ci_test/ 

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

Did anyone have a same problem with me?

 
Posted: 25 September 2009 01:23 AM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

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

EDIT:
deprecated file removed

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 13 October 2009 09:35 AM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-11
2985 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.

 Signature 

————————
Blog | Twitter | GitHub | BitBucket
————————-
PyroCMS - open source modular CMS built with CodeIgniter
PancakeApp - Simple, hosted invoicing/w project management

 
Posted: 13 October 2009 09:39 AM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-11
2985 posts
Phil Sturgeon - 13 October 2009 01:35 PM

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. grin

 Signature 

————————
Blog | Twitter | GitHub | BitBucket
————————-
PyroCMS - open source modular CMS built with CodeIgniter
PancakeApp - Simple, hosted invoicing/w project management

 
Posted: 13 October 2009 10:12 AM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 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'); 
 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 15 October 2009 09:58 AM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 posts

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

Added module routes.

EDIT:
deprecated file removed

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 15 October 2009 12:40 PM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Joined: 2009-10-15
1 posts

Hi wiredezigns,

is there any place I can find the library documented?

Thanks a lot!
idong

 
Posted: 15 October 2009 03:50 PM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2007-06-10
2919 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.

 Signature 

URI Language Identifier | Modular Extensions - HMVC | View Object | Widget plugin | Access Control library

 
Posted: 15 October 2009 06:50 PM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Avatar
Joined: 2007-03-25
18 posts
Dhanova - 31 August 2009 07:57 PM

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:

http://localhost/ci_test/ 

- 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:

http://localhost/ci_test/ 

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

Did anyone have a same problem with me?

I have same problem… on clean 1.7.2 installation

 Signature 

V.

 
1 of 22
1