 <p>How about every ajax call has an id (which you should document in some way if you have a lot of them) and all the handlers are in one file with a huge ass switch case loop.Or if it's gonna be a big file maybe organise them in a few files - id 3001, 3002, 3003 form submits go to formHandler.php id 4001 400n go to layout system and so on.</p>