[size=2]I used to use Yii for my own clients, but the last year+ I’ve been working for a development company that uses Kohana 3.2 for web and mobile development.[/size]
[size=2]There are loads of features I miss from Yii, many of which I’ve ported over and extended. For example, the entire access_rules support, automatic model generation, using ajax to do all form validation using the backend model validation rules.[/size]
[size=2]I want to get everyone to switch over to Yii, and they’ll give it a shot, but I’m not sure how to use it to go about the development model we use.[/size]
We build web, native Android, and native iOS apps. I build the backend API’s for them. Currently we build API’s for everything. We are able to reuse the API’s internally and for the mobile apps. Many of the API’s need to be accessible independently, or together. We have an API congregation helper where we can combine API requests, sending an array with data for X number of API requests at once to save on multiple request overhead. I frequently call the requests internally in the web app controllers, or through other API’s. The API helpers detect content type and automatically encode json/xml when receiving/sending data. We also have a REST helper that will automatically route GET/POST/PUT/DELETE to action_index/_create/_update/_delete.
These API’s help keep everything very dry.
Requests usually go:
API::request("/api/user", "PUT", array("data"=>"and stuff"), array("headers"=>"go here"));
I believe this relies heavily on the HMVC architecture and is what I believe is a very good use case for it.
I realize Yii isn’t HMVC, but was wondering if there was a way to go about building a similar style API driven interface with Yii.