Is it better to send XMLHttpRequests to different scripts or one master script that delegates tasks?
<p>I am building a rather larger web application with javascript and PHP. The app has several different types of XMLHttpRequests, and my question is about best practice: is it better to send each of those requests to a different PHP script or to one master script which then goes through and delegates tasks? </p>

<p>Currently I have a requestManager script, but it's getting a bit out of hand. I feel like it's nice to have all of my requests hit that same script first because It's easy for me to debug and remember where my requests are going. The problem is that I'm looking at around 10 if-then statements, and I can imagine that might start to slow things down as it gets bigger and bigger.</p>
