SL realtime web app | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

SL realtime web app

hello fellows, i already seen an example with NodeJS & Socket.io and others but is it possible to implement a simple realtime web app (ex. weather) in SL playground? thanks in advance

11th Aug 2018, 11:37 PM
Alfred
16 Answers
+ 5
thanks guys, but do u have any example of that? Janningā­ i failed to see realtime update with JavaScript in ur Ajax Test web code
12th Aug 2018, 6:25 AM
Alfred
+ 3
yup and I tried several solutions too, found them from websites & executed from my pc browser, yet none of them works either in SL playground nor W3schools TryIt... However, it does work if I save and run them in an HTML file. why can this be?
12th Aug 2018, 6:00 PM
Alfred
+ 1
If it's resource intensive and SoloLearn has a large user base, I think the logical conclusion would be that implementing such a feature would not be a sustainable business decision in the long run. That being said, a weather app doesn't have to be real-time in that it opens up a direct connection to the server -- just have it pull new info on refresh.
11th Aug 2018, 11:47 PM
Janningā­
Janningā­ - avatar
+ 1
It's possible s/he could be talking about JavaScript, but s/he already uses JavaScript in the Code Playground and the question was about real-time web apps (I thought).
11th Aug 2018, 11:55 PM
Janningā­
Janningā­ - avatar
+ 1
Website and web app are technically different. https://www.quora.com/What-is-a-real-time-web-app
11th Aug 2018, 11:58 PM
Janningā­
Janningā­ - avatar
+ 1
Janningā­ that sucks :/ i cant think for any other ways
12th Aug 2018, 12:21 AM
GoodOldTimes
GoodOldTimes - avatar
+ 1
Yeah, I feel you. It's rough. I think the Code Playground is really great for testing out small things and showcasing snippets, but not ideal for substantial projects (although I very much admire the amount of code some SoloLearners have been able to cram into some of their projects). Still grateful for having it though! šŸ˜Š
12th Aug 2018, 12:31 AM
Janningā­
Janningā­ - avatar
+ 1
See my first comment? (You might have to Tap to Load More at this point.) I've found that w3schools TryIt is more broken than Code Playground.
12th Aug 2018, 8:44 PM
Janningā­
Janningā­ - avatar
0
use intervals for updating maybe?
11th Aug 2018, 11:43 PM
GoodOldTimes
GoodOldTimes - avatar
0
Janningā­ i think hes talking about js and js runs on client side so i dont think it would hurt sololearn
11th Aug 2018, 11:50 PM
GoodOldTimes
GoodOldTimes - avatar
0
Janningā­ you can definetly make a real time website with javascript im sure about that
11th Aug 2018, 11:57 PM
GoodOldTimes
GoodOldTimes - avatar
0
Janningā­ i know, the thing i was trying to explain wasnt that I mean, I was trying to explain you can make a real time app in sololearn with javascript, when i said website i was talking about web codes
12th Aug 2018, 12:01 AM
GoodOldTimes
GoodOldTimes - avatar
0
No problem. When you say real time, what's your alternate definition?
12th Aug 2018, 12:03 AM
Janningā­
Janningā­ - avatar
0
Janningā­ i mean you can make connections with ajax in js and set an interval for auto-updating
12th Aug 2018, 12:06 AM
GoodOldTimes
GoodOldTimes - avatar
0
AJAX requests in Code Playground error out on my phone, but maybe your platform supports them? https://code.sololearn.com/WSnE0qBz81Ek/?ref=app
12th Aug 2018, 12:16 AM
Janningā­
Janningā­ - avatar
0
Amirreza Odoumi, the point I was trying to make with the code sample is that real time updating doesn't work in Code Playground.
12th Aug 2018, 7:23 AM
Janningā­
Janningā­ - avatar