SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 29/03/2018, 12:51 PM   #11
BroZeus
High-roller
 
BroZeus's Avatar
 
Join Date: Jan 2014
Location: India
Posts: 1,408
Reputation: 173
Default Re: node.ucp - A full-fledged isomorphic UCP [nodejs + reactjs]

Quote:
Originally Posted by Y_Less View Post
Well I just get stuck on that splash page. The pages are there underneath, but I have to manually delete the div to see anything interesting.
I didn't think that anyone at this time and age would have javascript disabled, my main purpose was to target crawl bots with isomorphism. If however, there are people out there who still does this, I will modify the app to do cookie authentication on serverside as well.

EDIT:
Quote:
Originally Posted by Y_Less View Post
I didn't look much further, since I have to redelete the div on every page, but the properties page is just a grey box with a spinning box - so that information isn't pre-rendered whatever its meant to be (and I checked the DOM this time).
The properties page doesn't actually have text and only just a ****** map so there was no use targetting it for crawl bots so I decided not to render it on server-side. Only the properties page and the protected routes(which requires you to be logged in) are not rendered on server-side.

Quote:
Originally Posted by Y_Less View Post
And the `top list` link doesn't work at all (especially when you try open it in a new tab).
The top list link is associated with a dorpdown kind of list, it opens with the help of javascript, maybe thats why its not working for you.


Do you actually have javascript disabled? If not, then can you tell me the browser and the browser version you are using.
__________________


"Be the change that you wish to see in the world."

Check out my Github profile!
BroZeus is offline   Reply With Quote
Old 29/03/2018, 01:09 PM   #12
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 15,317
Reputation: 3191
Default Re: node.ucp - A full-fledged isomorphic UCP [nodejs + reactjs]

Yes: Firefox 52 (ESR) with NoScript.
Y_Less is offline   Reply With Quote
Old 29/03/2018, 01:25 PM   #13
BroZeus
High-roller
 
BroZeus's Avatar
 
Join Date: Jan 2014
Location: India
Posts: 1,408
Reputation: 173
Default Re: node.ucp - A full-fledged isomorphic UCP [nodejs + reactjs]

Quote:
Originally Posted by Y_Less View Post
Yes: Firefox 52 (ESR) with NoScript.
I tested it with NoScript the issue was that the UCP domain was not on the trusted site so it blocks the cookie authenticating call to API and hence the splash screen on the start never disappears. The go0gle map api is getting blocked for the same reason and hence you cant see the go0gle map on properties page.

I never used NoScript so I wasn't aware of what it does, I will shift the authenticating to server-side on this weekend and then the problem should be fixed, however, you have to add the domain maps.******.com to your trusted site list in NoScript for properties page to work since ****** maps ToS prevents me from hosting the API on my own site or pre-rendering it on the page.
__________________


"Be the change that you wish to see in the world."

Check out my Github profile!

Last edited by BroZeus; 29/03/2018 at 02:48 PM.
BroZeus is offline   Reply With Quote
Old 29/03/2018, 01:28 PM   #14
[cS]Owain
Big Clucker
 
Join Date: Dec 2010
Posts: 81
Reputation: 15
Default Re: node.ucp - A full-fledged isomorphic UCP [nodejs + reactjs]

omg thats me but good job zeus =)
__________________


Running Since 2010

IP: play.exmserv.me:7777
Website: exmserv.me
[cS]Owain is offline   Reply With Quote
Old 29/03/2018, 01:58 PM   #15
CoaPsyFactor
Gangsta
 
Join Date: Jul 2010
Location: Belgrade, Serbia
Posts: 904
Reputation: 52
Default Re: node.ucp - A full-fledged isomorphic UCP [nodejs + reactjs]

Quote:
Originally Posted by Y_Less View Post
Yes: Firefox 52 (ESR) with NoScript.

How do you expect javascript framework to work with javascript disabled?
Please try using youtube, ********, ****** or any web application with javascript disabled, and tell me what do you see?

