trOnGAtE

Isn't this the same as HMVC?
For some of you, HAVC may all sound a little familiar. There's a well known design pattern by the name of HMVC that has been getting used in the PHP community by a significant subsection of developers.
Whilst HMVC is similar HAVC, they are not the same. For instance:
- HMVC does not offer developers a truly modular app structure
- HMVC apps are prone to code repetition - particularly within model files
- HMVC (in its strict form) does not allow modules to be called from view files
Let's imagine that you're building a discussion forum for a web app. Let's further imagine that your discussion forum contains CSS code, JavaScript and even an assortment of icons (in the form of images) to make your pages more interactive and attractive.
HMVC leaves developers in the dark when it comes answering to the question:
'Where exactly are we going to store all of the assets that our discussion forum needs?'
Enter HAVC!
Do you see that little 'A' inside HAVC? Until now, we've been saying that it's for storing 'assets'. That's true and it is. However, for clarity, you can think of the 'A' as being a folder for storing anything.
This means that you now have a folder within each of your modules for storing anything you like. This includes; JavaScript files, images, audio files, CSS files, movies and much more!
As for the 'model'? Trongate has a model.php file. However, it's stored within the 'engine' folder.
And finally...
HAVC has one more trick up its sleeve that you will not find in HMVC.
Modules within HAVC applications can contain... wait for it... other modules!
This means that for the first time, it's possible to have very advanced features (such as an entire online shop, for example) contained within literally one folder. Those advanced features can then, quite literally, be copied and pasted from one app to another. No 'vendor/autoload'. No Composer dot phar. No Packagist.
For the first time, the PHP community has a framework that makes drag and drop web development a reality!
​
HELP & SUPPORT
If you have a question or a comment relating to anything you've see here, please goto the Help Bar.