9 ms·
The amazing thing is that you can potentially write all your code in C# and have backend/frontend logic for the web (ASP.NET), Windows, Windows Phone, and even
by gum_ina_package 13y ago
The amazing thing is that you can potentially write all your code in C# and have backend/frontend logic for the web (ASP.NET), Windows, Windows Phone, and even iOS/Android (via Xamarin). Wow.
- Aardwolf 13y agoBut what about Linux?
- gum_ina_package 13y agoMono! Lots of ASP.Net projects (like Nancyfx or SignalR) are actually built on Mono. I think there's some hope that web dev on Windows isn't dead.
- dmix 13y agoI tried Keepass2 with mono on Linux and it's pretty slow and unnatural UX experience. Much like running Wine. On OSX Keepass2 mono just froze constantly and looked weird. I've had similar experience with other cross-platform apps. Total cross-platform is a pipe dream. Just like Java or more recently HTML5/JS cross-platform mobile apps, they are almost always a half-baked solution compared to proper native OS apps. The UX and performance will never be consistent enough to make it better than just investing in native development (Note I'm talking about software, not simple content consumption apps where HTML5 in browser is fine). Having primary operating system -> tablet -> phone is a good enough goal. They should focus 100% and make it as stable ass possible.
- chc 13y agoHow is supporting two desktop operating systems any less realistic than supporting a desktop operating system and at least two separate mobile form factors on three different platforms? Both have the potential to suck if one platform doesn't get enough attention.
- mmckeen 13y agoI think Qt does it decently, as far as the desktop platforms are concerned. I mean look at something like Origin or the Battle.net desktop app.
- 72deluxe 13y agoI would also say that wxWidgets makes it pretty easy, particularly as you have the source. I know there is a mass of #defines in it etc. but I have found it very useful and reliable across the 3 major platforms (Win, Linux, Mac). And it renders natively on them, unless you force wxUniversal (which does its own rendering of controls, like Qt does). I would even argue that Qt does a worse job of making stuff look native, particularly on Mac OSX; wxWidgets controls are native on Mac OSX, as underneath it is Obj-C mm files everywhere.
- sandyarmstrong 13y agoKeePass is a bad example. It's a Windows Forms app. If they wanted to properly support Linux, they could continue to share most of their C# code, but write a tailored UI using something like GTK#. Nobody is truly advocating "write once, run anywhere".
- Pxtl 13y agoMono makes no pretext of offering cross-platform GUI live, and so any app that attempts to use the same GUI on multiple platforms using winforms on Linux or gtk on win32 is going to be ugly. They're up front about this.
- keeperofdakeys 13y agoNaturally mono probably has some quirks, which you need to keep in mind during development. However, you can make successful apps using it. The Unity3D engine uses mono on linux, and the games using it run fine (even on my laptop).
- camus2 13y agoin theory Microsoft COULD support linux directly,would be a bit of work, but they would not even need mono. Now from a business persperctive would it make sense? i dont know,Microsoft business relies heavily on Windows. But hey,anything's possible. Problem with mono is ,mono or not,.net dev without VS kind of sucks,and VS is Windows bound.
- emmanueloga_ 13y agoMiguel de Icaza considers Linux dead (http://tirania.org/blog/archive/2013/Mar-05.html http://tirania.org/blog/archive/2013/Mar-05.html). It shows. Last time I tried to compile latest version of mono on ubuntu (a couple of months ago) it was a painful process of missing dependencies and compiler errors. In the end, I couldn't make it run.
- fleitz 13y agoThe amazing thing is that you can potentially write all your code in C and have backend/frontend logic for the web, Windows, Windows Phone, OSX, FreeBSD, OpenBSD, Tru64, VAX, Arduino, Linux Kernel, Windows Kernel, Mach, Hurd, and practically every processor or operating system ever built, and even iOS/Android (via Xamarin). Wow. You can even link to and reuse that code from languages such as: C++, C#, Java, Ruby, Perl, Python, assembler, lua, scheme, lisp. The future is gonna be so 1970.
- tdicola 13y agoThere's even a text editor that runs on all those platforms!
- gecko 13y agoC# is a much higher-level language than C, with a much richer set of libraries that can be relied upon to be everywhere. That's why it matters.
- berkut 13y agoYou can rely on C# being on all platforms by default? Linux and OS X? Really? Last time I used Windows (several years ago), there were always apps that needed to download and install the latest version of the .NET runtime... - is that still a thing?
- dragontamer 13y agoint main(){ puts("Hello World"); } This doesn't work in Windows. The standard entry point to Windows is "int CALLBACK WinMain( _In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow );" C never really "ran" on Windows. C is built on top of abstractions to even run on Windows. A SegFault in standard C is supposed to be passed to a signal handler (in Linux/ OSX). A SegFault in Win32 is passed to the SEH exception handler, to the __except{} statement in some function as the stack is unwound. (Oh yeah, __try{} and __except{} don't exist in "normal C", do they?) -------------- The "OS Language" of Windows is C++ (through COM and COM+ interfaces). The "OS Language" of Linux and OSX is C. The sooner you realize this, the easier programming on Windows is going to be. Windows never really supported C as a first class citizen. C code cannot easily call core Win32 libraries like DirectX. (It can, but it is significantly harder than just using the C++ COM interfaces) C# works very closely with COM interfaces in Win32. And thus, C# is the second language of choice of Windows. The only reason C# hasn't overtaken C++ in everything seems to be politics. Mind you, Microsoft fully supports C# Device Drivers. The lowest level hardware interactions in Windows can be done with C#.