I'm currently in the process of migrating a site to CI. Our old site had a fairly clever AJAX gateway file that would bootstrap our application and then checks its query string to determine which method was to be run and it would then include some other PHP file that matched the requested method. We have tons of these little method files and they add up to about 8000 lines of code -- which would be a LOT if we try to cram them in some massive ajax controller. I know we can create an ajax directory which contains multiple ajax controllers, but this would require us to painstakingly change a lot of our site's javascript if we have to totally remap all of our ajax urls to some new scheme.
Two questions:
1) If I ultimately determine to retain our old scheme whereby a single ajax gateway interprets the query string and includes some specific method file, where should I put all these files in the CI directory structure? Are they libraries? helpers? Please advise.
2) If there is a compelling reason to gut our existing AJAX scheme and move to some magic new organizational scheme, can anyone suggest to me an effective means of organizing our AJAX files? An important thing to consider is that most of our ajax actions depend on a user's session data, so all of our ajax files need to have a starting point that effectively retrieves this information.