When REST Gets Messy
Blog post from Zapier
In the development of Zapier's new Developer Platform, the transition to a RESTful API using Backbone.js highlighted both the strengths and challenges of resource-oriented architecture. Initially, the API design was intuitive, with clear URL structures and HTTP verb mappings, but complications arose when handling interactions that required multiple data requests, leading to compromises such as returning complete data trees for performance. The project also tackled unique challenges like integrating non-database data sources and transforming complex processes, like app activation, into resource-oriented operations. Despite not achieving full RESTfulness, the resulting API successfully facilitated communication between the frontend and backend, proving maintainable and adaptable through subsequent updates. The experience underscored the balance between adhering to REST principles and practical implementation needs, particularly when an internally consumed API requires specific functionality over strict REST compliance.