• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modular Extensions - (HMVC) - Version 3.1.9

#11
[eluser]wiredesignz[/eluser]
if you want to keep views original, just use normal $this->load->view('view', $data, FALSE).

Module views require you to add the module name such as $this->load->module->view('view', $data, FALSE)

You can seperate the library files from the helper if you wish. But I didn't want to write checking for if !class_exists() for the Loader library, plus it must not ever be visible to CodeIgniter or they will fight. :lol:.

#12
[eluser]wiredesignz[/eluser]
The wiki is updated, Modular Extensions - HMVC

Thanks for your feedback. Smile

#13
[eluser]Edemilson Lima[/eluser]
Okay, you are the man! If you say so, I must agree with you. Smile

As this new version allow us to almost organize complete MVC into folders, will this new version compete with Matchbox in some extent?

#14
[eluser]wiredesignz[/eluser]
I am just about to update the wiki again. :lol:

Version 3.0.1 will have ability to use modular Controllers, Libraries, Models and Views.

Version 3.0.2 Is a bug fix.

Version 3.0.3 will add Config, Helpers and Plugins.

It's turned out rather easy to do because of the way the modules loader operates.

#15
[eluser]gerben[/eluser]
Man, I can't believe this! This will combine the best of Matchbox with the best of modular partials! And all in just one convenient helper. Can't wait to see version 3.0.2 (but I probably won't have to wait long, you're so fast!).

Keep up the marvelous work, Wiredezignz, this is going to be soooo useful.

#16
[eluser]wiredesignz[/eluser]
I believe it will eventually be more powerful than Matchbox. :coolsmile:

Modules can attach to, and extend, any currently loaded core object as well as providing Modular Separation for you applications.

Modules can be written as just about any component. They can be controllers, helpers, libraries or models depending on how you create them.

#17
[eluser]gerben[/eluser]
Just two weeks ago I met up with Gavin (Codex on the CI forums) and we were talking about how cool it would be if modules could be used as partials, and now it's there!

What I like best about it is that modules can be shared easily, even between different applications built on CI, because the module doesn't need to have a notion about the rest of the app (how the layout is handled, how the rest of the system is built, etc.). The module can be a standalone partial functionality, which can easily be shared among different apps, even made by different coders.

#18
[eluser]wiredesignz[/eluser]
Current Version 3.0.1 is in the wiki.

The Modular Extension directories can now be organised with proper structure: ie Controllers Libraries, Models and Views (Config, Helpers and Plugins to come later).

Code:
<?php

//application/modules/search/controllers/search.php
modules::run('search', $config, 'a_method');

//application/modules/search/libraries/a_library.php
$this->load->module->library('a_library', $config);

//application/modules/search/models/a_model.php
$this->load->module->model('a_model', 'an_alias', TRUE);

//application/modules/search/views/form.php
$this->load->module->view('form', $data, FALSE);

?>

TIPS:
To extend CI_Libraries, just use the same filename for your own library. MY_Library will also get loaded as per normal.

$this->load->module->xxxxx only works from within a Module. Don't try it in a Controller. :exclaim:

It works, I'm using it, it is PHP4 compatible. :coolsmile:

EDIT:
My profiler tests indicated best page rendered in 0.0488s - with 3 Modules, 2 Models and 4 View partials.
3 MYSQL Database queries.
Memory usage 1.3mb

#19
[eluser]Adods[/eluser]
what is the different between this and matchbox???

#20
[eluser]wiredesignz[/eluser]
The difference is great, the functionality is similar.

Modular Extensions is one drop in file, it requires no CodeIgniter core alteration, it is totally extendible.

But you still require a base controller to handle requests and decide which module to run.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.