• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Programming language for Ubuntu Touch apps

Scheduled Pinned Locked Moved OS
9 Posts 6 Posters 1.6k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U Offline
      UbuntuTouchFan
      last edited by 12 Mar 2021, 22:35

      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..?

      ? V A 3 Replies Last reply 12 Mar 2021, 23:39 Reply Quote 0
      • ? Offline
        A Former User @UbuntuTouchFan
        last edited by A Former User 3 Dec 2021, 23:45 12 Mar 2021, 23:39

        @ubuntutouchfan
        I think you can choose between these python-Go-C++ and rust.

        ubports.png

        1 Reply Last reply Reply Quote 1
        • V Offline
          Vittelius @UbuntuTouchFan
          last edited by 12 Mar 2021, 23:57

          @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

          1 Reply Last reply Reply Quote 1
          • A Offline
            AppLee @UbuntuTouchFan
            last edited by 13 Mar 2021, 07:38

            Hi @ubuntutouchfan

            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 :man_shrugging:

            1 Reply Last reply Reply Quote 1
            • U Offline
              UbuntuTouchFan
              last edited by 13 Mar 2021, 11:51

              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/no

              Qt uses a language called QML.
              Yes/no

              QML has to be "mixed" with other language, as author concludes - for backend purposes (?) - such as:

              1. Ftnirp lists:
                C++/Python/HTML/Go/Rust
              2. Vitellius lists:
                JS (default)/C++/Python/Go/Rust
              3. 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?

              C C 2 Replies Last reply 13 Mar 2021, 11:58 Reply Quote 0
              • C Offline
                C0n57an71n @UbuntuTouchFan
                last edited by 13 Mar 2021, 11:58

                @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.

                1 Reply Last reply Reply Quote 0
                • C Offline
                  CiberSheep @UbuntuTouchFan
                  last edited by CiberSheep 13 Mar 2021, 12:09

                  @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.

                  Another planet, another time, another universe!

                  U 1 Reply Last reply 13 Mar 2021, 12:19 Reply Quote 1
                  • U Offline
                    UbuntuTouchFan @CiberSheep
                    last edited by 13 Mar 2021, 12:19

                    @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?

                    C 1 Reply Last reply 13 Mar 2021, 13:50 Reply Quote 0
                    • C Offline
                      CiberSheep @UbuntuTouchFan
                      last edited by 13 Mar 2021, 13:50

                      @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)

                      Another planet, another time, another universe!

                      1 Reply Last reply Reply Quote 1
                      • M MrT10001 referenced this topic on 5 Oct 2024, 15:16
                      3 out of 9
                      • First post
                        3/9
                        Last post