Home Developer Discussion: What Do You Use For AJAX in PHP?

Developer Discussion: What Do You Use For AJAX in PHP?

A quick question with a potentially longer discussion. What do you use for AJAX in PHP, and why?

XAJAX is a simple way to do it, and this is the approach I’ve been using for some time. In very simple terms, you write PHP methods that can be called from JavaScript by prefixing the method name with xajax_.

jQuery on the other hand has a number of API methods so you can do all your AJAX within jQuery, without the need for XAJAX.

Using both jQuery and XAJAX together is possible, although it can take a bit of trial and error to get them working correctly.

Have you used either of these approaches? Have you had problems with combining multiple frameworks? Can you recommend any alternatives?

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the gambling and blockchain industries for major developments, new product and brand launches, game releases and other newsworthy events. Editors assign relevant stories to in-house staff writers with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.