Hacker News new | ask | show | jobs
by rjusher 3981 days ago
I am really curious at how is the scene for .NET developers, with the rise of things like nw.js(node-webkit) and electron(github's atom shell).

I do know that the framework is stronger and more test proven but the traction this type of tools are earning is important.

Will the .net framework will conquer the heart of developers with the release of some of their projects as open source, and will create the best cross platform desktop development kit?

Or is it doomed to be a Windows only beutiful thing.

4 comments

I worked with .NET for years and never made a desktop app. C# is a great language to work in when making backend services for websites, IMO (even though there's a whole load of crap that comes along with the framework).

These days I've moved on, but .NET is far from a desktop-only thing. Particularly when you can make iOS apps with Xamarin, etc.

>C# is a great language to work in when making backend services for websites, IMO (even though there's a whole load of crap that comes along with the framework).

Exactly how I feel. I've been working professionally with C# professionally for over a year now doing a lot of backend stuff for websites and it's great. .NET shares a similar philosophy with Python in that it's a "batteries-included" language. Need a REST endpoint? I can have one up and running from scratch in under 5 minutes with WebApi. Inter-process communication? Let me create an MSMQ instance - done! The only downside is what you mentioned - whole loads of crap that come with the framework. I hate IIS for this reason (but love how easy it is to deploy web services). We're currently working on an HTML5 replacement for our current Silverlight stack (lol) and wanted to go with Node.js instead of IIS, but we really want C# on the backend and don't want to hack it. From our point of view, JavaScript is great for the front end but completely idiotic for the amount of work we do on the backend. Type safety and static compilation is essential for us.

Others have mentioned this but they've really migrated away from an IIS-only approach. .NET 2015 has really tried to emphasize that you don't need IIS. Take a look at some of the .NET core documentation. They're officially supporting Linux and OSX when it's released (tentatively Q1 2016...so far away) but it will "just work" out of the box.

http://blogs.msdn.com/b/dotnet/archive/2014/12/04/introducin...

Honestly I've found getting up and running with Mono and Kestrel really simple with the latest beta. I ran from Visual Studio without really doing anything and then switched to OSX and it worked perfectly. You still need to rely on some mono classes as of now for things that haven't been open sourced (Xml streams....) but even the mono implementations worked just fine.

It's not really clear what you're trying to accomplish. Are you running a central server, or local server for a desktop app?

In addition to Owin self-host, you might want to check out Edge.js, which lets you host .NET under Node: http://tjanczuk.github.io/edge/

You don't need to use IIS for hosting anymore, look up Owin self hosting. You'll have to build some of the stuff IIS gives you yourself, but the speed is better
Look into Nancy for some really interesting options. .net http services without IIS. Increasingly, there's something for everyone.
If you can live with the Windows only target, developing desktop apps in .NET/WPF using Visual Studio is incredibly pain free in a way that I've never found developing HTML websites. Maybe those frameworks take some of the pain away, but I can't imagine that ease of development is anywhere near that of WPF. It helps that C# is a very nice language with a really great standard library.
Webapps still haven't catched up with the 90's Delphi experience of doing desktop apps.
Yeah. The sad thing is so many web devs have never written a desktop app of any kind, so have no idea how painful the web really is. I loved Delphi in the 90's. That said, modern tools have far surpassed it.

If you want a C#+WPF type experience that's also open source and cross platform, check out Kotlin and JavaFX. JFX is the new third gen (post-Swing) GUI toolkit in Java and it's quite impressive. It's scene graph structured like WPF, has data binding, but also pays close attention to visuals: you can style it with a dialect of CSS, everything is 3D accelerated via D3D or OpenGL, you can do shader based effects on any part of the UI, etc. It has all the usual layout management and business components but also can do things like embedded h264 videos, 3D objects, and there's a tightly integrated embedded WebKit too if you need it.

Finally there's a tool that takes your app and spits out bundled/native packages for each platform, so the user doesn't ever have to know that the app was written in Java. No JRE or awful toolbars to install.

I've written a few apps this way and it's much more fun than writing a web app.

"The sad thing is so many web devs have never written a desktop app of any kind, so have no idea how painful the web really is."

Agree fully. there are concepts that are fully mature in desktop applications, that the web has yet to come close.

Alternatively writing web apps using Knockout seems so much nicer than WinForms and INotifyPropertyChanged hell. Maybe WPF solves this, but I wouldn't want to go back.
I was interviewing student devs recently and was flabbergasted how many of the kids doing greenfield personal projects were still using WinForms. It's frustrating how Visual Studio pushes them to work with this bone-headed warty out-of-date technology. These weren't old hands using somethign familiar just to get an MVP for a personal project, these were kids who didn't know any existing GUI frameworks and started using WinForms because it's the default in VS.
Knockout is a data binding framework for DOM/HTML based apps.

WPF and JavaFX both have a mature reactive data binding framework so altering your model causes updates to the UI and vice-versa. JavaFX has an entire functional reactive framework in it so you can build lazy functional transforms over observable collections and the like. The fact that it's an API rather than a DSL makes it kind of ugly, I believe LINQ is a little similar but much more nicely integrated for the .NET world. But it's all there.

I must agree on that, knockout make things much nicer. KO components are a great thing also.
I tried JavaFX circa 2009 and it was scary; pure black magic in terms of what the same code would on a given day. I guess Oracle put some effort into it over the years, but never, ever again will I touch that language.
It's not a custom language anymore. It's just a regular widget toolkit API like Swing. There is a thing called FXML which is a run of the mill XML based layout language, with a GUI designer called Scene Builder.
Modern JavaFX (Java 8) barely has any resemblance with the original JavaFX.
This is the second recommendation I've heard recently for JavaFX. I will check it out to see what it is about.
What's the name of this tool that spits out the thing per platform?
javapackager. It comes with JDK8+. It can make signed DMGs on MacOS, EXE/MSI packages on Windows, DEBs/RPMs/tarballs on Linux etc. They don't have any Java branding. Here's an example of how to use it:

https://github.com/vinumeris/lighthouse/blob/lighthouse/mac-...

The catch is you need the platform to make packages for the platform. It can't make Mac DMGs from Windows, for instance. I have a Mac laptop with Parallels so I can make packages for all three major platforms.

To stay on the .NET topic, this is the closest the JVM world currently has to something like .NET Native, I guess, although of course, there is no native code involved .... it just looks that way to the end user. I guess when .NET matures as a cross platform solution they will need a similar tool, as other platforms don't have the runtime installed by default.

Most commercial JVMs do have native compilation, .NET Native style though.
I do understand that .net is far more powerfull, far more everything, but the best tool not always is the one that conquers the world. I would truthfully love to see Microsoft bring WPF to other platforms.
I love C# enough to do side projects in it, and I never thought I would say that about a msft product, especially with so many powerful scripting languages out there now. But it really is a good language, and the development environment beats any web framework toolset I have used.
In terms of desktop development, it's important to keep in mind that Windows is still what's running on ~90% of desktops and laptops outside a few bubbles. I doubt your average desktop .NET developer has spent much time thinking about those sort of cross-platform approaches, compared to how much the web has eroded the market for rich client apps.
It's easier to write (and deploy) your code in C# than Java, but it's easier to use other people's code in Java than C#.
I would disagree with that statement. Nuget packages make it incredibly easy to use other people's code in C#. You add the package, and it's ready to be referenced. Automatically pulls it in on builds, too.
Yeah, there's just much less important OSS implemented in .NET than Java. That was my point.
Sure, I can agree with that, but that doesn't exactly impact the ease of using other people's code. The availability of said code? Definitely. The ease in which you can use it? I'd give that to C# just because of not having to download the libraries and keep them up to date yourself.