Why use AJAX for dynamic web pages when you can do it only with php?
Ajax is just a technology to call server side scripts from Javascript. The server side script being PHP. So, if you intend to use Ajax, you need to know PHP. As for PHP frameworks, its good to build a few website from scratch using PHP to get a better understanding, but eventually, its better to adopt frameworks.
Ajax is a web developer's best friend because it allows lazy loading to be done. Lazy loading is an optimization technique widely used to optimize online content. Ajax lets its users make asynchronous calls without having to reload the entire web page.
1. AJAX is a group of technologies that allows web applications to retrieve data from the server asynchronously; PHP is a scripting language designed to produce dynamic web pages. 2.
Reduce server traffic and increase speedThe first and foremost advantage of Ajax is its ability to improve the performance and usability of web applications. To explain more detailedly, Ajax techniques allow applications to render without data, which reduces the server traffic inside requests.
The main reason to bother with AJAX is User Experience (UX).
Now AJAX won't necessarily improve UX in every single instance so in a lot of places sticking with pure PHP is perfectly okay.
But imagine the case where you have a text field on the site and a link to vote on something. Kinda like this site. When you add AJAX your users won't loose the text they entered in the textfield when they decide to vote on the link! How incredibly useful!
So if you care about your user's experience it is a good idea to use AJAX in situations like that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With