So I've just read the first 250 pages of a Book to learn JavaScript. I'm currently reading about prototypes

So I've just read the first 250 pages of a Book to learn JavaScript. I'm currently reading about prototypes.

What the fuck were they thinking?

"They" have a way to generate objects with same type properties.

This. And also extend objects with the same prototype.

why can't they do it like everyone else does it. Class based.

>why can't they do it like everyone else does it. Class based.
Cargo cult.

When I'm not using javascript onthe server I'm stuck writing every module I use on the server and client, twice, in 2 languages.

Who the fuck came up with this bullshit? This is insane.

>I need to write code for BOTH client and server
Well, duh...

F.e. data validation, why would anyone want to write this more than once? I wanted to use Node.js instead of Django but wtf man I learned to write decent C++ code for an commercial unreal engine game in 14 days, after 14 days of JavaScript I don't even know how to structure the code

>JavaScript sucks because I don't understand client-server separation in web applications
Is this really the state of Sup Forums ?

Also
>I taught myself C++ in 14 days
Yeah, sure you did user.

>>I taught myself C++ in 14 days
I already know ANSI C, Java, C#, Python, PHP and worked in Software engineering for more than 2 years from there on it isn't hard.

>>JavaScript sucks because I don't understand client-server separation in web applications
>Is this really the state of Sup Forums ?
Whats your point? No one wants a shitty request response cyle website these day`,s I blast JSON through websockets - why not share libs for this (also besides validation rules)?

I wonder what kind of library you are using that doesn't have multi-language bindings.

You clearly need to learn networking if you believe that websockets somehow magically remove the client/server separation.

>I wonder what kind of library you are using that doesn't have multi-language bindings.
I'm writing my bachelor thesis around this and no one at my university knows anything about this kind of stuff. I don't even know a single one. Tell me.
I have a C# backend, a Node.js webserver (or Django+Channels but this sucked) that is pulling data from the backendand a Vue.js frontend displaying the data in the browser.
Also, when I was using Django I was progging in 3 languages and this added some serious overhead to my ability to focus.

The problem with you frontend fags is that you are thinking like my gandpa. An ideal frontend would be built like a game engine with an update loop and GameObjects that have values like a position in 3d space. An engine like this could also be used in front and backend. When I did a UI for some science shit for Volkswagen we did exactly this, building a communication server that waas essentaily a game engine (actually it was in written in C#+Unity). You're stuck thinking in states and Events.

>I don't even know a single one. Tell me.
All the languages you listed have libraries that support JSON parsing, and all of them except C has it built into their standard libraries.

>"lol asynchronous events are so stupid, just waste a CPU core doing busy waiting"
KYS nigger

>What the fuck were they thinking?
>"Well, he haven't look up how to do this properly, but who cares. It's not like a Self guy has to fix this garbage afterwards."
>About 1.5 decades later...
>*Google hires Self fag to implement V8*

>I have 2 years experience in software engineering

>I'm doing my bachelor thesis and I don't know who to ask

yeah except all implementations in Django don't do what they should (JSON Pickle I'm looking at you) so I had to implement them myself.

Also the worfklow is horrible: Get JSON from C# server -> parse it into JSON in Python -> write that JSON data into the correct places into a Django data model -> Send the updated model to the client by parsing it to json again -> Design the exact same datamodel in the frontend in JavaScript.

>I had to implement them myself.
You implemented your own JSON parser in Python because you didn't like Django's?

There are huge red flags here.

>Get JSON from C# server -> parse it into JSON in Python -> write that JSON data into the correct places into a Django data model -> Send the updated model to the client by parsing it to json again -> Design the exact same datamodel in the frontend in JavaScript.
Why did you design it in this way?

You haven't worked while you were studying? I'm in my 12th semester in a 7 semester bachelor degree course. I need money you know?

>I'm in my 12th semester in a 7 semester bachelor degree course.
How did you fuck up this bad?

My dad died, emotional and financial stress.

>Why did you design it in this way?
I don't want to do it this way but Django left me no choice. I liked how Vaadin + JavaEE did the frontend / backend data binding. There was a Data model for every frontend component and when you've changed it on the server you didn't need to care to commit that change to the client because it was done automatically.

This is what I wanted to do in Django but I now had Django Class objects holding data for JSON components that are located in the frontend. I could do myObject.a = 99 in Django and the var myObject.a in the frontend changed instantly but implementing new Data sucked so the idea now is to only work with JSON objects in the first place, on client and server, so that the data models don't need to be converted and I can reuse validation rules, this will release stress on maintaing frontend Data state in the backend.

>I don't want to do it this way but Django left me no choice
I'm pretty sure you're just inexperienced.

I looked at Djangos databinding but it's a 2-way binding on it's database models. I do not want to store frontend component data into a Database, I want to hold it into local memory, the server doesn't need to scale. If it needs to scale I can put the data onto a redis memcache.
Seen from a Gamedev perspective writing every piece of information, like the position of every player, into the database 60x / second is absolute bullshit. It's equally bullshit to write every small change of frontend data into a database.