Server can provide HTML, but client cannot "hydrate" dom, as JS is disabled....
__________________
Quote:
Originally Posted by ThaiLuan View Post
Code:
C:\Users\Administrator\Downloads\Viet-RP\gamemodes\3mien.pwn(112016) : fatal error 101: cannot write to file: "disk full"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Help me! How to fix error
CoaPsyFactor is offline   Reply With Quote
Old 29/03/2018, 02:16 PM   #16
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 15,317
Reputation: 3191
Default Re: node.ucp - A full-fledged isomorphic UCP [nodejs + reactjs]

Quote:
Originally Posted by BroZeus View Post
I tested it with NoScript the issue was that the UCP domain was not on the trusted site so it blocks the cookie authenticating call to API and hence the splash screen on the start never disappears. The go0gle map api is getting blocked for the same reason and hence you cant see the go0gle map on properties page.

I never used NoScript so I wasn't aware of what it does, I shift the authenticating to server-side on this weekend too and then the problem should be fixed, however, you have to add the domain maps.******.com to your trusted site list in NoScript for properties page to work since ****** maps ToS prevents me from hosting the API on my own site or pre-rendering it on the page.
Thanks, I'll check it in bit.

Quote:
Originally Posted by CoaPsyFactor View Post
How do you expect javascript framework to work with javascript disabled?
Please try using youtube, ********, ****** or any web application with javascript disabled, and tell me what do you see?

Server can provide HTML, but client cannot "hydrate" dom, as JS is disabled....
This is advertised as "isomorphic" - that means the same jS can be run on the server or the client. So you shouldn't need client-side JS because the server renders everything and sends full HTML.

Many websites work without JS, and if they don't, they should do. Starting with content, then HTML, then CSS, then JS, is basic web best practice, and always has been - that's how you write a site that works on any browser by default, instead of requiring your users to be on Chrome Canary so that you can exploit the latest battery level API...

However, you mentioned "web application". In my mind, that is something that requires constant input (such as a game), or provides constant output (such as a video). If change is fundamental to a things being, then yes, you need the part of web tech dedicated to change - JS. However, if your "web site" is constant (i.e. doesn't need to do something every few seconds or faster), then it doesn't need change code does it? Blogs - static, forum - static (I've been on this one page a few minutes now), even a UCP is mostly static (maybe not a real-time map, but changing settings, viewing stats, those don't need sub-second updates).

So technically you're right, most "web applications" I am forced to whitelist things for, but for "web sites" I refuse (and complain a lot to people when they don't work properly).

Edit: Even a map can be done server-side with last known co-ordinates. The data might not be up-to-the-second accurate, but dynamicisim is not fundamental to the operation of a map (as proven by the fact that we can print them on paper).
Y_Less is offline   Reply With Quote
Old 29/03/2018, 03:04 PM   #17
Marricio
Gangsta
 
Join Date: Dec 2010
Posts: 753
Reputation: 96
Default Re: node.ucp - A full-fledged isomorphic UCP [nodejs + reactjs]

Quote:
Originally Posted by Y_Less View Post
Thanks, I'll check it in bit.



This is advertised as "isomorphic" - that means the same jS can be run on the server or the client. So you shouldn't need client-side JS because the server renders everything and sends full HTML.

Many websites work without JS, and if they don't, they should do. Starting with content, then HTML, then CSS, then JS, is basic web best practice, and always has been - that's how you write a site that works on any browser by default, instead of requiring your users to be on Chrome Canary so that you can exploit the latest battery level API...

However, you mentioned "web application". In my mind, that is something that requires constant input (such as a game), or provides constant output (such as a video). If change is fundamental to a things being, then yes, you need the part of web tech dedicated to change - JS. However, if your "web site" is constant (i.e. doesn't need to do something every few seconds or faster), then it doesn't need change code does it? Blogs - static, forum - static (I've been on this one page a few minutes now), even a UCP is mostly static (maybe not a real-time map, but changing settings, viewing stats, those don't need sub-second updates).

So technically you're right, most "web applications" I am forced to whitelist things for, but for "web sites" I refuse (and complain a lot to people when they don't work properly).

Edit: Even a map can be done server-side with last known co-ordinates. The data might not be up-to-the-second accurate, but dynamicisim is not fundamental to the operation of a map (as proven by the fact that we can print them on paper).
You've caught my attention. What's the best way you can think of for building an isophormic application? I've been writing one the past few weeks but I'm having very serious doubts about the way I have been implementing javascript.
Marricio is offline   Reply With Quote
Old 29/03/2018, 03:54 PM   #18
CoaPsyFactor
Gangsta
 
