Yii2 which version choose, basic or advanced my test article
Posted 06 March 2017 - 06:06 PM
The basic does indeed have a console end, so you are wrong there.
The basic is a great starting point for all Yii 2 applications, except those very few that actually need two separate applications (frontend/backend).
I am using the basic application template for 99% of my Yii applications.
Including many with admin functionality.
That you need two separate applications to have a backend is wrong!
Because, and I think it's better in almost all cases, you can use a module.
So, the difference between basic and advanced is only this:
Basic -> one application.
Advanced -> two applications with shared code.
What I've found is that advanced application template will give you a lot of complexity compared to the basic application template.
And it does not really offer any advantages.
I am building several big and advanced projects based on the basic application template.
Can't really think of any reasons why anyone would use the advanced template.
Other than maybe that they don't want to use a template which name is "basic"
Posted 06 March 2017 - 06:18 PM
Yes, I know that all of us really want to be using the 'advanced' application template, simply because it sounds better than 'basic', right?
Sorry for the rant.
Posted 07 March 2017 - 03:25 AM
But you look at it as someone with advanced knowledge. I would want to approach this issue from the side of someone for the first time faces a choice.
The aim of this article was to show that the choise of Yii 2 Basic Application Template(that I missed). is often a better choice.
Posted 07 March 2017 - 04:35 PM
You can still consider that change is to small. But I'll wait with further changes to the time to get a new level.
Posted 20 March 2017 - 06:55 PM
It was not that hard to create a pseudo backend with an admin module, using RBAC to control access. Doing it this way solved a lot of problems by not creating the problems in the first place like, "How do I get it to redirect to the Home page of the frontend when I log out of the backend?", and other similar issues.
I wound up having to co-opt the User MVC from the Advanced into my Basic app, which they should do with the basic out of the box anyway, in my opinion. The docs tell you why you should replace what they give you (demo-demo, admin -admin), and what to replace it with, which turns out to be what they give you in the advanced version.
Posted 21 April 2017 - 11:24 AM
However, if you build MVC triads as self-dependent modules (i.e., as self-dependent as possible) it's fairly easy to switch between the basic, advanced or custom templates if you always store your shared files in a common directory. That is, make the modules as reuseable as possible without breaking Dry and Kiss principles. Modules can have their own config files, message files, custom components, etc. Using a common directory with the basic template makes it possible to switch between templates easily because the base URLs and paths for common files are standardized. This avoids changes to the use statements in the various module files. For basic, this involves introducing the bootstrap.php from advanced. I can think of a few other approaches to achieve the same code reusability requirements (e.g., composer).
To make modules as independent as possible, it makes sense to incorporate the admin MVC triads into the module within the directory structure or as a nested submodule. Then access those triads through your menu routes or other navigation system.
In any case, I think of the basic and advanced templates as example templates. It's fairly easy to modify the basic and advanced templates to create custom variants. Yii pretty much lets you build custom templates to suit your needs and wants.