nova-framework / framework

Demo application using Nova - this is an extensive playground, use "app" repository for real applications.
http://novaframework.com/
MIT License
418 stars 210 forks source link

Overall improvements #2006

Closed LuckyCyborg closed 6 years ago

LuckyCyborg commented 6 years ago

The design became so different of 3.80.70, that it was merged and released as series 4.0.x

Modules and Themes

The Modules and Themes was moved from the app folder and namespace to the root, in their own directories: modules and themes

Every Module now lives in the namespace Modules\ instead of App\Modules\, and a Theme in the namespace Themes\ instead of App\Themes\

Views and Layouts

In the previous implementation, the Themes used to have a specific Layouts and Overrides folders, where was hosted the Layouts and Views overrides.

Now, a Theme use standard Views, hosted in the sub-folder Views, while contains also the Overrides directory, hosting the (optional) Views which are overridden by.

For example, a View instance creation was made using something like:

$instance = View::make('Admin/Users/Edit', $data, 'Users');

In the new design, a View instance creation is made specifying namespaced Views:

$instance = View::make('Modules/Users::Admin/Users/Edit', $data);

In a similar way, for creating a Layout instance, was used something like:

$instance = View::makeLayout('Frontend', 'AdminLite');

In the new design there is no distinct logic for Layouts, as they are just Views, then can be used:

$instance = View::make('Themes/AdminLite::Layouts/Frontend');