For this week's learning lunch we took a look at the RubyConf AU 2013 Lightning Talks and Active Model Serializers (RailsCasts). The two presentations tied together nicely as one of the lightning talks was on APIs and the RailsCast was on a way to craft them.
An API (Application Programming Interface) is a set of commands, functions, and protocols which programmers can use when building software for a specific system. Crafting your API correctly is the ticket to happiness, success, and general Good Times. Rails is exceptionally good at exposing an API and there are some great gems available to help in this process.
For the recent Gap Filler app we created and documented an API so that anyone could write their own program to use the data. This means anyone interested could easily create, say, an Android app using the same interface our iPhone app does. For Gap Filler we used the RABL gem which uses a view based approach rather than the more object oriented approach of Active Model Serializers. There are strengths and weaknesses to both approaches, but, as always, it's great to have the choice.
Finally, the last thing to think about and one which was highlighted in the lightning talk, is versioning your API. The reason for this is that once you have an API people tend to use them. If you go changing things then you will likely break all the systems which are depending on your API. For Gap Filler itself we did not include versioning from the start, however, were we to extend the API we would certainly add versioning. For a larger project and one which was likely to have an evolving API we would certainly include versioning from the start and yes, there's the versionist gem for that!
Let's work together
Tell us about your project and we'll get back to you shortly.
Join The Conversation
More On The Blog
8 Best Ruby On Rails Gems For eCommerce Applications
Everyone within the eCommerce space knows of Ruby On Rails. This framework is used by approximately 3,866,870 websites right now, showing just how efficient it can be for creating efficient yet beautiful web applications. Now, this unique Ruby-based framework comes with its fair share of add-ons and extra features to discover as well. One of the most important ones is the gems in Ruby On Rails.
Sol Dieguez — Nov 30, 2022
How To Improve Your eCommerce With PHP
With the ever-changing state of the IT industry and the fluctuating eCommerce development trends, it’s more than necessary to be flexible in trying out different tech stacks for your eCommerce site. Now, PHP is one of the most popular programming languages out there, and one with a long-standing track record.
Sol Dieguez — Nov 24, 2022
Tips For Getting The Most Out Of Your AWS Free Tier
This cloud computing service currently has over one million users, with enterprise-scale customers making up about 10% of their clients. This shows just how widely used AWS is and gives a solid reason to try it out: it seems to work for most eCommerce businesses out there. Now, there’s a way to check out AWS for free and see if it works for your online business.
Sol Dieguez — Nov 18, 2022