• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Which HMVC library do you prefer? Why?

Active Record provides database access. It has nothing to do with Models.

Models encapsulate database access. They can be extended if you require common functionality.

Ok answer this:
If you wish to re-use your models in a different application will they function alone? If they need support from other models is that functionality appropriate for the new application?

Models should be totally isolated from the other components in an MVC triad. HMVC and PAC are design patterns that allow communication between triads and that is via controllers not via models.

The CI db class (a model by another name) is not transferable to a non-CI app. It invokes CI itself.

You can't take CI db and use it willy-nilly. I can't take my model and use it willy-nilly.

Every CI model and class has a context.

Within the context of the CI MVC structure, invoking one model within another is perfectly legitimate and proper.

Man you are getting totally confused.

The db class is not a Model. That's db class has nothing to do with Models. The db class does not invoke CI.

Models should be able to be re-used in different CI applications if they represent their data appropriately.

You are simply attempting to justify yourself now. Sorry man. Good luck with your work.

I didn't say the db class was a model, I said, in abstract, it was a model, that is, it provides a level of abstraction that many models can use.

The point is that to use a model within a model does not violate any good programming sense.

You have yet to demonstrate that it does.

To continue to say so is an appeal to ideology, not practicality.

@wiredesignz in Modular Extensions can you have all the normal folders of an application? i.e. Config,Controllers(yes), Language?

From these posts it appears the only difference between Modular Extensions and Modular CI is MCI allows models to be loaded across applications. Is this correct?

How about we just agree that using either one of these HMVC libraries is a matter of preference. It's the whole Mac vs Windows argument all over again. They both do the same thing (in principle) but have different approaches to achieve the same end goal... HMVC.

@bullspit, Yes language directories in modules are supported in Modular Extensions HMVC. Module structure is the same as in the application directory. The application directory itself is treated as a module and models and other assets can also be cross loaded between modules.

@Vheissu, if you do not care about application performance you can think whatever you like. It's not a matter of feature comparison to me, its a matter of design and speed.

@WanWizard, you still have not answered my previous post directed to you?

The next component of MVC, the model, represents enterprise data and business rules.
It's where most of the processing takes place when using MVC. Databases fall under the model,
as do component objects.

The data returned by the model is display-neutral, meaning that the model applies no formatting.
This way, a single model can provide data for any number of display interfaces.

This reduces code duplication, because model code is only written once and is then reused by all
of the views.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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