I'm creating an internet site that will query an easy MySQL database using AJAX calls to PHP scripts.
I've investigated frameworks which accomplish this but I am searching for a lighter in weight solution and thus am rollign my very own. At the moment I've all AJAX calls striking just one script, which in turn calls further functions in line with the content of Published variables. Individuals functions return objects or throw exceptions, as well as in my primary script I either return a JSON encoded versionof the item or catch the exceptions and return a JSON encoded "error object".
Performs this approach seem ok or otherwise? Otherwise, what's best practise within this scenario?