Electron for c# developer


I know c#, powershell, forms, wpf, classes, types, async and other things. But no idea about HTML,CSS, JavaScript, DOM, node packages, and all things related to web.

I want to create a cross-platform application, mod manager like "Nexus Mod Manager’

What are major challenges for someone without web background? Does anyone c#/java developers could share experience? I want to avoid investing 6 month of learning only to face a wall because “web tech aren’t good for it”.


OK, I’ll bite :slight_smile:

I’ve made this transition over the past several years; I still have a foot in both the c# front-end and electron-front-end worlds. Ironically thanks to MS the good news is that these days you can live in a mostly typed environment, using Typescript and a terrific IDE, vscode, which I now prefer over visual studio. The language is going to be no problem for you, compared to all the integration tasks you will face…

The bad news is that there are so many moving parts compared to the .net world, and they are all moving out of sync with each other. With .net, MS puts out a new .net every few years, and everything: the compiler, the BCL, the UI libraries (even winforms), nuget, etc… they all “just work” together.

In the web ecosystem, almost every single piece of your app and development come from different organizations and independent developers. So the job of managing all of these dependencies, and which ones work together, falls to you. You can handle it, but count the cost. Definitely read https://electronjs.org/docs/tutorial/boilerplates-and-clis; CLI’s in particular are a way to limit how much of this churn reaches you, but often Typescript isn’t included. For boilerplates, pay close attention to if they are being updated. I started with one and had to learn a lot more than I wanted to in order to keep up with new components, because it didn’t ever get updated.

Within the javascript community, we complain that what is “the best library/framework/build system” changes almost annually. It can be quite hard for a new comer to know what to use, and what is best avoided. There is always something new, something better. And there are old things that we have learned are best left behind (jquery and angular, in my own experience). You want to pick from the things in-between these extremes.

All of this means that the devs on my team who don’t like continuous learning are less happy in this ecosystem than they were in .net. You fall behind really quickly in this space.

My projects are very long lived (I’ll likely be supporting them 10 years from now), so I’m fairly conservative in my choices. Here is my stack:

Less or SASS
Webpack 4
React (might go with vue.js if I was starting over… which ecosystem offers you the components you need?)
Mobx (beware the assumption you see everywhere that you have to learn redux… your app above surely doesn’t need it)

Some more recommendations:
If you can help it, learn all the other things before adding on electron. Just build with a web browser; if you will eventually need access to the file system, just mock that part and add it later when you move to electron.

I haven’t used it, but this might be a good way to get started: https://github.com/wmonk/create-react-app-typescript. That will let you put off learning about webpack.

Good luck!


Holly cow, that’s wonderful feedback, thank you!