r/programming • • Dec 03 '18

Open Source .NET – 4 years later

http://mattwarren.org/2018/12/04/Open-Source-.Net-4-years-later
53 Upvotes

16 comments sorted by

View all comments

7

u/tuoret Dec 04 '18

This is pretty off topic but I had no idea it's been 4 years since they went that way. Glad to realise how much progress has been made at least

-6

u/tanstaaf1 Dec 04 '18

Notably - and probably not by chance - C# on Linux appears to be going nowhere; notably because the GUI is going nowhere.

Microsoft supports Linux running UNDER Windows and not the other way around. Hope is not a strategy.

First you eat the worm. And then the worm eats you.

6

u/oblio- Dec 04 '18

"Java on Linux appears to be going nowhere; notable because everyone is using it for backend applications"

C# is competing with Java, basically. C# is not competing with cross platform front end languages, tools and framework because at this point all the big guys have abandoned the desktop, basically. The Linux desktop wasn't abandoned because there wasn't any to take into account :D

On a more serious note, I'm as sad as you are about this, because I had wanted to build a .NET cross platform app, Win/Lin/Android/iOS/MacOS. But from their point of view it makes sense, you invest where you get the most bang for the buck.

6

u/m50d Dec 04 '18

Java comes with a working cross-platform GUI library though. Maybe not a particularly good one, but enough to display some basic forms and buttons for configuring your backend app or what have you. For internal tools and secondary functionality on what's primarily a backend app it's often good enough. As long as C# can't do that, it's a substantial advantage for Java, even if you never see a Java GUI in a consumer-facing application.

2

u/oblio- Dec 04 '18

True, but Java was designed to be cross platform. .NET wasn't, the GUI libraries are basically the Windows UI layer...

-4

u/[deleted] Dec 04 '18

There is Tcl/Tk for GUI. No need to ever use anything else. It's just retarded to want to use the same language for your GUI and your logic.

1

u/m50d Dec 04 '18

Being able to reuse all your functions and datatypes in different components of the same system is really useful. For a "big" dedicated UI, the advantages of a language that's better at UI might outweigh the costs of reimplementing everything, but certainly for a little utility that's part of a larger system you're much better off using the same language.

0

u/[deleted] Dec 04 '18

Why would you ever want to reuse something from your logic part in your GUI? Reeks of a very leaky abstraction.

GUI must be entirely separate and, ideally, unless it's 3D models, video or audio, must communicate with your logic over a dumb text-based protocol.

1

u/m50d Dec 04 '18

Most immediately you want to run the same validation code on the GUI and the backend - a lot of bugs are caused by inconsistent validation in different places.

But you also want to use the same datatypes - why have two representations for the same thing? Of course it's important that what you pass between client and server be inert data (i.e. records), but there are far better ways to achieve that than a custom text-based protocol, which is adding a lot of overhead and opportunities for error to no benefit.

0

u/[deleted] Dec 04 '18

Validation in the ui and the logic layer are different. Do not be a lazy copy-paster, do the right thing.

And, text-based communication have tons of benefits:

  • scriptable

  • easy to replace gui frontends

  • testable

  • easy to insert something (e.g., logging, network forwarding, etc.) in between

And no drawbacks whatsoever, IPC is much faster than your gui latencies anyway (unless it's a video, of course)

2

u/m50d Dec 04 '18

Validation in the ui and the logic layer are different.

No, the same type has the same set of valid states, by definition.

Do not be a lazy copy-paster, do the right thing.

This is utterly backwards. You avoid copy-pasting by avoiding repeating yourself, which means reusing the same logic - not a copy but the actual same code - when you want to do the same thing.

And, text-based communication have tons of benefits: scriptable easy to replace gui frontends testable easy to insert something (e.g., logging, network forwarding, etc.) in between

All that remains true for more structured communication mechanisms, which avoid the security issues and unreliability inherent in text-based approaches. Custom parsers are still one of the biggest sources of security vulnerabilities, and interleaving control and data is still another one.

→ More replies (0)