Tips for building my first API in CodeIgniter [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this questionI'm planning on building a private A开发者_开发百科PI for a CodeIgniter web application I have. I've found a tutorial for that which shows me how to do it using pre-built libraries.
I'm very new to this so my questions is: shall I use and rely on these libraries? or shall I learn how to build it from scratch in order to have complete control over it? also, do you have any tips of someone like me who's just getting started with APIs?
Of course it's up to you but I would really suggest using my libraries. The code has already been tried and tested by several large public web-apps and I recently added in key management, logging and request throttling.
Months of coding has gone into those libraries and they have been used to death, so it will be way easier that writing your own.
Just have a look through the code as you go so you understand how everything works. It's pretty flexible and getting more flexible as it goes.
When I decided that I was going to write an API, I was still in the early stages of learning CodeIgnitor so I didn't use it for developing the API. I think even now, I would probably still go the route of writing it all myself and not use a framework. This is mainly because I like to keep things as slim as possible and I feel that is more likely to happen without using a framework.
To get me started, I found this tutorial to be really helpful.
精彩评论