What about API centric apps?


Now I am doing an API centric app, I am using Yii2 to create the API but I don’t understad the need to have folders like vendor/bower-asset/jquery, because I don’t need to use assets, forms, widgets, jquery, etc. Is there any way to avoid this?

BTW, I would like to see for Yii2 similar tools as Loopback or Strapi have. The APIs have a great projection.


Zorobabel, yes. jQuery could be avoided by using "provide" in composer.json.

We plan making core smaller in the next major versions. Also we’ve checked Loopback and think it’s a good idea to have something alike.

Great, sorry but could you give some example of this?


Good news, we need to celebrate! LoL

@samdark, thanks for your help.

"provide": {

        "bower-asset/jquery": "2.1.*@stable | 1.11.*@stable",

        "bower-asset/jquery.inputmask": "3.1.*",

        "bower-asset/punycode": "1.3.*",

        "bower-asset/yii2-pjax": ">=2.0.1"


@samdark, thanks for your help, as always your are a great teacher ;)

There is also deployd. I like the idea to use it as a fake api. it is very easy to use. it allows me to concentrate on frontend only (so I don’t end up writing a javascript console.log inside an ActiveRecord class). you can easily alter your resources structure, add fake data… when frontend is done and my resources structure is clear I go to design database and replace deployd by a Yii app. restructuring the app based on resources as a first step instead of altering database and models is much easier when doing REST.

@salem, thanks for the hint, I’ll check it too!