Some larger projects will have a team of developers doing the front end (html/css) and another team of developers working on the backend (php, the database). When the front end needs to interact with the database, it's often easier to to give them web service that returns the data. The front end developers don't want to know how many tables need to be combined to get the data. They just want the data.

I am frequently both the front end team and the back end team.

Page 1 of 1