Jow Forums what are your thoughts on electron js?

Attached: 1_aBsgPiEeOE5lLoippRm7BA.png (1200x630, 117K)

Other urls found in this thread:

youtube.com/watch?v=3tvDJTUoHkc
javascript.info/async-await
twitter.com/NSFWRedditImage

Its Javascript so already trash

Is js really that bad, I've only ever used it for a handful of projects

>using the fucking worst interpreted language available
>running every application in its own browser
>giving that browsers filesystem access
>70mb for a hello world
>when you could use any other sane tool for your shit
Whoever came up with this should be shot, it's probably the worst thing that happened in application development technology in a long time. Even fucking python or java would be better if you need portability...

not really, it's mostly memes
the language is pretty confusing by itself, but you aren't a brainlet, then you can write manageable code

>Build cross platform desktop apps with JavaScript, HTML, and CSS

I could also use the Edge API on Windows or Firefox API on Linux to display my application, build a small HTTP Server in C++ to access the Windows API out of my html page (ajax is your friend) and embed every html and css resources in my executable (ofc unpack it in a tmp folder after starting)

Then I have the same hello world program in ~50 KB, in a single executable AND can even use C, C++ or asm to improve the performance of my application.

are you kidding me? The language is a fucking mess with no consistency in its data types whatsoever. The async mechanics are horrible when you can have actual threads, often lead to weird errors that are a pain to debug

Yes, but you still need to run a full blown browser to display that shit, hogging resources like crazy. You're part of the reason why computers are getting slower and unresponsive despite better hardware

Edge uses about 70 MB RAM for showing a GUI. That's really not much.

It gives you more flexibility and increases your work speed.

I can run Gentoo on 70MB ram

What consistency are you talking about?
What weird errors do you have?

maybe you can't program?

It's still a web browser, a giant sluggish piece of code. A simple 'hello world' shouldn't drive your cpu to the max for half a second while the giant is starting up. Also
>edge
>using m$ shitware
no thank you
My arch runs at like 120 mb on startup with cinnamon, should I feel bad?

And I can run Alpine on even less RAM, but this doesn't mean 70 RAM is much.

If you don't like Microsoft software, don't use Windows. Use Linux so you can render the UI in Firefox, Brave or Chromium.

There's multiple occurances where it'd be nice if javascript would wait for a function to finish before executing the next one, creating a callback hell is confusing for everyone including yourself

Attached: _aOvtfdMSecL3lOylhybNnC1-luWwaC9X_OMtLNeFLY.jpg (960x487, 65K)

I render my ui on xorg on top of gnu/linux, thank you. No I won't open your shitty """"native"""" web application. Implement it in a sane framework that doesn't require me to start my browser and we can talk

>not just returning a promise and using .then()

>My arch runs at like 120 mb
pshh! rookie numbers.
>with cinnamon
HOW?

You are not the typical 0815 user my applications are for.

I get paid per hour, not per saved MB of RAM.

It's cancerous. It's literally Flash for the desktop. JavaFX is by far superior. It's way more performant and since Java 9 it's also way more leightweight. You don't need the user to have a full blown JRE anymore. Pic related.

Attached: firefox_2018-11-29_23-20-55.png (704x183, 11K)

Is it just as insecure as Java 'web applets' or whatever that shit was in the past? I remember it got so bad that Java doesn't even let you turn the security features off now.

>java
>1984+34
>after oracle bought it

Attached: really cute.jpg (1280x720, 86K)

GUI written in JavaFX: youtube.com/watch?v=3tvDJTUoHkc

use === , use promises. they were made to make JS better
also I think that you should refine your architecture if callbacks give you a hard time

You don't have a 130 MB of free space?

Attached: hqdefault.jpg (480x360, 10K)

Web applets practically don't exist anymore and are a completely different thing.
t.brainlet. Oracle actually improved Java.

You do realize that's just a hello world application right? A bigger electron applicatione EASILY takes up 1GB of space. Even if that weren't the case Electron doesn't even come close to JavaFX's performance. They're not even in the same league.

