7 ms·
Cross Platform Development with Mono
- bigdubs 12y agoI love Mono Develop / Xamarin studio, but it needs split panes desperately.
- gum_ina_package 12y agoInteresting to see all the recent activity on HN about cross platform development. Seems like, as far as native code solutions go, C#/.NET is our best bet. As a C# junkie I'm excited about this, but also kinda sad that HTML5 cross platform development never really took off. Edit: When I said "native code", I meant that Mono allows you to wrap native libraries with greater ease than anything else I've ever encountered.
- rplnt 12y agoWhat about Qt? With python, C++, whatever...
- JasonFruit 12y agoI'm confused — how is C#.NET a "native code solution"? And what makes you say it's "our best bet"? I've been pretty pleased with PyGTK/PyQT cross-platform development, or, for that matter, Free Pascal LCL applications, if you want actual native code; I find them much less touchy to get working across platforms (though that could be just my relative level of experience with them).
- leafartist 12y agoHave you tired c#.Net recently?
- JasonFruit 12y agoIt's been a couple of years; I've been writing for my own satisfaction, and C#, for all its inarguable advantages, is not that much fun.
- Touche 12y ago.NET isn't native code.
- visualR 12y agoNo but you can wrap native UI libraries, the most critical piece that needs to be native. Contrast this with an HTML CSS UI.
- Touche 12y agoYou can wrap native UI libraries with just about every language in existence. That's not what people usually mean when they say "native" though. I think they mean precompiled to a binary for a specific architecture.
- visualR 12y agoyeah you can. The whole native vs non native is about whether the UI is native and directly integrates with the platform, not the language or whether there is a runtime.
- cwyers 12y agoThere are multiple native compilers for .NET. Xamarin uses one for iOS and Android apps (well, in the case of Android, you're compiling to Dalvik bytecode, but it's just as native as any other Android app).
- adamors 12y ago.NET is definitely not our best bet, because once its out of Windows land, the quality falls sharply. Mono is seriously lacking [1] so does Monodevelop etc. [1] http://mono-project.com/WPF http://mono-project.com/WPF
- CmonDev 12y agoIt really does feel like the best bet.
- tempodox 12y agoMono is not “cross” platform. It infects your environment with .NET which is very much a platform.
- francisl 12y ago"I still really like the .NET environment and C# language, ... " This is not my case, but I really do find value in learning a technology that helps you build cross-platform solution. I seriously considered using it. "Thankfully, there is the Mono .NET implementation that I can use and it is really well supported." But it's kind of unsupported and most of the time it lags behind. Currently on my brand new ubuntu system, it's version 3.2, on my "stable" ubuntu its 2.10. The current version is 3.4. " As well as being open source, Mono also has a company, Xamarin, sponsoring its development as they use the mono system for their IOS and Android ..." You cannot develop iOS nor Android application on Linux with Xamarin, You need Windows or OS X. This is old bug still accurate. https://bugzilla.xamarin.com/show_bug.cgi?id=142 https://bugzilla.xamarin.com/show_bug.cgi?id=142 This is an actual deal breaker for us. Haft of the team is using OS X and the other haft Ubuntu.
- cwyers 12y ago"But it's kind of unsupported and most of the time it lags behind. Currently on my brand new ubuntu system, it's version 3.2, on my "stable" ubuntu its 2.10. The current version is 3.4." Isn't that more of a problem with Debian/Ubuntu than it is Mono? You're not comparing what Mono's released to Microsoft's .NET runtime, you're comparing what Ubuntu ships to what Mono themselves have released.
- francisl 12y agoI understand that is not the actual status and capabilities of mono. But if you want to ship your app and use the latest feature, this is a problem. If it's a couch-developed app for your own use, this is not an issue.
- cwyers 12y agoSure, but that's an issue in packaging software for Linux that goes far beyond Mono/Xamarin. Any software you develop for Linux that has external dependencies is dependent upon the decisions of at least a dozen major distributions on what to support, package and ship. Solving that problem is way behond the scope of the Mono runtime.
- billyhoffman 12y agoHave they fixed the bug where you can't copy/paste between mono apps and native OS X apps yet? https://bugzilla.xamarin.com/show_bug.cgi?id=3106 https://bugzilla.xamarin.com/show_bug.cgi?id=3106 -- Steps to reproduce the problem: 1. Copy some text in any non-mono application 2. Paste it to mono application. Actual Results: Copy&Paste doesn't work. Expected Results: Working clipboard. How often does this happen? Always. -- Wow. So by cross platform they mean "unusable GUI apps on Macs"
- visualR 12y agoIf you were going to develop a mono app on osx you'd be better off using monomac than gtk#. Mono develop is written in gtk# and cut and paste works just fine on osx.
- billyhoffman 12y agoMy use case is the most basic one possible: -Build a GUI app in C# -Run in on both my Windows dev machine (Windows 7), and my main desktop (OS X) That's it. I don't care even what I have to use to build the app (Windows Forms, Stetic, etc). Any advice?
- visualR 12y agoIf your app is something others will use, for the best experience you write your app in such a way that the UI is as swappable as possible. Then write a Mac UI with monomac and a Windows UI with WPF. If it's just you who needs it, then Gtk# might be ok for standard things. But don't expect good os integration without work.
- jonpaul 12y agoHave you considered using node-webkit, AngularJs, and Bootstrap for your cross platform GUI needs?
- visualR 12y agoThe problem with this is you only get 1 thread for the UI and other stuff to run on.
- leafartist 12y agoThis post inspired me to fire up my Linux mint virtual box and test mono. I'm every impressed by its potential. It does lack some awesome c# features like async/await. I've been using Xamarin for a while now and love it. My only fear for mono on Linux is the lack of XAML like interface equivalent. I dislike GTK. I'm keeping my fingers crossed :)
- theflagbug 12y agoI'm pretty sure async/await is supported Source: I'm using async/await in Xamarin.Android Maybe it's because Linux Mint doesn't have the latest version of Mono in the package repository?
- c0deporn 12y agoNice, I just gave a talk on Xamarin and building cross-platform native apps at a mobile workshop this weekend.
- mwcampbell 12y agoI must strongly recommend against using Gtk+ as a GUI toolkit for any serious application except on GNU/Linux. The biggest reason for me is that Gtk+ has zero accessibility support on Windows or Mac. That is, it doesn't work with assistive technologies which people with some disabilities need, such as screen readers for blind people. If you develop an application using an inaccessible toolkit, you're erecting a barrier for some people who might need to use your app, particularly if it's going to be used in an educational or business setting. So, what should you use instead? Qt is better, but not great. It's still bad enough that TeamTalk, a voice chat app that's popular among blind people, has a cross-platform Qt app but also a "classic" MFC app for Windows. The latter used to be the official Windows client, but is now maintained just for blind users. wxWidgets is better in some ways, because it uses native controls on each platform. Except where it doesn't; for example, the data view control is non-native on Windows, whereas the list view control is non-native in the Mac and GTK ports. and wxHTML is non-native across the board. Still, with some pain, wxWidgets can be made to work for cross-platform accessible apps. SWT might be a good choice, if you can make it work for .NET/Mono using IKVM.NET. SWT is better than wx in that where it has to use non-native controls, it implements the platform accessibility APIs; it helps that SWT is backed by IBM, which has the resources to put into this kind of thing, and the incentive to do so in the form of sales to government agencies and the like.
- blub 12y agoI'd be interested to know what kind of problems Qt has with accessibility, I have personally not used the QAccessible* classes yet and would appreciate any tips from the field. Some potentially interesting blog posts: http://blog.qt.digia.com/blog/category/accessibility/ http://blog.qt.digia.com/blog/category/accessibility/ I wonder what came out of the major upgrade in Qt 5, from looking around the web it seems to support MSAA fully and also I2A in some form.
- mwcampbell 12y agoI haven't looked at the state of accessibility in Qt 5. I'll have to check that out.
- 12y ago
- adamors 12y agoDo these people actually use Monodevelop daily? Because my and a lot of other people's experience beyond a Hello World program is dismal. And until you actually have cross platform development tools that don't suck, .NET is not a viable option.
- CmonDev 12y agoThe authoring platform doesn't matter as long as the product is cross-platform. Just use Windows to get the best development experience. I mean people use Sublime which is like a notepad on steroids and don't complain.
- adamors 12y ago> The authoring platform doesn't matter as long as the product is cross-platform. I think it matters a lot. That's why a lot of people don't care about .NET/C# actually, because they can't stand Windows.
- deleted 12y ago[deleted]
- herokusaki 12y agoI haven't used it in a while but Tcl/Tk with Tile (now known as ttk) used to be a decent solution for cross-platform GUIs with native-looking widgets. Among other things it had top-tier Unicode support and a declarative layout system (compare: QML). Is it still viable?