Need advice about which tool to choose?Ask the StackShare community!
.NET vs Electron: What are the differences?
Developers describe .NET as "A free, cross-platform, open source developer platform for building many different types of applications". .NET is a general purpose development platform. With .NET, you can use multiple languages, editors, and libraries to build native applications for web, mobile, desktop, gaming, and IoT for Windows, macOS, Linux, Android, and more. On the other hand, Electron is detailed as "Build cross platform desktop apps with web technologies. Formerly known as Atom Shell, made by GitHub". With Electron, creating a desktop application for your company or idea is easy. Initially developed for GitHub's Atom editor, Electron has since been used to create applications by companies like Microsoft, Facebook, Slack, and Docker. The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on io.js and Chromium and is used in the Atom editor.
.NET can be classified as a tool in the "Frameworks (Full Stack)" category, while Electron is grouped under "Cross-Platform Desktop Development".
Some of the features offered by .NET are:
- Multiple languages: You can write .NET apps in C#, F#, or Visual Basic.
- Cross Platform: Whether you're working in C#, F#, or Visual Basic, your code will run natively on any compatible OS.
- Consistent API & Libraries: To extend functionality, Microsoft and others maintain a healthy package ecosystem built on .NET Standard.
On the other hand, Electron provides the following key features:
- Use HTML, CSS, and JavaScript with Chromium and Node.js to build your app.
- Electron is open source
- maintained by GitHub and an active community.
"Tight integration with visual studio" is the top reason why over 243 developers like .NET, while over 50 developers mention "Easy to make rich cross platform desktop applications" as the leading cause for choosing Electron.
.NET and Electron are both open source tools. It seems that Electron with 74.4K GitHub stars and 9.72K forks on GitHub has more adoption than .NET with 11K GitHub stars and 2.37K GitHub forks.
Stack Exchange, Starbucks, and Docplanner are some of the popular companies that use .NET, whereas Electron is used by Slack, WebbyLab, and triGo GmbH. .NET has a broader approval, being mentioned in 1561 company stacks & 231 developers stacks; compared to Electron, which is listed in 213 company stacks and 366 developer stacks.
I have to write an application for a Windows Server that either runs on a scheduled task or can run on a Windows server and triggered by a webhook. What other .NET project types or methods within a project can I do this with?
I know I could probably host an API on IIS on the Windows server and do it that way, but all my APIs are in Azure App service, and this has to integrate with the Windows desktop application.
What you mean integrate on "all my APIs are in Azure App service and this has to integrate with Windows desktop application.". Try to explain a little bit what's your requirements.
If you want to Read/Write a SQL DB on premises, you can use a Azure Gateway without deploy anything in your server, another choice with SQL Server is to move the DB to Azure (if supported). You can use the triggers on Azure Functions to write/read something on Azure Storage, from your Server you can read the storage and perform some tasks. As you can see there are multiple choice without writing much code on premises, try to clarify your requirements.
It all depends on your use case. You mentioning "scheduled task" appears you want to use a Worker Service
If you want to trigger your actions you can host a webapi, too.
Bottomline: Both use cases suffice your needs so your course depends on where you want to "control" your app ( set delay, maybe sometimes start the action manually ). WorkerService -> Config file on the host Api -> Configure from client
Decided to change all my stack to microsoft technologies for they behave just great together. It is very easy to set up and deploy projects using visual studio and azure. Visual studio is also an amazing IDE, if not the best, when used for C#, it allows you to work in every aspect of your software.
Visual studio templates for ASP.NET MVC are the best I've found compared to django, rails, laravel, and others.
Pros of .NET
- Tight integration with visual studio271
- Stable code261
- Great community188
- Reliable and strongly typed server side language.181
- Microsoft140
- Fantastic documentation119
- Great 3rd party libraries89
- Speedy79
- Great azure integration71
- Great support63
- Linq33
- C#33
- Highly productive33
- High Performance30
- Great programming languages (C#, VB)28
- Open source24
- Powerful Web application framework (ASP.NET MVC)19
- Clean markup with razor16
- Fast16
- Powerful ORM (EntityFramework)15
- Dependency injection13
- Constantly improving to keep up with new trends10
- Visual studio + Resharper = <310
- High-Performance9
- TFS8
- Security8
- Huge ecosystem and communities7
- Integrated and Reliable7
- Job opportunities7
- Light-weight6
- Lovely6
- Variations5
- Asynchrony5
- {get; set;}5
- Support and SImplicity4
- Concurrent4
- Scaffolding4
- Default Debuging tools4
- Entity framework4
- Useful IoC4
- Blazor3
- Nuget package manager2
- F♯2
Pros of Electron
- Easy to make rich cross platform desktop applications68
- Open source52
- Great looking apps such as Slack and Visual Studio Code13
- Because it's cross platform7
- Use Node.js in the Main Process3
Sign up to add or upvote prosMake informed product decisions
Cons of .NET
- C#13
- Too expensive to deploy and maintain12
- Microsoft itself8
- Microsoft dependable systems8
- Hard learning curve5
- Not have a full fledged visual studio for linux3
- Tight integration with visual studio3
Cons of Electron
- Uses a lot of memory18
- User experience never as good as a native app8
- No proper documentation4
- Does not native4
- Each app needs to install a new chromium + nodejs1
- Wrong reference for dom inspection1