I am working on my own MVC framework in PHP right now. I am trying to figure out how to deal with Ajax requests though...
A page is built using the URI www.domain.com/controller/method/params
So the URI is passed through a router class, that gets the controller and methods + params to use.
This sounds good so far, but I will also have a header and footer, maybe a sidebar even on the actual page and the the MVC will fill the main content part of the page.
When I make an Ajax request though, example to www.domain.com/user/create : controller=user method=create
I would then try to build the whole page again since it is sending a request to my app.
I am confused on how to deal with this properly?