title: OO PHP + Ajax without framework
body: <p>I'm going to write a booking website using php and ajax and I really can't figure how to mix these two tools with a strict object oriented design.</p>
  
  <p>I was used to make a call using ajax to a php web page that returns the right set of values (string, xml, json) in a procedural way.</p>
  
  <p>With object oriented programming how is it supposed to work?</p>
  
  <p>The simplest solution that i can think is to call through ajax a php page that should only instantiate a new object of the right class and then make an echo on the result of a simple call with the data received but this doesn't look very oo...</p>
  
  <p>For example to implement the register function I should make an ajax call to a register.php web page that, in turn, will instantiate a new Registration object r and then simply calls r.register() with the right data.</p>
  
  <p>Is there a better solution to this problem?</p>
  
  <p>I want specify that I can't use any php framework because it's a didactic project and I have this rule that I should respect.</p>
  
  <p>Another specification: I've read a lot of tutorials that describe how to write your own mvc framework but doing this seems to be an overkill for my problem.</p>
  
  <p>Thank you for your help, every idea will be appreciated.</p>