REST API, Part 1: Connecting your system to…pretty much anything

RESTful Interfaces break down technology silos

WeGotCode.com is still a very young company – now entering its third year. During that time, we’ve handled a lot of custom software integration projects. This is a typical scenario: a house-build system (could be a web E-Commerce site, desktop application, mobile app) needs to talk to something else (a third-party service provider, a data source, an accounting package.) I’d say within the past two years 75% of our jobs have included this kind of functionality.

I’ve recently implemented these kinds of solutions in PHP, but I don’t think it’s a secret that my favorite framework is .NET. Enter Web API – Microsoft’s current implementation of RESTful interfaces (API). REST is hardly a new idea. It’s been around for years. The acronym stands for “REpresentational State Transfer”. Basically, it encompasses the following: HTTP standards, using specific request types from client to server, and interpreting the response code to determine if the operation succeeded. By using the HTTP verbs (GET, PUT, POST, DELETE, and sometimes PATCH) we can infer what action the endpoint is trying to accomplish (get data, create data, update data.)

The beauty of this solution is that you’re not locked into any particular technology or framework. Use Python, Java, .NET, PHP? They will all play together nicely. Recently I worked on a processing and translation layer that went from Java, through .NET Core, and finally on to a COBOL system. This would have been a nightmare without REST standards. Heck, you can write some jQuery ajax functionality inside a standard HTML page and inject dynamic content into your page – no server-side technology required.

In my next post I will begin an example application showing how to create a REST API in Web API that we can access from client-side code.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.