CI as a REST API? |
I am coding a REST API using the SLIM Framework.
I am about 30% done of the first cut of the API. But .... I am finding it a hard slog and I know CI so much better. Has anyone used CI as a REST API? I know CI could do this job by my real question should it do it? Or should I just suck it up and get the Slim thing working? Any guidance from experienced folks with strong opinions is welcome!
I am using a CodeIgniter controller base class called REST_Controller to create APIs. Check out:
https://github.com/chriskacerguis/codeig...restserver It was originally created by Phil Sturgeon, he write some blog post about it for example: https://philsturgeon.uk/codeigniter/2009...deIgniter/ (10-09-2015, 03:37 PM)orionstar Wrote: I am using a CodeIgniter controller base class called REST_Controller to create APIs. Check out: That is really really exciting and pretty much exactly what I am looking for. Have you noticed any speed problems?
I have a pretty old version of this controller in my CMS, maybe 2-3 years old one, so I don't have experience with the current content of the repository. With the old one, we never had performance or any kind of problem in the last ~3-4 years or so...
Many thanks orionstar.
If it is easier to code for me and performance is not an issue I'm happy enough!
CodeIgniter is not yet suitable for building REST services and a package can only do so much. I'd stick with Slim for that task.
Easy (and you really mean "familiar" here instead) != Proper. (10-09-2015, 04:50 PM)Narf Wrote: CodeIgniter is not yet suitable for building REST services and a package can only do so much. I'd stick with Slim for that task. Can you explain what is the "proper" way? Is it really matter, a feature supported out-of-box or with a library?! (10-09-2015, 04:50 PM)Narf Wrote: CodeIgniter is not yet suitable for building REST services and a package can only do so much. I'd stick with Slim for that task. What makes CI not suitable for REST services? (and yes famililar != proper - I agree!)
It's not a matter of whether you use an external library or a built-in one, CI is just made for web pages and doesn't give you control over low-level HTTP functionalities.
(10-10-2015, 02:29 AM)Narf Wrote: It's not a matter of whether you use an external library or a built-in one, CI is just made for web pages and doesn't give you control over low-level HTTP functionalities. I've been using CI as API Rest and I'm very happy with it. I'm curious about the low-level HTTP functionalities you mention. Off topic: This is my first post in the forum |
Welcome Guest, Not a member yet? Register Sign In |