Saturday 16 June 2018

Making a very small application: Is Electron/NW.js worth it? Can I do ANYTHING else?

Alright, let's face it. Anytime you want to make a node app all you can hear about is electron, nw.js, electron again, did you hear about electron?, YOU SHOULD USE ELECTRON!. And, quite frankly, Electron is a big disappointment. Personally, when I go to make an application I don't plan on making a big application like Discord or Game Dev Tycoon if you're into that stuff. What I'm looking for is something that makes everyone's else's life easier.Before I go into the issues with Electron and the alternatives, let me go into my use case. I want to write a cross-platform Minecraft launcher (please, I don't want to hear any comments like "there's too many" or "why Minecraft" or "that's a kids game" or ANYTHING RELATED. I DO NOT CARE.) I would write it in Java, but I have had issues with that (and quite frankly just don't want to learn it) that I will explain further down. I need this Minecraft Launcher to be able to do a few things: Connect and download files to and from the internet (what can't do this?), modify files on a user's system and be able to launch Java, and have a good-looking interface to compete with others like TechnicLauncher, ATLauncher, and even the Vanilla Launcher itself (the twitch launcher doesn't count :/).With that said, it's time to continue. My biggest disappointment with Electron is, well, these:~ RAM USAGE! Every Electron app I have used (Including VS-CODE) uses a good 200-400 MB of RAM. And that doesn't sound quite bad until you need your application to be able to run on low-end machines. Uh oh! You've run into an issue. Only 4 GB of RAM in 2018? Yes, this is a thing, and it's quite common. More than you'd realise. 4 GB of RAM allows you to, well, run Windows, Discord, maybe Google Chrome and VS Code and then that's pretty much it. Electron is not a good solution, it's a workaround to a better solution. Just going with, "It's fine, everyone can handle it" will result in unexpected results. Downloading a version of chromium and node for every application is ridiculous. Imagine we have 15 different applications we use each using 400 MB of RAM. That's 6 GB, which is going over our 4 GB limit as well as barley matching many machines today (I still see laptops for over 200$ with only 6 GB of RAM). This is unacceptable.~ FILE SIZE! You know what? Call me picky, but this annoys me when others say "oh but 50-100 MB is 0.00000000001% of many HDD's today!" You're right. Disk space is not the issue. It's internet speed. I want my users to be able to download this (reminder, SMALL-USE) application fast! And, as many consider whining, many have internet speeds of unacceptable but unavoidable levels. I know a person who has 512 KBPS download. Why? Because CenturyLink says "fu" to their customers in that area and refuses to sell them anything higher. No Xfinity. No satellite-based ones. That is the only option in their area. So, with 512 KBPS you can expect a good 30-50 minutes waiting for this application to download. 200 MB application because you didn't bother zipping it? Well you'll be here for a good hour and a half. Unacceptable.~ IMPLEMENTATION! Okay, I get it, bundling chromium and node together in one package makes versioning easier for developers and makes it much easier to not have to worry about outdated applications. But is this seriously the best idea? Most machines nowadays have Java installed on them, and nobody actually seems to mind. I see many people online posting "but I don't want to have to install one thing to run this application", and I can see their point. With many different versions of "back-end" helpers, it can be an issue. But you don't see that stopping developers and users from using it. The issue with Java is that it's more used for large scale applications like Minecraft. It's also, ignore my "whining", personally much harder to use.These are my main three issues with Electron. Now, let me talk about some alternatives that I have an issue with:~ NW.js! This is essentially Electron, just made differently. It still has filesize issues and RAM usage issues.~ Electrino! IS dead. Unmaintained. So, I found this in their issues...~ Quark (or whatever it's called, to lazy to check my browsing history rn)! This project seems like it will be the best alternative in this list so far. The roadmap for it looks amazing for how big of a project it is (although we'll see how easy it is for it to go through) and I can't wait for it to come out. Unfortunately, I have already gathered a team and gotten the basics down in Node.js and would like to begin work fairly soon. I have been hyping it up a little.~ node-qt! This one looks amazing, but seems to be completely unmaintained and outdated (last commit (essentially) 6 years ago? wow).~ Yue! Another one that looks amazing and I might end up trying, but I have not heard good things and (I haven't done much research into this one) looks as if it might not have the abilities I need it to. I have not checked file size or RAM usage.~ node-webui (or something like that, had to do with opengl)! This one looks like a good idea but I'm not sure if I want to go full native-level OpenGL.With that out of the way, let me explain why I don't want to go into other languages. Quite frankly, the biggest reason of all is that due to the way I work (and motivation for pastime projects), I lose interest in doing a project quite quickly if I am not able to execute it soon using the knowledge I know about the current language. And, in the end, it boils down to "I don't want to learn another language." Yes, I want to learn C++, C#, and similar but I have had so many issues transferring and getting used to those versus Node.js. Node.js just seems so easy to use, quick to set up, and has everything that I'd need. I don't know, this may just be me having issues learning new languages but here's some reasons why I don't want to learn specific ones:~ Python! I hate the layout. Absolutely hate it. There is no way I will ever try and learn a language that is tab-based. And yes, I've seen projects like python-brackets (if that's even what it's called), but it was very hard to learn for a beginner and in the end I threw my hands up and gave up.~ Java! I'm making a Launcher for Minecraft, why would I not use this? Well, I'd have to learn many different styles and ways to code Java. I'm not new to the language at all, in fact I am trying to get into Minecraft Modding at this point which is helping me learn Gradle. But every GUI library I try and find for it either is extremely difficult to learn or is hard to use/make better looking than a Windows 95 program.~ C++/C#! I actually truly do want to learn these, but I have had the hardest time trying to find tutorials and similar for them. Everything I've tried is difficult to use, or every tutorial I've found ends at simple logging to console and math operations (some get into cmd-user input). I have not found one tutorial that is for beginners, and transforms into GUI.~ Go! I just straight up don't want to learn it. I haven't bothered looking for tutorials but from what I've seen it looks very similar to JavaScript but in a way that makes it look weirder and (imo) stupider to use. And, while I haven't checked, I don't believe it has a huge library of modules.Finally, I just want to state one quick point. I have spent months actually searching, going through pages checked tutorials and articles and trying out other languages, as well as giving many a shot trying to learn a couple even attempting to make programs and stuff out of them. But in the end, none of it was as easy to use, maintainable and readable as Node.js. And everything I've found for Node.js has one of the three listed issues I have with Electron or is outdated, unstable, or unmaintained / not completed. So, as you can see, I really do have my heart set on Node.js.So, in the end, I come to Reddit. I tried Quora, but I am not giving them my real name. I knew I'd just get yelled at on StackOverflow as I have done many times. I don't know how many people will read this (if any), but if you have please, I am begging you, do you know of ANY alternatives to Electron that match the given requirements above. Months of research, searching, and digging have gotten me nowhere. Is there even anything out there that is for Node.js and matches my requirements? If so, is it usable? Maintained? And most importantly, cross-platform?

Submitted June 16, 2018 at 08:38AM by FireController1847

No comments:

Post a Comment