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 tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors 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.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.