<VITAS>
but always think about slow devices like phones and old/embeded computers
politas has quit [Ping timeout: 201 seconds]
politas has joined #spacedock
aradapilot has quit [Ping timeout: 201 seconds]
aradapilot has joined #spacedock
politas has quit [Ping timeout: 200 seconds]
politas has joined #spacedock
<Thomas>
!tell RockyTV Sure, we could use BSON or message pack for the requests
<Qboid>
Thomas: I'll redirect this as soon as they are around.
<Qboid>
Thomas: RockyTV left a message for you in #spacedock [05.08.2017 06:38:48]: "why not use BSON for files, so we decrease the data size?"
<VITAS>
!tell VITAS Hello sexy!
<Qboid>
VITAS: I'll redirect this as soon as they are around.
<Qboid>
VITAS: VITAS left a message for you in #spacedock [05.08.2017 11:16:25]: "Hello sexy!"
<VITAS>
:D
<Thomas>
hi
<VITAS>
!tell Thomas Hi
<Qboid>
VITAS: I'll redirect this as soon as they are around.
<Thomas>
¯\_(ツ)_/¯
<VITAS>
I wonder if there is a ASON
<VITAS>
anyways what data is so large it needs compression?
<VITAS>
images and mdos are allready compressed
<Thomas>
Well, my concern is that we end up making lots of smaller requests
<Thomas>
which would result in lots of data being transmitted
<VITAS>
if i wouldnt fear websockets to be blocked in places....
<VITAS>
but you could make some sort of broker that at least aggreagates all req at the init load of a page/view and sends them in bluk to the backend and distributs the response
* Thomas
feels like he is rewriting the whole ajax part of jquery because nothing does what he wants :P
<VITAS>
normal
<VITAS>
the cycle of software dev
<VITAS>
you have a plan, you implement it, you learn while duing it, you find the flaws in your plan, you have a new plan
<Thomas>
Why does it have to fail completely when the status code says "error" :/
<Thomas>
That breaks the parallel execution
<VITAS>
because it isnt a warning
<Thomas>
Yes, but when someone wants to read the message sent?
<VITAS>
huh?
<VITAS>
then save it before sending?
<Thomas>
No, when the server sends a message with status code 403, ajax fails. But I want the message, and I dont care about the error code
<VITAS>
in that case log it on the server?
<VITAS>
or do you want to use it in your code? then implement your own error handling
<Thomas>
"then implement your own error handling" --> /me feels like he is rewriting the whole ajax part of jquery because nothing does what he wants :P
<Thomas>
normal
<Thomas>
Wut
<Thomas>
I didnt want to copy the normal :P
<VITAS>
:)
<Thomas>
Anyway: I had my own handling, but now it isnt used anymore because of $.when
<VITAS>
what i usualy do is use the ajax error handeling for hard errors and my own more fine for state handeling and feedback
<VITAS>
you usualy want some descriptive message to go with your errors so what i would do is wrap your messages in another layer of json
<VITAS>
something like {status:3,errorcode:8932,msg:"bla",data:{your data}}
<Thomas>
sdb already has those messages. My only problem is that ajax doesn't ignore the error codes.
<Thomas>
I think I am simply going to remove all the 4xx codes from sdb
<VITAS>
i think theres something like onerror functions
<VITAS>
yes that would make the rrors "softer"
<Thomas>
Yes, but the problem with the on error functions is: They dont return data. The problem is, that with the parallel execution of the request functions, every function is expected to return something that gets passed to a single big callback
<VITAS>
ok you could use a more lowlevel jquery ajax function
<VITAS>
or do as you said: remove http errors and rely on your own
<VITAS>
there still can be 404 and alike if its realy the problem
<VITAS>
(aka 4040 if the route doesnt exist)
<VITAS>
-0
<Thomas>
Hmm, I could just copy the source of the ajax function and replace the check :D
<VITAS>
you can write new jquery functions using existing lower level jquery funcrtions
<VITAS>
so no need to copy them
<VITAS>
you can simply extend or overload them
<VITAS>
(at least i remember doing stuff liek that at some point)
<Thomas>
The problem is: how do I overload a local variable inside of a 200 lines function :D
<VITAS>
noo
<VITAS>
you can do $.fn or something similar
<VITAS>
it enables you to do $.thomasGet or even $.get
<VITAS>
using the normal get foo but with your own twist
<VITAS>
and the same for other functions
<VITAS>
look up custom jquery functions
<VITAS>
or somethign like that
<Thomas>
I know that I can define own jquery functions
<Thomas>
My problem was that I would need to rewrite the ajax function completely
<Thomas>
But I think I found a solution
<VITAS>
ok...
<VITAS>
i still think you dont entirly
<Thomas>
Hah! It works \o/
<SpaceDock>
[SpaceDock-Backend] StollD pushed 1 new commit to master: https://git.io/v7rT4
<SpaceDock>
SpaceDock-Backend/master 63d71a6 Dorian Stoll: Send the users confirmation in the admin data
<Qboid>
Starting build #76 for job SpaceDock-Backend (previous build: SUCCESS)
<SpaceDock>
[OpenDock] StollD pushed 1 new commit to master: https://git.io/v7rTB
<SpaceDock>
OpenDock/master 1a774db Dorian Stoll: More fake jQuery