Programming language for Ubuntu Touch apps
-
I am super curious, not probably ever going to develop an app, but I fail to understand something.
As I understand "Qt" is an application that makes making Ubuntu Touch apps easier.
But!
What language should be used to make Ubuntu Touch apps? Is it Java or..? -
@ubuntutouchfan
I think you can choose between these python-Go-C++ and rust. -
@ubuntutouchfan Qt is the UI toolkit, that UT-Touch uses. That means instead of having to create the base logic for common UI elements like buttons and menus, you can just use the ones provided by Qt. To do that you have to use a language called QML. But there is some stuff that can't be done in QML, because it is so frontend focused. So QML has to be combined with another language. By default that's JavaScript, but you can choose to use C++, Python, Go or Rust instead
-
Basically, QML is used for the frontend.
The languages available in clickable (list from @ftnirp ) are bound to QML so you can build backend for QML code.
But you can use C or Shell scripts as well, it will just be harder to bind to a GUI...Java is not available because it's not embedded in the OS so you have to bring all the dependencies with your app and that's huge.
Java for embedded devices is something I'll never understand, but -
All the answers are very helpful! Highly
appreciate it!To clarify everything:
Qt is a toolkit for creating UI, other words, Qt is responsible for creating frontend - the part that user interacts with.
Yes/noQt uses a language called QML.
Yes/noQML has to be "mixed" with other language, as author concludes - for backend purposes (?) - such as:
- Ftnirp lists:
C++/Python/HTML/Go/Rust - Vitellius lists:
JS (default)/C++/Python/Go/Rust - AppLee lists
C++/Python/HTML/Go/Rust AND C/Shell but more difficult to bind to the QML
yes/no
Additional question:
Since the lists provide a bit different data - is JS one of the default options or not? - Ftnirp lists:
-
@ubuntutouchfan I think this might be a good question for this week Q & A so developers could explain with their own words and complete each other. Questions from the chat could expand the explanation. This way, the video will remain online for each one to watch it.
-
@ubuntutouchfan said in Programming language for Ubuntu Touch apps:
To clarify everything:
Qt is a toolkit for creating UI, other words, Qt is responsible for creating frontend - the part that user interacts with.Yes and no
Qt is a framework. Is responsible for everything. It translate «Show a picture here» into code that is specific for the device to find it and show it.
Qt uses a language called QML.
Yes (for the UI)
QML has to be "mixed" with other language, as author concludes - for backend purposes (?) - such as:
no
It doesn't have to, it may be mixed. Qml is like html. But it has build-in js support for logic (it has its limitations)
For example, you want to remove a file in an app cache folder: you have to do it with a backend language.
-
@cibersheep said in Programming language for Ubuntu Touch apps:
It doesn't have to, it may be mixed. Qml is like html. But it has build-in js support for logic (it has its limitations)
For example, you want to remove a file in an app cache folder: you have to do it with a backend language.
I meant it has to be mixed in order to make something that is actually useful, it would be hard to make a functional Ubuntu Touch application with just with QML, or am I wrong?
-
@ubuntutouchfan said in Programming language for Ubuntu Touch apps:
I meant it has to be mixed in order to make something that is actually useful, it would be hard to make a functional Ubuntu Touch application with just with QML, or am I wrong?
You are wronnnnngg (please read it with funny accent)
It depends on what you understand as «usuful» but see: https://gitlab.com/ubports/apps/calculator-app
The calculator is a «qml» app. All the logic is javascript though (but I include that as jus qml)
-