Yii Framework Forum: Api Driven Application With Many Internal Requests - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Api Driven Application With Many Internal Requests Rate Topic: -----

#1 User is offline   phazei 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 64
  • Joined: 20-July 09

Posted 19 April 2013 - 04:31 PM

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.

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.

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.

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.

#2 User is offline   ezekielnoob 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 15-May 12
  • Location:Philippines

Posted 01 August 2013 - 04:20 PM

i tried some HMVC using yii
this is my workaround for it

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users