DEV Community

Cover image for Function Centric Services
Cielo Raymundo
Cielo Raymundo

Posted on • Edited on

Function Centric Services

Function Centric Service is one of the main styles of web services, the other is Resource Centric Service. But what exactly are web services?

Web Services:

Services available through the web that create connections between entities (ex. client and server) to make sure they can communicate with each other, by handling the logic on how to interact/communicate.

Function Centric Services:

The basic concept is that by using function centric services you are able to call functions or objects methods on remote machines without needing to know information on them.

Actually trying to implement this in the real world was hard, even though it seems so simple. Since it had to be implemented across programming languages, everyone had to agree on a strict and precise way of passing arguments, converting values, and handling errors. In order to solve these problems function-centric technologies started to rise.

SOAP:

With time SOAP became the most popular one. SOAP stands for Simple Object Access Protocol. The most common way to implement it is by using XML to describe and encode messages. The http protocol transports requests and responses between clients and servers. SOAP allowed web services to be discovered and allowed integration code to be generated based on contract descriptors.

In an integration of SOAP, the web service provider exposes a set of XML resources, like Web Service Definition Language files that describe methods, endpoints and definition of data structures being exchanged with the XML Schema Definition (XSD). All these resources put together become the contract of the web service.

As SOAP progressed there were new higher level features being added, these unfortunately came with a price. Integrating different stacks became difficult since different providers had different levels of support for web services specifications.

JSON:

SOAP was too complicated and expensive to implement there was a need for an alternative. JavaScript Object Notation (JSON) based Representational State Transfer (REST) services started to gain popularity.

It is easier to understand and for machines to parse and generate. JSON will allow developers to implement communication how they want without its standards stopping them.

Top comments (0)