I have never used it and I already know it is a mess; GUI applications should be written using native libraries like C# + WinForms or XCode + Interface Builder, or something like Qt if you need cross-platform; then again the type of person who wants to write a GUI in HTML and JavaScript is the same type of person to not know C++ in the first place.

>Web applets practically don't exist anymore
for a very good reason. Stop trying to put Java in the web browser. It doesn't work well, and has never worked well.

retard, use async and await + promises, use strict equality and new features that were invented to make programming in javascript more bearable, do not be that guy who's mentally stuck back in 2010, electron is bad not because of javascript itself, it is bad because javascript is an interpreted language that WAS NOT designed for writing desktop applications, use .NET on windows, GTK/QT on linux (if u really need to write a gui app), cocoa on mac

Writing cross platform applications is painful, even in Qt. JavaFX combines the best of both worlds. It's comfy to use and fast (see Bitwig). But I guess people are even too stupid to learn Java or Kotlin nowadays

Who the fuck tries to put Java in web browsers now? JavaFX has nothing to do with web browsers. How retarded are people on this board?

>Who the fuck tries to put Java in web browsers now
look in a mirror.

>takes up 1GB of space
How?
The size will only get increased by code and multimedia stuff, like any website.

You would need 870 MB of code or media stuff to reach 1 GB.

>what are memory leaks

>doesn't understand how Electron/Chromium works
You should take a look into your roaming/.config folders.. Also I haven't even mentioned what a pile of shit electron is when it comes to security, especially since 95% of all electron "devs" just grab everything npm offers them.

I know what memory leaks are.
Thanks.

Thanks! You are right then. I feel sorry.

>what is not being a dumbass and writing proper code

>writing proper code
>using jabbascript
pick one and only one

Attached: bloat_fuck.png (530x615, 829K)

How? i continue reading promise promise. But i can't understand how ita can help the callback shit.

Bla bla bla my code;
queryTheFuckingDbFunction("bla bla bla my query", function(){
var ResponseToMyQuery
});

bla bla bla other code;
HERE i need to make another query with the data returned from queryTheFuckingDbFunction().
// i can't.

async function othercode() {
let data = await querythedb("query")
}

function querythedb() {
return new Promise((res, rej) => {
....
})
}

javascript.info/async-await

async function othercode() {
let data = await querythedb("query")
let data2 = await querythedb("query data1['nameƬ']")
}

function querythedb() {
return new Promise((res, rej) => {
....
})
}

can work like this?

yeh it should work just fine, you just need to implement the logic in the promise block

>actual threads
Node/JavaScript is single threaded by design. Debugging multiple threads having access to the same state (being able to read/write at any point) is 100s of times more complicated than anything promise related. If you really want to shoot yourself in the foot, you can force multithreaded. And if you do, it's your fault if anything goes wrong

>70MB for a yellow world
I don't see how console.log("Hello world!" is 70MB.

>70MB of RAM for a Hello World
no, thanks

From the developer pov, it's literally heaven. Runs on desktop OSes, can look good to please normalfags.

Webshits are NOT developers.

fpbp

>I don't see how bundling an entire goddamn web browser into a desktop application that prints a single phrase could possibly be bigger than the single line of code I wrote

kys

I mean I offer an electron version of a webapp I have just due to people asking for it and I cant really knock using web technologies for the desktop. I am not going to maintain two code bases when the web version works just fine , as well as that html , css and js allow you make some pretty functional things pretty quickly while allowing them to look pretty(yes this is important you autists). So yes you may expend a lot of ram using the electron version but just use the web app instead then , chances are you already have a few tabs open in the background and a new tab is going to be a lot less expensive than effectively running two browsers at the same time.

Honestly based and redpilled

>t. Php cuck
Web Devs are the future of developers. Its probably one of the hardest jobs out there.

>Its probably one of the hardest jobs out there.
HAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAH