Restful API and View Component

Hallo everybody

Is there an approach or a documentation how to use the created an Restfull API in Yii 2.0 with the Yii View Components without to use any other Framework like ember.js or Angular for the frontend?

The background is this:

  • we builded an api for our clients to access our web application of our restful api. the clients get always json reponses back.

now we want to use our api also in our web application but with the construct of yii. this means we would like to use this api which is also build in our yii web application for our own frontend without to use ember.js or angular etc.

is there already an existing solution in yii 2.0? or maybe planned for next releases?

thank you and best regards

cihan

I haven’t tried this, but since you are testing REST, I think the best way would be to create a separate Yii application and have it fetch data from your main application.

I would be surprised if Yii2 didn’t support that out of the box, or at least in a manageable way.