Monday, 15 February 2010

codeigniter - Controller methods VS api methods -



codeigniter - Controller methods VS api methods -

i have controller send send message site:

example.com/contact/send-message

ok here, in api i've created same method:

api.example.com/contact/send-message

in api should maintain same method , phone call method within controller? when should utilize controller methods or api methods?

by means, separate api logic web application logic. 1 used via web browser, , other 1 interface other software. each of them solves different problems.

use fat model, thin-controller approach. meaning info processing methods should placed in model, not in controller. there, can phone call methods either api controller, or web controller.

an first-class plugin build restful api phil sturgeon's rest server

codeigniter

No comments:

Post a Comment