Join Date: Jul 2010
Location: Belgrade, Serbia
Posts: 904
Reputation: 52
Default Re: node.ucp - A full-fledged isomorphic UCP [nodejs + reactjs]

Quote:
Originally Posted by Y_Less View Post
Thanks, I'll check it in bit.



This is advertised as "isomorphic" - that means the same jS can be run on the server or the client. So you shouldn't need client-side JS because the server renders everything and sends full HTML.

Many websites work without JS, and if they don't, they should do. Starting with content, then HTML, then CSS, then JS, is basic web best practice, and always has been - that's how you write a site that works on any browser by default, instead of requiring your users to be on Chrome Canary so that you can exploit the latest battery level API...

However, you mentioned "web application". In my mind, that is something that requires constant input (such as a game), or provides constant output (such as a video). If change is fundamental to a things being, then yes, you need the part of web tech dedicated to change - JS. However, if your "web site" is constant (i.e. doesn't need to do something every few seconds or faster), then it doesn't need change code does it? Blogs - static, forum - static (I've been on this one page a few minutes now), even a UCP is mostly static (maybe not a real-time map, but changing settings, viewing stats, those don't need sub-second updates).

So technically you're right, most "web applications" I am forced to whitelist things for, but for "web sites" I refuse (and complain a lot to people when they don't work properly).

Edit: Even a map can be done server-side with last known co-ordinates. The data might not be up-to-the-second accurate, but dynamicisim is not fundamental to the operation of a map (as proven by the fact that we can print them on paper).
I totally agree with you, but from what I've understood isomorphic application is application that can execute on both server and client, and if server is nodejs, and it uses javascript to execute, then - not having js enabled on client doesn't mean its not isomorphic, it just means that it can not execute due something not regarding application itself.

But again, that's just what I understood
__________________
Quote:
Originally Posted by ThaiLuan View Post
Code:
C:\Users\Administrator\Downloads\Viet-RP\gamemodes\3mien.pwn(112016) : fatal error 101: cannot write to file: "disk full"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Help me! How to fix error
CoaPsyFactor is offline   Reply With Quote
Old 31/03/2018, 02:50 AM   #19
BroZeus
High-roller
 
BroZeus's Avatar
 
Join Date: Jan 2014
Location: India
Posts: 1,408
Reputation: 173
Default Re: node.ucp - A full-fledged isomorphic UCP [nodejs + reactjs]

The authenticating process is now shifted to server-side, no more of that `initialzing awesomeness` splash screen.
Due to authenticating process being shifted to server-side, protected routes are now rendered on server-side as well, earlier only non-proteted routes were rendered from the server-side.

There may still be bugs in the site since this was my first reactjs project, feel free to report them.

Quote:
Originally Posted by Y_Less View Post
Well I just get stuck on that splash page. The pages are there underneath, but I have to manually delete the div to see anything interesting.
Your problem was due to NoScript plugin blocking API calls to the website, add the domain to trusted site list for the UCP to work properly. Even with javascript disabled, the UCP will work just fine now, but if javascript is enabled and API calls are blocked then the UCP won't work as expected.
__________________


"Be the change that you wish to see in the world."

Check out my Github profile!
BroZeus is offline   Reply With Quote
Old 31/03/2018, 09:51 PM   #20
AnthonyDaBestt
Little Clucker
 
Join Date: Nov 2015
Posts: 33
Reputation: 1
Default Re: node.ucp - A full-fledged isomorphic UCP [nodejs + reactjs]

that's amazing
AnthonyDaBestt is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Node/Pathfinding Calculator jeffery30162 Scripting Help 4 04/04/2016 03:16 PM
Help FCNPC NODE POINT DarkZeroX Scripting Help 2 28/06/2014 07:04 PM
FCNPC Node Help Weponz Scripting Help 0 11/06/2014 01:50 PM
GTA SA Pedestrian Node Help reiss82 Scripting Help 1 06/09/2012 07:20 PM


All times are GMT. The time now is 09:36 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.