Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best Practice for when to implement Ajax?

Tags:

ajax

In this Microsoft tutorial they implement Ajax in the final step: "Step 7. Implement Ajax"

I know it's only a tutorial so it's kept simple but I have seen this idea elsewhere too, build the app and then sprinkle ajax where appropriate.

I implement ajax as I go but I am wondering what people feel is a best practice concerning this. Is it best to throw ajax on at the end or should you be implementing it as you go? Anyone ran into trouble one way or another?

like image 579
Keith Avatar asked Dec 14 '22 05:12

Keith


1 Answers

If your core user interactions will rely on Ajax (e.g., Google Docs), then you should implement those bits early.

Otherwise, if your core interactions rely instead on reliably storing and retrieving data, add Ajax last. This way, you force yourself and your team to test your app's behavior as if JavaScript were unavailable on your user's browser. In this instance, Ajax would be an extra layer of user interface goodness.

like image 141
Ron DeVera Avatar answered Dec 30 '22 11:12

Ron DeVera