Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Articles Tagged ‘api’

What are SOAP APIs used for

Wednesday, November 9th, 2016 by Servage
SOAP-APISimple Object Access Protocol (SOAP) is not as popular as its counterpart REST. However, there are some cases where a SOAP API is preferred over REST. What kind of services might benefit from having a SOAP API instead of a RESTful one? We will find this out by getting familiar with the pros and cons of SOAP. Advantages of SOAP Unlike REST, SOAP is a protocol. SOAP defines its own standards, for example how messages are constructed and processed. Messages in SOAP are sent as envelopes that contain the body of the message and some metadata, such as headers. One of the advantages of SOAP is that these messages can be sent over ...

Best practices for designing a REST API

Saturday, October 22nd, 2016 by Servage
restThanks to things like the Internet of Things, Application Programming Interfaces (APIs) have become a big part of the internet. In addition to this, many applications allow other applications to integrate with them. Both of these features often happen using an API. Understanding how APIs work, and even better, understanding how to design them, is a valuable skill. So, what makes a good REST API? Resource names One of the first questions that comes to your mind when designing an API is probably this: What should a URI look like? A URI is the address to a resource, such as a user account. A URI might look like this: “/users/1/products/2”. Should these resources ...

The logic of Angular JS web applications

Saturday, November 7th, 2015 by Servage
angularMany developers new to Angular JS (or client-side Javascript development in general) are often struggling a bit with the understanding of the conceptual logic behind the development workflow and how things work together. Especially developers used to traditional server-side rendering will have to completely change their mindset. API-based The first thing to really understand is that client-side Javascript development is essentially an API-based development, because you are building a stand-alone Javascript application for the browser, which relies on data endpoints on your server. Essentially this is the same way of thinking when building native apps, or any other integrations. Forget about a traditional request which triggers a server-side script, which then renders and returns a ...

Enrich your website with data from other services

Thursday, March 12th, 2015 by Servage
apiWhen novice web developers are confronted with the process of Application Programming Interfaces, the reaction is often a feeling of being overwhelmed - both with possibilities, but also with complexities. Understanding and utilizing the power of regular script based interactions between web server and database to render a meaningful HTML output is already pressing many hobby coders to the limit of their understanding. Illustrating interactions between multiple servers through APIs is adding to that complexity, and understandably often creating a reaction of confusion or uncertainty how these services interact technically. The purpose of this post is to demystify the API term, and explain in simple terms how a typical API interaction ...

Talking about Google APIs for websites

Monday, July 1st, 2013 by Servage
Our historical journey on the web is awesome; first local to global and now global to local! Yes, online businesses now concentrate on localizing their services by providing accurate local information, including use of maps from Google map services. As a web designer, if you want to integrate Google maps or use Google APIs in your project you should consider this article about the Google APIs first. Google API is simply the most popular and powerful JavaScript libraries on the internet, used by more than 350,000 websites. It is absolutely free for moderate to low level traffic websites, resulting in a wave of map mash-ups in all kinds of websites. From ...

Using the Google Geolocation API

Saturday, May 4th, 2013 by Servage
At heat of every location based application is positioning and geolocation. In this tutorial we would use the geolocation API that will help you locate the area on the map but also it would suggest and provide the user the user with links to the areas with the same or like names. So first we are going to set up our java script with in the head tag. This API allows us to make use of the J-Query <div> <h1>J-Query API</h1> <p> <script   src=""></script></p> </div> Next we introduce the Google geolocation API <div> <h1>Geolocation API</h1> <p> <script src="" type="text/javascript">></script> </p> </div> Next with in the body tag we define our search function <div> <p> <script type="text/javascript"> function search() {$.getJSON('' +  $('#q').val() + '&maxRows=10', function(data){  $.each(data.geonames, function(i,item){$('<a/>') .attr('data-lat', ...

REST principles explained

Monday, April 8th, 2013 by Servage
The term “REST” was coined by Roy Fielding in his Ph.D. dissertation: to describe a design pattern for implementing networked systems. Fielding is one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification versions 1.0 and 1.1. "Representational State Transfer is intended to evoke an image of how a well-designed Web application behaves: a network of web pages (a virtual state-machine), where the user progresses through an application by selecting links (state transitions), resulting in the next page (representing the next state of the application) being transferred to the user and rendered for their use."  - Roy Fielding The motivation behind the development of REST was to create ...

Using the Flickr API in Javascript

Thursday, April 4th, 2013 by Servage
This is a little playtime with the Flickr API for Javascript coding :-) Flickr supports a lot of API including to view images, to search image which I am going to use in this tutorial. For further details on Flickr APIs check Today what I am going to do is write a small code allowing us to search for images using Flickr API’s based on the specific tag word entered by the user. So first we are going to see how we are going to set up our java scripts with in the body tag. This API allows us to make use of  jQuery <div> <h1>jQuery API</h1> <p> <script src=""></script></p> </div> Show a ...

Embed shared links with live preview

Saturday, January 19th, 2013 by Servage
Have you ever wondered how social media portals create the smart Share-a-link functions, where you get to see a little preview of the page you want to share? It's actually very nice functionality and clever as well. Thankfully such an implementation is not as difficult as you might think. Basically you can circumvent most complexities by using an embed-provider like - who takes care of the difficult part. How does it work? You build your own sharing interface in your web app, but behind the scenes, you request to scrape the posted URL, and it will return with a set of information about the page, which you can use in your ...