What Structure / Role of a Web Service?

0

I have a project in which I should create a website and an application (Intel XDK) of it, I thought it would be more ideal to have a 'core' of the application itself to do the communication of the database, so on the site just go requesting the data by PHP and in the application request by Ajax.

I know a little about the concept of Web Service, so I understand, Web Service could be this 'core', but I never made one, I do not know the structure of one and I do not even know if that is the purpose of a Web Service .

Would it really be ideal to use it? Or would a Shared Model be better?

I searched a lot about Web Service but I could not understand how it is structured, could someone indicate or show a simple example so that I can start the base of mine?

    
asked by anonymous 15.04.2016 / 06:13

1 answer

1

I do not know exactly what these requests would be, but I think a WebService would serve its purpose.

As the name says a WebService is a service that runs on the Web in order to provide information to all customers who request it. The structure is simple: a server with external access and connection to the other database server. The service runs on the server that can be accessed externally by the specified address and ports. WebService routines receive requests, query the database, package data - usually in JSON - and return it to the client.

There are several examples on the web using SOAP or RestFull technology with PHP, JAVA and others.

See an example here.

link

    
15.04.2016 / 22:23