The question is whatever we prefer plain simple templates vs package inheritance. For example, yii-base-web will magically add some routes and their implementation to the application. yii-base-cli will add some console commands etc. In order to remove/adjust these you’ll have to override some configs.
I can see already questions, how can I enable cli in in my base-web, or how can I enable web in my cli?
If its possible to make it “combined” … would be nice.
We could move on with generator approach. Then we could have one template, which is almost empty by default, but could easily generate endpoints using command line (provided by separate package). Like vendor/bin/yiiapp web frontend generates web endpoint under fronted directory and vendor/bin/yiiapp rest api will generate REST API endpoint under api directory. It could be even extended to use community templates (vendor/bin/yiiapp rob006/fancy-web-template fronted).
Yes. That is possible as well and that’s actually how current template is built. But it seems it leads to no good in our case because it seems to be very confusing.
By newcomers - most welcomed would be the simplest possible “Hello world” template - just quick setup, low learning curve.
By experienced devs more complex template would be most likely preferred - learning how to solve complex implementation issues (rbac, gii, multisite, design becakend/frontend, widgets, cron …).
The idea of template configurator is great, though may be hard to implement & maintain.
You should be able to use the project-template and create a basic-project-template from it and commit that again to another repo, which is effectively a fork.
I am not sure what you mean by “demo” - will there be Yii3 demo online with github repo … ? If so, then yes, it would suffice. Actually it’s good idea - adding examples of complex implementations in a one place. One could clone fork git repo as a “new project” and also provide back PRs, if needed.
But there has never been any demo for Yii1 nor Yii2 by now so the concept is new to me.
yii-base(s) are intended to be used as composer dependencies (at least at this point). I’m proposing automated copy&paste to interactively generate application starter adapted to specific needs. You can always add another endpoint (like API) to your app, but after that it is all yours.
I want to work on them, like with yii2-app-advanced. The point its that if I need only frontend, console, and api, I need to remove unused parts from yii2-app-advanced and add missing ones. I after 6 months I need to add backend endpoint, I need to do that manually. With the generator approach, this could be automated - I could choose which endpoints want to use in the starter and add new in the future in the same way.
Question is just one. My company and i use yii2-app-advanced with backend/frontend architecture always. How to implement same architecture with any of the new templates (web/api)?? Thanks
Используем yii2-app-advanced для проектов внутри компании, как реализовать архитектуру с backend/frontend на базе нового Yii3, возможно примеры есть уже ? Спасибо!