I have a desktop project I\'ve been working on for a couple months that I want t
ID: 654326 • Letter: I
Question
I have a desktop project I've been working on for a couple months that I want to run on Windows and Mac. When I started the project, I started writing it in Qt 4.8 in C++. Development has gone fine and the application runs fairly well on both Windows and Mac like I hoped. I would say it's about 40% complete at this point.
For a little background information, the application is a variation of an email client.
But I am thinking about abandoning what I've done so far in C++/Qt and purchasing a license for Xamarin Studio and writing the application in C#.
There are a few reasons I am strongly considering this:
I want to release mobile versions of this application too, and with C# a lot of the backend code could be reused on all platforms.
I want to publish this app on the Apple and Windows stores. I know that you publish Qt Apps on the Apple Store but I have not read or been able to find anything about anyone publishing Qt Apps to the Windows Store. Not to mention, Qt 4.8 has no built in support for Metro UI (I would have to use Qt 5.0, which would mean rewriting a large part of the code anyway).
Having worked in both C# and C++ for many years, overall I am "happier" developing in C#.
However, I have a few reasons the stay the course:
As I mentioned above, I am about 40% complete in the first incarnation of this project.
A large portion of my program rests upon Lua, for which I'm able to use the native Lua libraries quite easily in C++, and I'm not sure how well the Lua implementations I've seen for Mono/C# work.
Maintaining two separate UI code for the desktop app (hence, in Qt I can #include <QtCore> on Windows and Mac, but in C# I'd have to using System.Windows.Forms on Windows and 'using MonoMac.' on Mac)
Honestly, at this point I'm inclined to start over in C#, using what I have in C++ as a guide and delay my release for about a month (about how long it'll take me to catch up considering other responsibilities in my life).
I was looking for some input from people who have been in a similar situation. And I'm particularly interested in hearing from anyone who has used C# to publish apps on the Windows and Mac stores.
What do you think?
Explanation / Answer
I don't think rewriting from scratch is a good idea in general, but to address a couple of the technical points you mentioned:
I want to release mobile versions of this application too, and with C# a lot of the backend code could be reused on all platforms.
There's not really any particular reason why you couldn't reuse your C++ code for mobile platforms. It's definitely not an ideal state of affairs for C++ aficionados, but it is feasible.
A large portion of my program rests upon Lua, for which I'm able to use the native Lua libraries quite easily in C++, and I'm not sure how well the Lua implementations I've seen for Mono/C# work.
Scripting in the .NET Framework in general is a .. little tricky. In order to reload scripts, you'll have to manage a/some AppDomain(s) specifically for scripting. If you intend on modifying scripts frequently as would be implied by some use cases for scripting, this is a significant factor to consider.
Additionally, last time I checked (though this could easily have changed since), the Lua bindings for .NET were really awkward to use because of the C heritage. There are some DLR Lua projects which may or may not be better than the libraries I was attempting to use at time. I can't post more than 2 links otherwise I'd link to a couple, but you can use your preferred search engine.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.