<Thomas>
Well, the php vars are set through twig, and we add the js vars with jquery / vue
<Thomas>
so {{ mod.name }} on {{ site_name }} becomes {{ mod.name }} on SpaceDock first, and DarkMultiPlayer on SpaceDock later
<RockyTV>
what?
<Thomas>
So you want to know how we would handle something like {{ mod.name }} on {{ site_name }}, where one var is a php var and the other one is a js var, right?
<RockyTV>
yeah
<RockyTV>
because previously {{ mod }} was a coffeescript var
<Thomas>
Well, we parse {{ site_name }} with twig, and add the mod name later with java script
<Thomas>
We could change the title to "on {{ site_name }}"
<Thomas>
and later we set the title to mod.name + " " + currentTitle
<Thomas>
with js
<VITAS>
if you continue youre close to understanding my old frontend code :D
<VITAS>
(old new)
<VITAS>
i had similar problems where the php backend is unaware of vars and sessions
<VITAS>
so it cant handle stuff
<VITAS>
i was thinking about letting the php backend do the http req to the backend and forward it to the js frontend but that would result in another hop in the chain
<VITAS>
and there are allready 3: db,sdb,reverse-proxy,js frontend
<Thomas>
And it would screw sessions I think
<VITAS>
no problem
<VITAS>
the php stuff could mediate sessions
<VITAS>
and you rarly travel between geolocations while using spacedock
<VITAS>
andd if you do youll get logged out
<VITAS>
i would have requested another api design if i had opted for it
<VITAS>
the upside of such an design would also have been that we wouldnt have had any problems with cross site axaj requests
<VITAS>
ajax
<RockyTV>
why ajax when you can vue
<VITAS>
vue does ajax or websockets
<RockyTV>
why not websockets?
<VITAS>
vue is no means of transfer
<VITAS>
because of ports and proxys
<VITAS>
websockets demand another prot to be accesable
<VITAS>
so unless you controll the enviroment (e.g. lan) you should have ajax fallback for the core functions
* VITAS
is a big fan of websockets
<VITAS>
btw: now vue next stop angular? ;)
<RockyTV>
nah
<RockyTV>
vue is lightweight angular
<RockyTV>
also, angular is messed up, take a look at their versioning!
<VITAS>
i know
<VITAS>
but you can do mobile apps with it?
<VITAS>
but who would need spacedock mobile unlesss...