You can write rich AJAX application only defining php-classes, with a few of methods, such as main (mandatory), input, loading (optionals).