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?