Using an API to grow value for your business
We often get contacted by customers who either have a business or are growing their business. The challenge can be the business already have a website, it is appropriate, it works sufficiently for them to at least have a presence online. No customer wishes to throw away a website, yet enhancing their existing one won't be possible. How many customers have asked - I want to add functionality to my website, but website developers tell me it is not possible without a major rewrite.
The client has a website with links, images, and text, that simulates the business needs of the website, but does not provide the quality user experience they require. Almost all website application developers, when asked to implement the functionality, will almost certainly suggest wanting to rewrite website and building the code into this solution. This my sound extreme, but it makes sense in many circumstances. There is a better way though.
Can we give a practical example of choosing an API over a typical website integration?
A client is expanding from B2C, and now wishes to sell large volumes of products online to new customers through a shopping cart. Upon asking their own website development company, and asking another, the suggestions are to rewrite their own website, using an off-the-shelf shopping cart solution. (Note, nothing is ever, off the shelf). The customer seems perturbed at throwing away their existing website, and feels like this is a dead-cost. Their existing website draws existing clients (B2B) and they would not wish to lose that business. Furthermore, the shopping cart solution is not as rich in features for website development.
It would make sense to set up a shopping cart website independently and to then expose those functions to a few pages on the existing website. This would take expertise, but the existing website could largely be retained, and less development and harm within it. The client could either host the shopping cart themselves or use a large market place such as Amazon, Shopify, or nopcommerce.
Integrating an API into your website
An API is what is known as an application programmable interface. For those who are non-technical the way to think of this is a set of actions that can be communicated with to perform a task. When we send an email and make a payment, we expect that supplier to send us goods in response. An API is a way for your website to have; websites, applications, and software, automatically perform similar tasks. An API can be made open to other organisations who may want to interact with your business in some form programmatically. If you are business with a high throughput of goods, you may prefer to allow certain customers to order these goods using software this can save them significant manual. It is worth highlighting that behind every successful API is an effective database.
How would we integrate an API into your website?
We would work with the client to understand their needs and build a common API that returns information and accepts information. We would secure this API. At this point we would test calls to the API returning data.
Options for integration includes;
Your own website development company would then build the client-side code for to interact with the API.
We would work with one of our partners to build the client-side code to interact with the API, either we, or a third party would plug client application into your website.
What about the data?
Once we were happy with the API in terms of how it accepted and returned information, we would then build the database. Decisions on data backups and data recovery would be reviewed at this point.
Are their other elements to be developed?
The beauty of APIs is that behind them, any activities can be by integrated. Emailing, ordering products, sending messages, generating reports, handling payments.
Can you please explain the benefits of an API over developing more functionality within the website?
We can separate to the functionality that can be used on more than the website. We don't need to worry about the API outgrowing the website. We reduce our dependence upon the website development company. We also reduce the amount of code within the website.
Reducing risk - by having an API, the website can be left alone for longer, there should be less code within the website, and this can let experts focus on areas where they are best. Asking a website developer to build a sophisticated API or database may not lead to the best outcome. Importantly, by separating a website from an API we can reduce the load on the website. This allows us to scale out if we wish to add more power to the solution. Finally, we reduce the need to release a new website version each time business functionality is changed in the API.
The most remarkable advantage - to develop a stand alone solution with commercial viability completely outside of the website. We could lease/sell this product out to other companies.
Can an API be integrated into WordPress or other CMS systems?
We are what as known as .Net experts, we work with CMS in dotnet core which is Microsoft based technology. It is perfectly feasible for developers to write client side code and drop that into a CMS system to communicate with external APIs. If you have an existing WordPress implementation, we can work with partners to find a solution.
What are the costs to APIs?
Building code within a website seems like a shorter route to success. This relies upon building business domains (Business Functions) within the website. There are more moving parts to an API, and you will at the very least need one extra hosting package. The cost of this won't be significant, but it is an extra cost. If better security and more scalability is required the costs will increase. In terms of hosting APIs, they can be on a simple web hosting package or on a cloud solutions provider such as Amazon Web Services, Microsoft Azure, or Google Cloud. Again, there are smaller cloud providers who are cheaper. The important thing is not to go in too expensive straight away. An API can be hosted within the website itself.
When should we never use an API?
Or at the very least, be very careful in choosing if to use an API?
If your data usage and applications are predominantly within your own Intranet - i.e. Not externally facing, an API is overkill. Typically, enterprises have large data volumes and APIs are not ideal for moving large amounts of data between systems. Almost always - APIs are the brainchild of a developer who just wants to learn how to write APIs. There is an emerging trend towards microservices, which are a form of API, and there is a strong case for responsibilities and promises within an enterprise being separated.
Final thoughts on APIs for a website
There are many times when an API makes sense for your business. Of course, there are many times when it is not worth the extra effort and obvious cost. If you wish to find out more on APIs and if Info Rhino can help you, reach out to us in the link or complete our contact form - Contact (inforhino.co.uk)
Written with StackEdit.