It depends on what you're building. If you simply want to give the user the ability to send updates to a backend without sending a full request cycle i.e. clicking "thumbs up" on a youtube video and having it update on the page, then yes, thats exactly what ajax is for. I assume you already know some javascript since you're asking about AJAX so I'll recommend angularJS or react as a framework.
If you're building 'real-time' chat you should look into web sockets.
1
28 Nov 2016 03:41
u/bbr
in v/programming
Isn't AJAX primary usage to grab data from an API to prevent another http request? I don't think that can be classified as true 'real-time'
1
28 Nov 2016 03:09
u/bbr
in v/programming
It depends on what you're building. If you simply want to give the user the ability to send updates to a backend without sending a full request cycle i.e. clicking "thumbs up" on a youtube video and having it update on the page, then yes, thats exactly what ajax is for. I assume you already know some javascript since you're asking about AJAX so I'll recommend angularJS or react as a framework.
If you're building 'real-time' chat you should look into web sockets.