I am writing a feature for this company, and they want the pages to use AJAX. My question is this: Can I write the pages in php as usual, then enhance the page using AJAX techniques, or is the use of AJAX something I have to keep in mind from the beginning of writing a page?

I ask because I pretty much know everything I need to to write the feature by itself, but I don't know AJAX very well.

Also, for the sake of argument, How difficult would it be to extricate the AJAX functionality from the pages?

If you want to make a full AJAX-supported web application, you should desing the application as considering AJAX is the core engine to handle requests.

AJAX can be used for enhancement of web pages like filling a filling a form with a database search when a select option is selected without refreshing the page. Or it can be used as the base of the application like all data will be accessed via AJAX and applied to web page with javascript.

For all situations I can recommend to design where and how you use AJAX. For the second one, you should desing first then begin to code, I think.

In general, AJAX based web applications use PHP or server-side code to retrieve data for any request that is made by javascript. Data is written into a XML file on fly by server-side code. Then javascript takes this XML file and parse it. Then it manipulates HTML code to show retrieved data. So, you should desing client-side and server-side processes.

There are valid points in this response. You can ignore the use of AJAX technologies designing your page, and then enrich the user experience using more Javascript handled HTTP Requests.

But it is much more sensible to design your new site with AJAX in mind. Building client and server functions that fit seamlessly. The beauty of AJAX is that it can drastically reduce the amount of Data sent through HTTP Requests... so your PHP pages can be much smaller, and perform more specific processes.

To ignore this would be to ignore the strengthes of implementing the technologies.

Hi guys!
I created a control that works like an AJAX container. Basically the way it works is that all the ASP.NET controls that you place inside of the AJAX container will automatically become AJAX enabled.
For example, at the same website where I uploaded the control assembly, I also posted some tutorials on how to use this AJAX container control. One of the tutorials walks you through the steps to create an AJAX chat application. You will see that you can code the ASP.NET controls exactly the same way you do in other regular projects. The controls are placed inside of the AJAX container which turns them into AJAX enabled. This AJAX container also has a property called ShouldRefresh. When set to true, it will update the contents of all the ASP.NET controls inside of the container.
Another tutorial that I also posted at http://www.KYNOU.com shows you how to use this AJAX container control to add three dropdownlists onto a web form and make sure that their contents get populated depending on the picked value in the previous dropdownlist. Something like an auto dealer website where you can choose the make and then the model dropdownlist gets populated according to the picked make. This tutorial shows you how to do that with three dropdownlists but you could have unlimited number of dropdownlists.
I uploaded this control and posted some walkthrough tutorials at http://www.KYNOU.com
Check it out!