+ 4

Is it possible to create a messaging app without ajax??

I mean loading messages without continuously without page reload.

13th Jun 2020, 1:16 PM
Wasi
Wasi - avatar
15 Antworten
+ 5
You can do it with polling too (using cookie for "identify" the client) but its very "old" style, very inefficient today and give many problems to mnage. Websockets are a good way to handle the problem then, me too suggest use them. Personally i developed 2 systems for messaging and notifications for my company (first in nodejs/web and other in fully java) and either works very well
14th Jun 2020, 6:20 AM
KrOW
KrOW - avatar
+ 8
Yes you can. You must use preventDefault(). Some elements like the form element automatically refresh the page on submit. Ajax is not a programming language. It is Asynchronous JavaScript And XML (more a technique). A WebSocket is a persistent connection between a client and server. So if you want to create a messaging app like Whatsapp you will need to use a Websocket to listen for messages and some asynchronous javaScripting. The easiest way is to use something like firebase firestore that has real time data updating and listening capabilities built in.
13th Jun 2020, 2:58 PM
Ryan Els
Ryan Els - avatar
14th Jun 2020, 5:56 AM
Calviղ
Calviղ - avatar
+ 3
mostly its good idea to use web RTC provided by web and websockets for chat apps.. or you can also use firebase ... [i haven't tried firebase so cant say about its performance] ajax is really an bad idea if you want to make chat app with it cuz its only single directional and works on http...
14th Jun 2020, 6:11 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 2
As Lily said. Sockets are the only option.
13th Jun 2020, 2:13 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 1
websocket
13th Jun 2020, 1:24 PM
durian
durian - avatar
+ 1
Okay . Thanks a lot
14th Jun 2020, 7:57 AM
Wasi
Wasi - avatar
+ 1
نتتتت
14th Jun 2020, 8:47 PM
محمد عبدالله ابوعمود
محمد عبدالله ابوعمود - avatar
0
Which should i use ajax or web socket
13th Jun 2020, 2:15 PM
Wasi
Wasi - avatar
0
Okay which framework i should use. I know: Django Node Deno Spring If these are not so good for chat apps or social sites than suggest me other framework. I will learn that.
14th Jun 2020, 7:36 AM
Wasi
Wasi - avatar
0
I dont know Spring, Deno and Django then i can only suggest node 😉
14th Jun 2020, 7:43 AM
KrOW
KrOW - avatar
0
Which frontend should i use? [ I don't know any front end framework but i'll learn soon ]
14th Jun 2020, 7:45 AM
Wasi
Wasi - avatar
0
I have not very much knowldgment of fully web front-end frameworks. I usually use Vue because is really light for my needs
14th Jun 2020, 7:50 AM
KrOW
KrOW - avatar
0
Wasi You are welcome 👍🏻
14th Jun 2020, 8:01 AM
KrOW
KrOW - avatar