It's because Discord, Spotify, and the newer versions of Skype are all running on Electron - basically they're each independent chrome processes. Steam might also be transitioning over to something similar currently, with their recent friends redesign, and upcoming library/client redesign. It's great on the development side when you only need a web team and can push out multiplatform (win/mac/linux) and web versions of the product all with the same code, but it kind of sucks running a bunch of chrome processes.
Actually, you might just be in luck! When the Android Messages WebApp came out I was looking for a solution just like this. As luck would have it, someone managed to package the WebApp in a stand alone app! Here is the GitHub project. I've been using it since on my home setup on windows 10 and work setup with the mac book pro since they provide installers for both! https://github.com/chrisknepper/android-messages-desktop
​
I think the way this was done it actually loads the webapp inside a webview packaged inside a normal windows or mac application using Electron! Either you can take up the project for Duo or wait for it but the integration is good!
I feel like a lot of the flak Electron gets is from a few poorly made existing apps. Slack, while widely used in the workplace, has poor memory usage and is fairly slow. Discord, on the other hand, does everything Slack can, but more and faster, and uses less memory. Loading only the two servers I use in Slack bumps RAM usage up to nearly 600MB, while serving hopping across multiple servers and channels in Discord barely cracks 250MB. Another terrible app I came across was Station. This app used over 1GB of RAM just to be a less featureful browser to render external pages.
Not much to it, and not much that can be easily analyzed, as the source isn't actually made public on their github, just the release binaries. You can de-package them pretty easily, but frankly I don't want a headache, so I'm not going to be looking at obfuscated javascript code for long =)
It looks like it is built using Electron, and is simply making standard calls into the same APIs we can see here: https://api.vechain.tools
I skimmed the code and didn't see anything that would be revealing.
This is already Discord, Slack, the Atom text editor, or any of the desktop apps on this list. They all use Electron, which I will let the wiki bot describe:
Edit: /u/WikiTextBot, you had one job
> Electron began in 2013 as the framework on which Atom, GitHub's hackable text editor, would be built. The two were open sourced in the Spring of 2014.
It's built on a technology called electron that lets developers write an application once using web tech and have it run on the major operating systems. While this is great for developers with small teams, it makes it basically impossible for developers to be fine-grained about performance without doing what's called a [native extension[(https://electronjs.org/docs/tutorial/using-native-node-modules). This is a problem for people like me with 600+ games where the steam client is slow to do things while it processes all the new info about my games. A company like valve should be more than capable of writing a native application for the major OSs but considering the new chat is already electron I'm guessing that will not be the case.
Brave deeply regretted their decision to use Electron because of the security issues with it. The Electron team also state that you should not build a browser in this article https://electronjs.org/docs/tutorial/security, you're putting people at risk.
VS Code is not Atom based. It uses Electron, which Atom also uses, but VS Code is so much faster.
They actually recently rewrote their text buffer so that it is significantly faster than it was previously.
For desktop apps, a good choice is Electron. Some popular examples are Atom, Visual Studio Code, Discord, Slack, and WhatsApp.
For mobile apps, a good option is React Native. Some popular examples are Facebook, Instagram, UberEATS, Discord .
You should really think it through if this is the best choice. All of these apps have good reasons to do so. Atom and Visual Studio Code allow scripting/styling with JS/CSS. Discord, Slack, and WhatsApp want the same experience for website and desktop (lot of shared code).
Electron is a good choice if your app targets both web and desktop. React Native is a good choice if you want to share code between Android/iOS/Web.
I love MEW and will keep using it spite of this issue, however I would like to offer a suggestion: why don't you guys pack MEW into an https://electronjs.org/ app and offer it as a downloadable standalone app?
Signal Desktop is based on a framework called Electron, which allows for web apps to be wrapped with a browser layer (which is powered by Chromium) and turned into desktop apps. Electron is getting pretty popular nowadays, and is used in many apps like Slack, Atom, and VS Code. Here is more info on Electron if you're interested. :)
Atom Shell was created for Atom, though the authors at Github acknowledged that it was not intended to be only for a text editor.
It was renamed "Electron" in 2015 as a play on words with electrons in atomic orbitals or atom shells.
VSCode is popular. As is Atom and WebStorm. I use Sublime. People tend to spend too much time on their tooling and not enough on actually building things. Just pick one and go.
Node.js is just a non-browser runtime for JavaScript. It has a few modules and classes that are different from the browser, but for the most part it’s just JavaScript in your command line. It often gets used to write the servers backing browser apps. It has nothing to do with PHP.
Take a look at Electron. It will package up your JS, HTML, and CSS into an executable. For example, I believe Slack is an Electron app. For mobile there are libraries like React Native. Note that these sorts of things rarely get used for games. That’s because there is a big performance hit for using JS. Fine for a chat app, not great for a game. Probably better to look into something like Unity if you are serious about games.
Very dependent on what you want to do. Front end work? You should git gud with HTML, CSS and probably a framework like React or (gross) Angular. Back end? Learn some SQL and MongoDB. Games? Probably abandon JS, learn Unity, Java, C++, something in that vein. Just want to expand your CS chops? Learn some functional language like Clojure, Elm, or Haskell.
Just offering a little info. Games dev always seems behind a little compared to regular software in the JS world. If you write a HTML/JS game and deliver it through Steam you definitely can bundle it as it's own executable with Electron. That's how apps like Discord, Atom, and VSCode have been made.
I'd also like to suggest TypeScript if you're going to go the HTML/JS route. Being able to have code completion/suggestions all throughout your app and easily refactor large applications is a godsend and after getting over the short learning curve of TS I never want to write plain JS again. It also lets you use the newest JavaScript features while still running on older browsers, a short list:
TS also brings it's own features to the table like enums that will error if you don't handle all of their cases in a switch expression. Say for example you have enum { Active, Inactive }
and you have switch expressions in your code to handle the two states. If you ever go back and add a 3rd state, for example enum { Active, Idle, Inactive }
it will then error in all of your switch statements where you haven't handled the new state. It's simply an amazing feature that you didn't know you needed until you've got it.
why not using you go as backend and plug a separated UI using something like electron https://electronjs.org/ like that you can separate your UI and your backend. I've been working with Qt in the past and it's harder to do really nice UI than with some basic web technologies. I don't know what kind of application you want to do but if you have a big backend and just want to plug an UI on top of that separation of front and back can be a good thing ;)
If you're going to show a lot of often-changing content, like the News feed when you start the game, it's often best to just use webpages since you probably already have an entire frontend team that specializes in that and can deliver it fairly quickly, and you're probably gonna show it on your website anyways, so why not load it from there instead of building it twice?
This is getting a lot more popular; Electron.io apps are basically just desktop-containers for webpages ^(don't use Electron it's pretty bad), and Steam and Spotify are basically also just websites that run in a custom container, where the container adds a small bit of functionality the website lacks (like starting games).
So yeah, the introduction screen on Victoria 2, EU4, Stellaris, and CK2 just loads a customized web-page. In fact, there was a bug not too long ago with the Victoria 2 screen that just showed you an error since you had to be authenticated* for that specific page.
*^(The normal launcher pages probably require authentication from the game too, so you can't just visit them normally on the website, but in this case, the launcher wasn't authenticated.)
The major reason for preferring an app over a browser experience is that it requires less work and bugs are less tricky to eliminate. When doing web-based development, you have to account for the fact that users will be split across Chrome, Firefox, Internet Explorer, Edge, Safari, and other browsers of varying versions. Because most of your users won't know any better and it would be pushy of you to tell them to just download a newer browser, you have to support several platforms that appear as a single platform to the consumer.
OR, you could develop your web app using Electron, a compiled desktop language with improved performance, or a mobile-native language that gives you improved performance and native UI integration all while giving you less surface area to expose bugs on.
TL;DR - apps behave more predictably, making them easier to maintain and nicer to look at.
Unfortunately, the sad reality is that it's getting harder and harder to avoid Electron. It's gaining a lot of traction; to the point that when I see a native app I go like "Oh look! A native app!". This list keeps growing.
>I don't trust Microsoft/Google/etc veto powers. As long as devs can distribute UWP apps in another distribution system, I'm fine.
They can. It's not store limited.
​
>Also, do you have any link comparing resource efficiency of UWP apps vs Win32? Anything that is better than the Electron has my support.
​
we use electron in UWP. MUWEAHAHAHAHAHAHAH https://electronjs.org/docs/tutorial/windows-store-guide
​
Electron's a whole lot more about 'efficiency'
You wrote:
> I want the game to be a free game, that people can download and play on their computer, and keeps track of their progress. Making it a computer game, not online or hosted or anything, is the only thing I don't wanna budge on.
A web-stack game (think HTML5-JavaScript-...) could be wrapped into something like NW.js or Electron and then can be delivered similarly to natively compiled games (think .exe for Windows). There are upsides and downsides to this, as always. For mobile devices there's something similar, but I forgot the name.
and the client can be made cross platform with https://electronjs.org/
I just wrote an app a few weeks ago to provide HTTPS access into a pervasive database server. nice tray icon, easy windows integration, etc
I write just about everything in nodejs (app servers, windows module interfaces with edge, etc), nice and easy to use, once you get the hang of it
Sorry, I may not have been clear - I was talking about the desktop app. React Native is a mobile platform for iOS/Android, not desktop. Discord uses Electron for the desktop app. https://electronjs.org/apps/discord https://news.ycombinator.com/item?id=14090464
I would jump into learning JavaScript (as well as HTML/CSS). You can also make cross-platform desktop clients (using JavaScript), via Electron!
I'm self-taught (and not the best student), so it's been a struggle for me learning this. I've been at it for about 1.5-2 years, and still have a lot to learn. So be patient with yourself.
Electron is intended to fast prototype cross-platform GUI applications reducing development time since it runs on all the three major platforms by default. Using a tool which was designed to quickly convert web-apps into chromium instances running on all three platforms (which is, arguably, its only advantage) makes literally no sense for a Linux distro installer.
From the website:
> If you can build a website, you can build a desktop app. Electron is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. It takes care of the hard parts so you can focus on the core of your application.
Yeah, why not use Javascript, HTML5, "web-technologies" packaged into a neat chromium instance for a Linux distro installer just because we can.^^/s
What zouhair is saying is that he used to think Java (or jvm based languages) was a memory hog before Electron came along.
Electron does not use the JVM. As I said above, it literally using chromium to render a website with some hooks to the local filesystem and other stuff to make a typical desktop app work.
From Electron's front page (https://electronjs.org/): > Electron uses Chromium and Node.js so you can build your app with HTML, CSS, and JavaScript.
Why don't you file an issue asking about your privacy concerns?
According to their website it uses chromium but I'm not sure whether it phones home to Google as much as the main browser Chromium or Chrome.
You won't be able to share scope that way across windows, this is intentional. You could use postMessage to send some serialized data to the new window, but you'll have to have separate JavaScript for that load in the new window.
https://electronjs.org/docs/latest/api/browser-window-proxy
There are other more common ways to handle cross window communication with multiple BrowserWindow instances and the ipcRender module. If I was sure whether you tried those I'd suggest doing that first since you'll be able to find examples online of how to pass data between windows.
Microsoft Teams, Office 365 (web ui), Skype, Slack.
Also, not sure if qualified as enterprise, but useful in the enterprise:, VSCode, MS Edge Dev, Riot, Freelook (outlook client), Atom, Tusk (evernote client), Discord,
Sometimes it’s good to see if your problem might have been attempted somewhere to see how someone else implemented it and avoid having to think everything out from scratch.
I threw some keywords from your post into google and found this, https://electronjs.org/apps/storaji It might be a good starting point
Thank you for creating something for the Switch Hacking community, always much appreciated. Nice work!
I would recommend publishing it on GitHub, though. You can offer a download of the finished/compiled binary there, the community can contribute and easily check the source code. I just wanted to check your source code but couldn‘t because I‘m on mobile.
Also, GitHub doesn‘t delete your file(s) - those shared file hosters like MediaFire do after a certain time if you‘re not subscribed there. Not sure if MediaFire does that, but most others do.
Question: Is the logic to rename the saves complicated? Because if not, I think that you‘d easily be able to write the same program with Electron which automatically makes it cross platform. If you‘ve never heard of Electron, you might be surprised to hear that you may have been using Electron apps already: Github‘s and Microsoft‘s code editors Atom and Visual Studio Code as well as the Discord desktop client are all written in Electron!
Anyway, I‘m not meaning to offend you or anything, just offering my thoughts and ideas - I know it‘s just small program, but at least for me, trying out new things is fun! :-)
Sure, an Electron app consists of two processes, one is the Chromium / V8 process (front-end / UI), and the other is a Node.js process (back-end). They automatically launch together and are connected at the hip. And you can easily communicate between them using messages. In short, you can totally execute a C/C++ binary from the Node.js process (using child_process.spawn for example), open a pipe to its STDIN/STDOUT if you wanted (assuming that's what you meant by CGI) and communicate with it, passing messages to/from the front-end. Or, if you just wanted to exec your C/C++ binary once, let it exit and capture its output, then look at child_process.exec instead.
I would like to start with saying that you should not load remote content (e.g. scripts and HTML templates from web servers) without taking measures to sandbox that content in Electron since that puts your users computers at high risk.
See: https://electronjs.org/docs/tutorial/security#checklist-security-recommendations
With that said, that might also be the thing that is causing your problems if Electron has restrictions when it comes to remote content.
What does the network tab say when you open up Developer Tools?
Edit: This is the block that prevents your scripts from running and contains a description on why it's bad to remove the block: https://electronjs.org/docs/tutorial/security#8-do-not-set-allowrunninginsecurecontent-to-true
Unless I am missing something it sounds to be heavily table/number based. Not really graphically intensive. There's a great language that's been designed just for this! HTML! It has built in support for table layouts, input boxes, styling, etc. I always like web apps for these sorts of things, but if you wanted a standalone application there are other programs to 'wrap' a web app in so that it can be a standalone desktop program. Electron is one example of a program that can do this.
I could save you some time.
Front end is what you see in HTML pages, CSS styles and JS animations. You're basically trying to make your website or application easy to use and good to look at.
Back-end is what you do not see unless you're working on it. This consists mostly of HTTP, authentication, streaming, evaluating forms(registration, sign up, login etc), database querying and deploying your app on a server so that it is available to people across the world. This part needs an active internet connection if you want to test whether or not your code does what you want it to do.
Full Stack is basically everything from front-end, to back-end, micro services, containerisation, server code optimisation and stuff.
Embedded is when you work on boards like Arduino, Raspberry PI or tessel and embedding them in an IoT platform. Working with weight sensors or water level sensors, GPS tracking and extracting information from those devices is all embedded development.
Desktop applications are just applications which you can install on your machine and use them like Chrome or Firefox. This is not that different from developing websites AFAIK. Python for Linux, Xcode for Mac and Visual Studio for developing Windows desktop applications are popular. Electron framework lets you develop desktop applications with HTML, CSS and JS. You can check them out.
Sorry if my answer is too long. Just wanted to save you some time. But you could always go out into the internet for help. Feel free to DM me.
Sure!
Anything you store locally is at risk at being accessed by XSS or any other malicious software that may be installed on user's computer. Sensitive data may include auth tokens, phone numbers, or anything else you wouldn't trust in a stranger's program. This is a big reason a lot of important business logic is server side and in a database so that there is less of a risk of this kind of security issues. If you can lock down your server and database that cuts out a ton of potential security issues
Maybe you could try electron? You get to make desktop apps with web technologies. So it is still cross OS compatible.
> What I want to do can easily be done [...] on a webpage but I need it in a [...] .exe.
Other than that: I don't know what the Netbeans IDE does or why it is hindering you. But you can use JavaFX - which is one of the better cross-platform GUI frameworks - without any graphical editor. By just defining a window with like 500px width and height and buttons on pixels 80, 240, etc. within your code.
IIRC Riot did their own version of Electron for the new client, so you can already imagine where the performance issues come from. Electron is shit.
EDIT: Found the source:
> From another perspective, I realized we'd created the game client equivalent of Atom, Github’s CEF-based extensible text editor based on the Electron framework. Interesting stuff, and I would never have guessed that we'd end up here at the start.
So yea, they are definitely using JS and possibly other performance-poor tech like Chromium to run the client.
Found this in discord subreddit This is normal. Discord is an Electron app, which means that the desktop client is a slightly modified version of Google Chrome. The RAM usage is more or less equivalent to running a Chrome tab, because Web Browsers are resource intensive beasts.
Well I found this feature of Electron: desktopCapturer
So it might be possible to do that actually! However they had one disappointing caveat:
> does not work on macOS for audio capture due to a fundamental limitation...
So as long as it's ok that audio recording doesn't work on MacOS, I think this can be done 👍
> Node JS has nothing to do with it
From the ElectronJS.org site, "Electron uses Chromium and Node.js so you can build your app with HTML, CSS, and JavaScript."
> Chromium is why Electron is slow.
Try compiling a "Hello World!" Electron app. You'll find that it uses virtually no RAM or CPU. As you add more to it, it'll get a bit slower, but it still runs well enough that a quality app can be made. The League Client sucks, because it was poorly written, not because of the engine it was built upon.
Electron applications aren't going to run as fast as something written natively in C, but it sure can do better than the current League Client if there's a good developer writing the code.
> Though when I try to unzip the darwin one, it does nothing?
Can you be a bit more explicit?
What do you mean by “it does nothing?”…
It does nothing after trying what?
• It does nothing after extracting the Zip archive?
• It does nothing after double clicking “LosslessCut.app”?
• It does nothing after executing ~/Downloads/LosslessCut.app/Contents/MacOS/LosslessCut
?
• It does nothing after the application is already running?
Knowing that this is an Electron app [1][2] I wouldn’t be surprised if it is completely broken.
[1] https://electronjs.org/
[2] https://pastebin.com/raw/4DbVmsCS
This is 4.1.3, but this property has been in Electron for a while (certainly at least in 3.0.0, and Discord uses Electron 3.x iirc). It's options.webPreferences.devTools: boolean
.
You can certainly do that, though I don't have much experience on that front; I know of colleagues who did that by using Electron and Ionic, respectively for the desktop version and the mobile one; they are tools that let you package yout web application into a native one. Apart for giving you some pointers, I don't know much about that front.
A "normal" web app is, I think, easier to develop and package, but it needs a functional internet connection, at least on first loading, so if that's not enough for your use cases, it won't be a viable option for you
Similarly, Microsoft acquired Electron as part of their GitHub purchase. Electron has just introduced System Dark Theme support.... for MacOS only. No mention of or interest in checking the Windows "Default app mode" setting. See https://electronjs.org/docs/api/system-preferences , and note how literally everything is labelled "MacOS".
MS, show some love for your own OS.
What do you want to make? You can make websites with javascript and there is even Electron which you can use to make desktop applications. Same story with python, you can use it as a back-end language for web applications (it's recommended to use a framework such as flask or django so you don't have to reinvent the wheel). And there are GUI packages for python if you want to make desktop.
This is a weird case were w3 schools has a better example. looks like you need to open a window in a current window, then you can resize it.
If you are trying to make something for personal use and want better control over the window, you could look in to making an electron app
You've got some great suggestions already. But maybe take a mental note of Electron. It's not a language per se but a technology that allows you to publish web content as a desktop app. Might be helpful if you should want to release on both.
Well, Discord is essentially a stripped down version of Chromium so as long as the component isn't mounted it shouldn't use any extra RAM. Even if it was mounted it probably wouldn't use that much extra RAM since the bulk of Discord's RAM usage is Chromium and V8, not the actual app.
But with Electron we have a dedicated api for this called ipcRenderer. See here... https://electronjs.org/docs/api/ipc-renderer
Ideally for this to be secure, you want to whitelist a number of channels and define who can call them and what precisely happens when messages are sent over each of these channels. You then want to make sure that your render processes dont listen or communicate with eachother directly but through the main process.
edit: added more info
WAIL is a GUI atop multiple web archiving tools intended to be used as an easy way for anyone to preserve and replay web pages. Tools included and accessible through the GUI are Heritrix 3.2.0 and OpenWayback 2.3.0. Support packages include Apache Tomcat and pyinstaller. WAIL is written in Python. https://machawk1.github.io/wail/
> I miss the days when things were optimized for specific platforms.
Electron came along and now software companies can develop an app for every platform with one JavaScript codebase. This sounds like a great idea, but it means that now every app has to have an instance of Chrome running in the background eating RAM and no apps can take advantage of platform-specific features.
Also everything has to be HUGE because someone could be running it on a tablet, and we have to make everything BIG AND TOUCH CAPABLE.
No such thing as a dumb question.
I’m a programmer, too, and use a Mac as my daily driver. Sometimes I have to load up Windows to get a task done, usually to work on some VisualStudio project. Parallels/VMWare/VirtualBox will cordon off a specified amount of RAM solely for the virtual machines. In order for Windows to even run at a non-hairpulling speed you need at least 4GB of RAM. I usually split the available and send half to Parallels. So Windows uses 8GB.
Recently, “native” applications have been being written in JavaScript by a container called Electron. Electron is very awesome. It lets you write your code once and it’s portable to all major platforms. The downside is JavaScript by nature hogs memory. A lot of applications are being written like this:
The list goes on
Then, being a web programmer, I usually have Google Chrome open, which is also a memory hog. Chrome is more compliant to JavaScript standards than Safari and I’m usually programming an app where I can control the environment it’s being ran in.
And if you are an android dev, you can kiss a good chunk of memory goodbye to Android Studio. Pretty much any IDE nowadays will take up 25% of your memory without even thinking twice about it.
So I would love 32GB of RAM. I might not use it all everyday but having it there and not having to worry about it would make my day.
> A cross platform tool could be built with Electronjs.
I have experience with Elecron and React - was considering taking the orgniser code and seeing if I can adapt it to make a cross-platform build. Seeing as other people are interested I might actually go ahead and look into it! :) Anyone else interested in helping out?
that was such an un-educated guess I threw up in my mouth a little.
electron is basically an abstraction layer on top of Chromium, with node.js to realllly SPEED UP the backend:
In Electron, there is a main process and multiple renderer processes. You can read about the Electron architecture here. You can send and post messages between them so it's very similar to web workers.
JavaScript is single-threaded. So Electron is single-threaded by default. However, just like in the browser/Node.js, async calls to native APIs don't run on the same thread. Web workers are also available if you need explicit multi-threading but only on renderer (Chromium) processes.
No plans yet. I'll consider it if:
Any particular reason you'd like an executable?
There are good reasons to avoid it, if possible:
.exe
s, honestly.edit: link fixed
Read the first section of this sub's FAQ
Other than that, I'd recommend trying out some new stacks/frameworks and seeing what you enjoy:
If you like building desktop apps, maybe try Electron. You can try playing around with Android and iOS development. For web apps, you can try learning Java Spring Boot or the MERN or MEAN stack.
It’s actually a really simple task to port browser content to a desktop client: electron. This is the same thing that Discord, Skype, Spotify, etc. use so they really only have to develop the web UI.
It depends on what you're accomplishing with it. If you're using AHK to control the mouse at all or things like sending commands to other programs, then no. Javascript can't do that.
JS can do quite a bit now, especially with Electron, but any automation is basically not able to be replicated.
Si tu connais node.js, il n'y a quasi rien de plus à savoir, pour le reste tout dépend de ton projet, l'écosystème de node est très riche (regarde du côté de NPM), perso j'ai une préférence pour webpack et vue.js, mais tu as le choix (Angular, React, ...)
En fait install juste la demo d'Electron et tu auras un exemple de ce qui fonctionne directement avec le code source :https://electronjs.org/docs/tutorial/first-app#trying-this-example
> Is it possible [without requiring] a full install of R?
No. This is fundamentally impossible: each R script needs R to be executed. You could bundle an executable that comes with its own R but I’m unaware of a ready-made tool that would bundle such an executable for you. At any rate I’d generally avoid against it since it would lead to unnecessary bloat in the executable size.
That said, an example application that does exactly that is SeqPlots. Unfortunately the public code base doesn’t seem to contain information about how the bundle (containing the code and the R executable) was created. But, in a nutshell, it uses Shiny and Electron.
This is normal. Discord is an Electron app, which means that the desktop client is a slightly modified version of Google Chrome. The RAM usage is more or less equivalent to running a tab, because Web Browsers are resource intensive beasts.
It works pretty well, but as you've noticed there are some caveats.
The good news is that the user configuration stuff is stored in ~/.config/Exodus
or ~/.config/Exodus Eden
so you can destroy the application directory and install a new version without worrying about loss of your wallet.
I make a folder in my user directory called Apps
and unzip the current version in there. I also have a symlink to ~/Apps/ExodusEden-linux-x64/ExodusEden
placed as ~/Apps/ExodusEden
. Then I made a Gnome menu entry pointing to the symlink
They really should be installing in standard linux directories and have an apt repo to enable automatic updates. They don't even have an update notification within the application. I manually check for updates every week and it's getting a bit tiresome.
They should have enough income now to afford hiring someone who knows how to package an application properly. Those file names you asked about are the result of the fact that Exodus Eden is an Electron based application. It's an application framework that basically lets someone build a locally-run webapp with a chrome-based rendering engine. It's pretty popular. Slack uses it for their Mac/Linux/PC clients too. It lets you build the app once and compile for all those platforms without any real changes. You can read more at electronjs.org
Electron runs your app in the main process and the web browser window runs in a child renderer instance. It’s a little involved, but the documentation is decent.
I agree with u/Marble_Wraith.
Make an Electron app. You can even build in an auto update function, see https://electronjs.org/docs/latest/api/auto-updater
This will be a lot easier than running Apache for some HTML pages, just send them the .exe and they doube clicks on it to open - there‘s nothing easier than that.
Electron is well documented and is really popular, so you‘ll find a lot of info and libraries as well!
I would guess the OP thought the benefits would be on par with the benefits of Electron. It’s essentially a port of Electron from JS to Python.
I think it’s pretty awesome. If I had my way, I’d always prefer to write code in Python, rather than JavaScript.
Or I think even better, let the main process handle that sort of stuff.
You can call the functions from your renderer via ipcRenderer.invoke() and return the response with a promise.
It's not that complicated. Electron gives you a main process that runs in the background, has full access to the host OS and can spawn one or more "renderers", i.e. browser windows that run independently. Pages loaded in renderers do not have direct access to the Electron APIs: those must be exposed manually by using a "preload" script (which is where most of the complexity comes from).
For a simple app all you have to do in the main process is opening a window, telling it to load your index.html
(which doesn't have to be on a web server, you can just place it in the assets folder Electron provides) and exiting when the window is closed. Stick your serial port code in the preload script and everything else in the HTML page. Take a look at Electron's quick start guide for code examples.
There are no inherent disadvantages of using Electron, from Electron's documentation concerning security:
>Security, Native Capabilities, and Your Responsibility
>As web developers, we usually enjoy the strong security net of the browser - the risks associated with the code we write are relatively small. Our websites are granted limited powers in a sandbox, and we trust that our users enjoy a browser built by a large team of engineers that is able to quickly respond to newly discovered security threats.
>When working with Electron, it is important to understand that Electron is not a web browser. It allows you to build feature-rich desktop applications with familiar web technologies, but your code wields much greater power. JavaScript can access the filesystem, user shell, and more. This allows you to build high quality native applications, but the inherent security risks scale with the additional powers granted to your code.
>With that in mind, be aware that displaying arbitrary content from untrusted sources poses a severe security risk that Electron is not intended to handle. In fact, the most popular Electron apps (Atom, Slack, Visual Studio Code, etc) display primarily local content (or trusted, secure remote content without Node integration) – if your application executes code from an online source, it is your responsibility to ensure that the code is not malicious.
From their documentation concerning security:
>Security, Native Capabilities, and Your Responsibility
>As web developers, we usually enjoy the strong security net of the browser - the risks associated with the code we write are relatively small. Our websites are granted limited powers in a sandbox, and we trust that our users enjoy a browser built by a large team of engineers that is able to quickly respond to newly discovered security threats.
>When working with Electron, it is important to understand that Electron is not a web browser. It allows you to build feature-rich desktop applications with familiar web technologies, but your code wields much greater power. JavaScript can access the filesystem, user shell, and more. This allows you to build high quality native applications, but the inherent security risks scale with the additional powers granted to your code.
>With that in mind, be aware that displaying arbitrary content from untrusted sources poses a severe security risk that Electron is not intended to handle. In fact, the most popular Electron apps (Atom, Slack, Visual Studio Code, etc) display primarily local content (or trusted, secure remote content without Node integration) – if your application executes code from an online source, it is your responsibility to ensure that the code is not malicious.
Some ignorant answers here...
I'm a web developer. I write for browsers all the time, not so much for OSes. To leverage the tech I'm used to using I used Electron to build it which is basically a headless Chrome browser with special powers (like access to the local file system that we needed here). Bulk of the size is from the Chrome binary/libraries.
There's an Electron app called Lector. If you want an app for read PDFs only, it's the best choice. It's open-source and lightweight.
Well it really depends on your use case.
They're both good languages to learn in terms of marketability but I would definitely consider becoming proficient with JavaScript as well since you'll find that it's in use pretty much everywhere these days.
There's a book series called "You Don't Know JS" which does a decent job laying the groundwork if you're inexperienced with the language.
Well, since desktop apps are now also web apps, you might be interested in making desktop web apps.
Web apps are more easily made with a web framework, and for web development to not suck, that framework better be in TypeScript. One TypeScript framework that's in high demand is Angular. Use Angular, and you'll be immediately marketable for a nice entry-level salary of 40K CAD and you'll only go up.
With your Angular knowledge, try to package an Angular app with Electron. Once you've got that covered, you can now create desktop apps! Though I haven't personally seen high demand for Electron where I live. People prevent web apps to be on the web. I wonder why (/s).
Now, that making a web app without an API to store data and interact with a server is a bit… not very useful. I'd recommend creating a REST API in Go and connecting it to a database, and you've got a fully-fledged end-to-end framework.
You need to prefix the partition name with "persist:". From the docs:
> If partition starts with persist:, the page will use a persistent session available to all pages in the app with the same partition. if there is no persist: prefix, the page will use an in-memory session. If the partition is empty then default session of the app will be returned.
It shouldn’t be too terribly complex. There are several ways you could do build it, like with Python GUI libraries, or Gnome widgets (basically, any GUI library you like), but React would be great for this.
Since in the rendering it looks as though he is displaying an open terminal window in the small screen, I’d build an Electron app, so I’d have access to the underlying OS via Node.js (so you can program touch bar buttons to open files, display homepage or weather, etc).
Electron, in case you’re unfamiliar, is essentially the fundamental shell of the Chrome (actually Chromium, the open-source version) Browser, which just displays a single web page (for simple apps like this hypothetical TouchBar) representing your app.
Then, in the main web page, you could use React.js to build a <TouchBar/> component, a container for wrapping the buttons you add, and a <BaseTouchBarButton/> Component, with your Core functionality (i.e. detect tap –> perform action).
By extending the base button component, you could build bespoke buttons for any sort of action you want; e.g.: * Open a file highlighted on main screen in your text editor or IDE * Open a terminal * DIY virtual Amazon Dash button (i.e. one-click shopping) – kidding! ;) * Control buttons for controlling a UGV or UAV (drone) robot * Order pizza
Really, once you got the basic button concept down, you’d be limited only by your imagination, for practical purposes.
Something similar is here: [WriteBar])https://electronjs.org/apps/writebar)
It works on macOS, but could potentially be adapted or used for inspiration.
Thank you so much!
I got too caught up in trying to find a tool that could connect them directly. I now see the bigger picture.
WebSockets seems like a good way to go... But at a glance, it seems to be a bit over my head. I'm going to first try this ipc-main module, since I'm more comfortable with Electron.
I tend to forget this idea when it comes to personal/hobby projects: "having that separation of concerns in place gives you great flexibility on the frontend/rendering engine." Thanks for reminding me. :)
Not a problem!
There's a concept of the "Main" process and the "Renderer" process where the main is more like the back end you're used to, and renderer process is for your Web-like front end application.
​
Here's the docs! https://electronjs.org/docs/tutorial/application-architecture#aside-communication-between-processes
Honestly, as a CS major, one of the most important (if not the only) resource you’ll ever need is Google. Trends in CS shift really quickly and the only way you’ll stay at the forefront of it all is if you know how to effectively google.
You could start by checking out the StackOverflow Developer survey ( https://insights.stackoverflow.com/survey/2019 ) They do a yearly survey of tons of developers and looking at the popular languages/frameworks used can help you choose which to learn for yourself.
If you’re new, I’d recommend either JavaScript or Python, as these are very high level languages with a lot of community support and documentation, as well as being really easy to pick up. For your app, you could write it in ElectronJS ( https://electronjs.org/ ), which allows you to write something akin to a website, which you also wanted to do, but distribute it for offline use across all major operating systems. In this case you would just need to learn HTML, JS, and CSS.
If you wanted to use Python, you could use PyQT, which is a Python binding of a C++ GUI library, although this will be way more intensive.
If you’re into Java, I’d look at JavaFX and Scenebuilder
In any case, I would recommend to use Google to try and find libraries created by people beforehand, as there really is no reason to constantly reinvent the wheel. GL!
NW.js is a little easier to get started with than Electron.
The Electron team laid out some of the core differences between Electron and NW.js here: https://electronjs.org/docs/development/atom-shell-vs-node-webkit
I'll add there's more to APIs than just REST ones. For example:
APIs are connectors. It allows your program X to interface with program Z to achieve some result without you, coder of X having to learn the ins and outs of Z.
You haven’t set the BrowserWindow as the first argument in showOpenDialog.
It needs to be: ```js import { dialog } from ‘electron’;
Const win = new BrowserWindow(); win.loadURL(‘index.html’);
dialog.showOpenDialog(win, { defaultPath: ‘/Desktop’ }); ```
Edit:
The recent Desktop releases of the Twine 2.x application are built using the Electron framework, which uses a combination of Chromium and Node.js to create an "executable" packaging of a HTML5 based web-app.
>Isn't the exe a chromium application?
So, yes.
However based on information found by Googling "Using Chrome extension with Electron app", like that found in this GitHub Issue and this Electron DevTools Tutorial, it appears that currently there is limited support for manually adding an existing Chrome extension to a released / installed Electron "executable".
Electron different process types main and renderer. The main process is the code that you have written, it's the code that starts your application and runs in the background, The renderer process is the window that is displayed for the user.
In your code, you are not loading a local resource, a html page, which you could then write your own javascript file for an load, which is were you would want to include the code from the link.
Since you aren't loading a local file you either have to preload a script (search preload can't create a direct link), which would be a local javascript file that contains the code to load the spellcheck script. The other way would be to execute the code, but I think you might need the nodeIntegration web preference enabled to do so. So the preload script would be the better option
So assuming your app.js and preload.js files are in the same folder
// app.js window = new BrowserWindow({ width: 800, height: 600, icon: __dirname + '/icon/appIcon.png', show: false, webPreferences: { nodeIntegration: false, preload: 'preload.js' } })
// preload.js var webFrame = require('electron').webFrame; var SpellCheckProvider = require('electron-spell-check-provider'); webFrame.setSpellCheckProvider('en-US', true, new SpellCheckProvider('en-US'));
I haven't tested this, but should be how it's done if i recall correctly.
С добрым утром! Давно в заморозке?
Вот, например: https://electronjs.org/
Skype, Slack, Signal такие стэндалоны.
Но дело даже не в этом, в а том, что человеку плагины надо писать, при чем тут стэндалоны?
That's P3X OneNote, it's just an Electron wrapper around the website version of OneNote.
Hope that helps. The iconset is "Korla".
There are a few things I can see are problems.
It looks like you are missing the "main" attribute in the package.json which points to the electron main process javascript. Take a look at https://electronjs.org/docs/tutorial/first-app it should help clear up that issue.
Is there a reason why you have
> pathname: path.join(__dirname, 'resources/app/angular-flask/index.html'),
instead of
> pathname: path.join(__dirname, 'index.html')
> I don't even know what C++ is besides another coding language.
That's basically all there is to it. There's lots of languages and each has a set of advantages and disadvantages. C++ for example can be very fast, and easily hooks up to lots of other bits of code (libraries). However, it's generally agreed to be a very complicated language and as a result it can be difficult to write complicated programs that don't have major bugs. It's often chosen only when you really need things to go fast. For example, a lot video games are basically a "core" of C++ so that they'll run smoothly, with something more user-friendly like Python or Lua used for the rest of it.
Similarly, Python has some of the best libraries available for machine learning (AI) and so is a common choice if that's what you're working on.
> Feels bad man. I'm still a junior in HS learning how to program with Python, JavaScript and how to create boring ass websites with HTML and CSS.
Why? Python is a fantastic language to teach in, and its everywhere - even if you're not working websites. JS is more tied to the web, but is also commonly used to create server software via Node.js and desktop apps via Electron. And since a large chunk of the industry is the web now, it certainly doesn't hurt to know some HTML and CSS.
If you're worried about "wasting" time learning a language you won't use, don't be. Even if Python and JS don't end up being useful to you, a lot of concepts from basic to complex can be carried to any language. Sure, the details will probably differ somewhat, but if you understand a concept it only takes a few minutes to figure it out in a new language.
VS Code is an Electron app, can do a quick Google search to confirm it. And it's definitely based on Chromium, you can enable the Chromium debugger pretty easily:
https://electronjs.org/docs/tutorial/debugging-main-process-vscode
Here's some ideas:
- Project Management Application (Web or Desktop [I would highly recommend looking into Electron for Desktop: https://electronjs.org/])
- Note-taking application (that automatically encrypts the notes)
- Music player desktop app (maybe that can add songs to your library from third-party places like YouTube?)
- An encrypted email client (like Thunderbird)
- A business chat app
- Spreadsheet editor that can convert Excel, MySQL, etc to .csv
- Password manager
Let me know if you end up taking any of these ideas to fruition
> Do frameworks such as Ionic and Electron allow to interact with the system itself such as launching terminal commands from a visual interface?
Electron allows this really easily, just use ordinary NodeJS API (exec).
Don't mind the haters, I use a lot of CLI stuff and still like Electron tools like Etcher. If the tool isn't supposed to be long running (e.g. always running and accessible from tray), I don't care in what tech it is written. People who don't want to or don't know how to use CLI IMO will prefer slightly more memory hungry GUI app than nothing. Memory is dirt cheap, who cares if Slack uses 230MiB when I have 32GiB? Sure, I would prefer it being written in C/C++, but I use a lot of tools which are heavy, because if there isn't other alternative, I'll use what exists/works. It used to be a real issue with memory and performance, but I don't think it is nowadays relevant (maybe for mobile devices or very bad notebooks?).
Yes, that’s what electron is for. https://electronjs.org/docs/tutorial/first-app#electron-development-in-a-nutshell
You’d still need to make changes to it (like client-server communication doesn’t need the network since both are running on the same machine and electron has its own internal IPC mechanisms) but most of the code would probably work.
Of course there are, but they are all more involved than just using the Formats that are already better suited for the Task at hand.
The Guy you linked probably uses something similar to https://electronjs.org/. He has apps for iOS and MacOS (which you can only deploy from MacOS). It's probably something more specific to that Platform that can be ported. Its probably not Xamarin because that would Cross-Compile to Android afaik.
In the End it's a Browser (or "Webviewer") disguised as app. Nothing wrong with that but its absolute overkill for what he's doing, he just hasn't any better options available, just like the rest of us.
Maybe the middle ground is something akin to https://en.wikipedia.org/wiki/Progressive_web_applications
Still, everyone has to develop their own which is bad and it's not trivial to do.
pull requests are welcome. One thing that would be helpful would be to package ledgerble (https://electronjs.org/docs/tutorial/application-distribution) for windows/mac so that user don't need to install npm.
That is generally correct. The two main background processes are for rendering the design and the other process is specifically for user on an older operating systems (pre Windows 10) and that process will handle notifications.
Discords RAM usage isn’t an exact science, but in most cases it will use around 150mb-400mb. You can learn more about it through Electron. The platform that Discords desktop client is built off of. Again it varies on many different things.
For the oculus store you need to accept the app by oculus. You should be able to build a apk. And then load via Sidequest. But I have not done it myself yet, so I speak here theoretically. Or you can try you app build to an apk with Electron https://electronjs.org/