Where should my called AJAX file be residing in a typical PHP MVC framework?
It’s logic, so I’m assuming the models folder, but at the same time it’s acting as part of the controller functions?
Thanks!
Thanks for all the responses, particularly zerkms.
JS will form part of the view, which will AJAX request a URL. The URL will be an independent controller (possibly an AJAX controller in itself) which will provide the JS with it’s datasource.
It’s presentational logic, so it belongs to presentation,
Viewpart.Whereas
Modellayer represents business logic.