Alright, to start off, I have experience as an amateur Obj-C/Cocoa and Ruby w/Rails programmer. These are great, but they aren’t really helpful for writing cross-platform applications (hopefully GNUStep will one day be complete enough for the first to be multi platform, but that day is not today).
C++, from what I can gather, is extremely powerful but also a huge, ugly behemoth that can take half a decade or more to master. I’ve also read that you can very easily not only shoot yourself in the foot, but blow your entire leg off with it since memory management is all manual. Obviously, this is all quite intimidating. Is it correct?
Python seems to provide most of the power of C++ and is much easier to pick up at the cost of speed. How big is this sacrifice? Is it meaningful or can it be ignored?
Which will have me writing fast, stable, highly reliable applications in a reasonable amount of time?
Also, is it better to use Qt for your UI or instead maintain separate, native front ends for each platform?
EDIT: For extra clarity, there are two types applications I want to write: one is an extremely friendly and convenient database frontend and the other, which no doubt will come much later on, is a 3D world editor.
5
C/C++ is fast. The reality is, most apps wont need that performance with the state of the current hardwares. The usual way is to develop the application in a high level language, like python, than optimize when needed with lower level languages, like C/C++.
Python will give you a big productivity boost, it’s easy to learn and reasonably fast. There is Cython, which you can use to write C extensions to use in your python app with python-like syntax to speed up bottlenecks.
For standart GUI apps, python can give you enough performance. And python has something very cool called Kivy, a GUI framework that runs on Mac, Windows, Linux, Android and iOS, and supports multi touch. The bonus part is, the performance critical parts are optimized with C, using Cython.
2
I would go with Python, as it gives you big productivity boost. You can still write portions of your app that need speed in C++, there is a Cython project that allows to use C++ libraries directly in Python. If you’re concerned about security of your sources, Cython can also help with that, you can use it to compile your normal python code to C++ code.
I would recommend to embed Chrome engine and use technologies like: HTML5 + CSS3 + Javascript + JQuery + Canvas for the UI.
There is a framework that makes it easy to embed Chrome engine in your C++ app, it’s called CEF – Chromium Embedded Framework. It supports Windows, Linux, Mac OS.
If you like Python, have a look at CEF Python, it’s a project that provides python bindings for the CEF framework (by using Cython). CEF python currently supports only Windows, but there are plans for other OS’es.
Here is a list of applications that have been successfull using CEF (taken from here):
- Adobe Brackets – code editor for the web
- Adobe Edge – multimedia authoring tool
- AppJS – build desktop applications using Node.js
- AOL Instant Messenger – windows client uses CEF
- Cubiez – integrates your favorite content into the desktop
- Desura – online game platform
- Dish World IPTV – streaming video platform
- Evernote – notetaking software
- ExeOutput – allows you to deploy html5/php applications as desktop applications
- GitHub for Windows – GitHub client software for Windows
- Janetter – twitter client software
- mChef – mIRC browser plugin
- MediaMan – organizer software
- MetaVR – geographic simulation software
- MTG Studio – game organizer software
- OpenSpace3D – 3D development platform
- Rdio – streaming music platform
- Spotify – streaming music platform
- Steam Client – online game platform
- Tencent QQ – instant messaging program and web browser
- Trend Micro – internet security software
- WBEA Desktop – allows you to deploy html5 applications as desktop applications
Also have a look at this blog entry: Building a Desktop-Quality App on Web Technologies – Brackets editor team explaining how they built it using CEF framework and web technologies like: jQuery, Bootstrap, LESS CSS, requireJS, Jasmine for Unit testing, JSlint.
Disclaimer: I’m the author of CEF Python project.
8
The Qt way of C++ is great and clean, so please, drop the “ugly behemoth” part, I’ve tried them both, and personally I’m much more productive/comfortable with Qt/C++ than with Python’s Qt binding.
That’s my advice if you choose to go with Qt. Plus and beside the native experience that Qt widget provide, Qt5 and QtQuick2 with QML technology and the ability to embed JavaScript and HTML5 within your app, give you a modern web-like look & feel, if you choose to do so.
So, why I don’t like Python in desktop apps and I prefer to keep it for scripting or server side things ?
-
Python breaks a bit the cross-platform joy, your client have to install Python to run your app (especially on Windows), and the different Python versions that are on the python’s official website now make the client confused, which one to download/install.
-
Python to exe, make bigger apps (in term of size).
-
Python apps, eat more memory.
That’s a personal point of view. Qt’s parent system, smart pointers, wont let you shoot yourself in the foot, neither legs, the C++11 will give you even more features.
1