Skip to content

Commit

Permalink
Merge pull request #471 from ubports/app_dev
Browse files Browse the repository at this point in the history
App dev
  • Loading branch information
Flohack74 committed Dec 1, 2021
2 parents 29a8edd + 30df9d3 commit 978c16f
Show file tree
Hide file tree
Showing 17 changed files with 157 additions and 111 deletions.
Binary file added _static/images/appdev/appdev_desktop.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/images/appdev/applist.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 14 additions & 12 deletions appdev/code-editor.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
Code Editor Integrations
Code editor integrations
========================
- Atom

You can use clickable with the `Atom Editor <https://atom.io>`__ by installing the `atom-clickable-plugin <https://atom.io/packages/atom-clickable-plugin>`__. This provides some common clickable tools needed to build and run click packages for Ubuntu Touch from within Atom editor.
* Atom

- QtCreator
You can use clickable with the `Atom Editor <https://atom.io>`__ by installing the `atom-clickable-plugin <https://atom.io/packages/atom-clickable-plugin>`__.
Or you can simply run ``clickable ide atom`` in your project directory to launch an Atom editor instance on top of your docker image.
This way you will have all Atom features - including the clickable plugin - available for you project.

Available on top of clickable docker image, ``clickable ide qtcreator`` command within your project directory will launch a QtCreator instance and auto setup the project for you, you will have code completion and navigation for Ubuntu Touch components as well as run/debug facilities.
* QtCreator

Available on top of clickable docker image, ``clickable ide qtcreator`` command within your project directory will launch a QtCreator instance and auto setup the project for you, you will have code completion and navigation for Ubuntu Touch components as well as run/debug facilities.

- Ubuntu SDK ( Unmaintained )
* Ubuntu SDK ( Unmaintained )

Alternatively there is the old `Ubuntu SDK IDE <https://docs.ubuntu.com/phone/en/platform/sdk>`__. Be aware that it is no longer supported by Canonical, and UBports has chosen to not support it either due to lack of manpower.
Alternatively there is the old `Ubuntu SDK IDE <https://docs.ubuntu.com/phone/en/platform/sdk>`__. Be aware that it is no longer supported by Canonical, and UBports has chosen to not support it either due to lack of manpower.

You can still install the SDK IDE in Ubuntu 16.04, but it is not guaranteed to work correctly. You can use the following commands to install::
You can still install the SDK IDE in Ubuntu 16.04, but it is not guaranteed to work correctly. You can use the following commands to install::

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt update && sudo apt dist-upgrade
sudo apt install ubuntu-sdk
sudo reboot # or logout/login
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt update && sudo apt dist-upgrade
sudo apt install ubuntu-sdk
sudo reboot # or logout/login
20 changes: 15 additions & 5 deletions appdev/external-docs.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
Documentation
=============
API docs
========

In this section you find the various APIs you can use to develop Ubuntu Touch apps.

Firstly there are the QML and HTML APIs that you can use for the front end:

* `QML API <https://api-docs.ubports.com/sdk/apps/qml/index.html>`__
* `All 5.12 QML types <https://doc.qt.io/qt-5.12/qmltypes.html>`__
* `Cordova HTML5 API <https://api-docs.ubports.com/sdk/apps/html5/index.html>`__
* `Clickable <http://clickable.bhdouglass.com/en/latest/>`__
* `Suru Icons <http://docs.ubports.com/projects/icons/en/latest/>`__

It is possible to develop cross-platform apps that don't depend on Ubuntu specific APIs, although this is not the official way of developing apps for Ubuntu Touch. If running on other operating systems is an requirement for your app, you can refer to this APIs instead:
Secondly, the platform documentation describes how to integrate your app into the system:

.. toctree::
:maxdepth: 1

platform/index

Thirdly, it is possible to develop cross-platform apps that don't depend on Ubuntu specific APIs, although this is not the official way of developing apps for Ubuntu Touch. If running on other operating systems is a requirement for your app, you can refer to these APIs instead:

* `Kirigami API <https://api.kde.org/frameworks/kirigami/html/>`__
* `Qt Quick Controls 2 API <https://doc.qt.io/qt-5/qtquickcontrols-index.html>`__
17 changes: 0 additions & 17 deletions appdev/getting-started.rst

This file was deleted.

29 changes: 0 additions & 29 deletions appdev/guides/cookbook.rst

This file was deleted.

35 changes: 29 additions & 6 deletions appdev/guides/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,45 @@
Developer guides
================

Get started building your first app or learn about advanced concepts with our developer guides.
To get started with your first app check out the following developer guides:

* `Qt programming course by mimecar for Ubuntu Touch <https://docs.innerzaurus.com>`__
* `Application Templates by fulvio <https://github.com/fulvio999/ubports_app_templates>`__
* `Python examples by pavelprosto <https://forums.ubports.com/topic/5525/python-examples>`__
* `Python + UT apps quickstart guide by AaronTheIssueGuy <https://aaron.place/blogs/UbPortsPython.html>`__
* `QML templates by Joan CiberSheep <https://gitlab.com/cibersheep/qml-templates-for-ubuntutouch>`__.
* `First steps with QML <https://doc.qt.io/qt-5/qmlfirststeps.html>`__.
* `Qt examples and tutorials <https://doc.qt.io/qt-5.12/qtexamplesandtutorials.html>`__.

If you are interested in helping to create developer guides check out our
`GitLab Project <https://gitlab.com/ubports/apps/development-resources>`__.

To get familiar with some more advanced concepts see the following sections:

.. toctree::
:maxdepth: 1
:name: toc-dev-guides

cookbook
contenthub
importing-CH-urldispatcher
pushnotifications
user-metrics
writeable-dirs
dependencies

We are currently working on expanding our list of developer guides. In the mean
time we recommend the `Ubuntu Touch Programming Course <https://mimecar.gitbook.io/qt-course/>`__.
Playground
----------

If you are interested in helping create developer guides check out our
`GitLab Project <https://gitlab.com/ubports/apps/development-resources>`__.
In a completely free and open source community, it is natural to have community members exploring the limits of the platform in many many directions. In this section you will find links to external resources that do exactly that: Explore. The purpose of this list is to show the unlimited possibilities of an open platform like Ubuntu Touch.

.. note::
The resources listed here do not necessarily represent the officially endorsed way of developing applications for Ubuntu Touch, but are interesting experiments.

* `Free Pascal development for Ubuntu Touch <http://kriscode.blogspot.tw/2016/09/freepascal-development-for-ubuntu-phone.html>`__
* `Lazarus development for Ubuntu Touch <http://kriscode.blogspot.tw/2016/10/lazarus-development-for-ubuntu-phone.html>`__
* `Geany on Ubuntu Touch device as text editor, source code editor, debugger and compiler for multiple languages <http://kriscode.blogspot.tw/2017/10/geany-on-ubuntu-touch-device-as-text.html>`__
* `Deploy your existing Qt QML app to Ubuntu Touch using QMake (Video) <https://youtu.be/ehqlwRNrfO0>`__
* `Deploy your existing Qt QML app to Ubuntu Touch using CMake (Video) <https://youtu.be/c2sq6aLeGec>`__
* `Getting started with Clickable (Video) <https://youtu.be/TE-s5522v0Y>`__
* `Content Hub overview (Video) <https://youtu.be/AihwC2sPIk0>`__
* `Import files to your app with Content Hub (Video) <https://youtu.be/q6zzM16jw1U>`__
63 changes: 56 additions & 7 deletions appdev/index.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,68 @@
App development
===============

Great!, you'd like to develop an app for Ubuntu Touch. Here are some resources that we hope help you get started.
You'd like to develop an app for Ubuntu Touch? Great!

.. figure:: /_static/images/appdev/applist.jpg

Quick start
-----------

Building your first app should be as simple as:

* `Install clickable <https://clickable-ut.dev/en/latest/install.html>`_
* Plug in your Ubuntu Touch device
* Enable developer mode in System Settings
* Run ``clickable create``
* Choose "QML Only" from the list of app templates
* Fill in the requested information for this new app
* When the app has been generated, enter the newly created directory
* Run ``clickable``

Voilà you have your first app running on Ubuntu Touch!

Overview
--------

Ubuntu Touch supports two kinds of apps: Firstly, *native apps* have their user interface written in QML or HTML and their business logic in JavaScript, C++, Python, Rust, or Go. Secondly, *web apps* are special containers to run websites in.

.. toctree::
:maxdepth: 1
:name: toc-app-types

nativeapp/index
webapp/index

The following sections provide guides and API documentation.

`Clickable <https://clickable-ut.dev>`_ is the main tool to build apps on Ubuntu Touch. It is an easy to use command line tool with a lot of great features. Clickable allows you to compile, build, test, and publish your app. It also provides various templates to get you started with app development.

You can use any code editor or IDE to work on the code. Then you build your app from the command line with Clickable.

.. figure:: /_static/images/appdev/appdev_desktop.png

Applications are shipped as a :ref:`click <click>` package and can be published on the official app store `OpenStore <https://open-store.io>`__. Note also that most apps in the OpenStore are open source and can serve as references and inspiration.

References and guides
---------------------

.. toctree::
:maxdepth: 1
:name: toc-app-dev

getting-started
code-editor
guides/index
publishing/index
external-docs
platform/index
samples/index
/contribute/preinstalled-apps

If you have questions that aren't answered in the docs or want to chat with other Ubuntu Touch developers? Join our `app dev Telegram group <https://t.me/UbuntuAppDevEN>`_ or chat with us on the `UBports app dev forum <https://forums.ubports.com/category/35/app-development>`_.
This is a helpful and welcoming community and everything works better in teamwork!
Looking for other developers that might want to collaborate with you on your app?
Have questions that aren’t answered in the docs or want to chat with other Ubuntu Touch developers?
Join our `UBports UT App Dev Telegram group <https://t.me/UbuntuAppDevEN>`_ or chat with us on the `UBports App Development forum <https://forums.ubports.com/category/35/app-development>`_!
You can also check out our list of :ref:`preinstalled apps <preinstalledapps>`. Contributions to those are greatly appreciated and directly reach a larger audience.

Maintainers wanted
------------------

All apps love contributions. But some core apps are lacking maintainers. Please check the `list of core apps <https://github.com/ubports/ubuntu-touch/blob/master/CORE_APPS.md>`_ and see if you want to step up as new maintainer for one of our core apps. The maintainer reviews MR's, triages and investigates issue reports and helps to develop the app.

The best way to start is by making some contributions and let the reviewers know that you are interested. Or join our matrix group at `#ubcd:matrix.org <https://matrix.to/#/#ubcd:matrix.org>`_ and introduce yourself.
11 changes: 6 additions & 5 deletions appdev/nativeapp/index.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
.. _nativeapp:

Native applications
===================
Native apps
===========

The recommended way to build a native application on Ubuntu Touch is to use the `Qt <https://doc.qt.io/>`__ framework ( current version since OTA-16 is Qt 5.12.9 ).
The recommended way to build a native application on Ubuntu Touch is to use the `Qt <https://doc.qt.io/>`__ framework
(current version since OTA-16 is Qt 5.12.9).
You do not have to stick with the traditional C++<->QML Qt model, you can use also Python, Go, Rust or even Javascript for your backend.

Ubuntu Touch provides a subset of Qt QML components to ease the development of your app : `QML API <https://api-docs.ubports.com/sdk/apps/qml/index.html>`__
Ubuntu Touch provides a subset of Qt QML components to ease the development of your app : `QML API <https://api-docs.ubports.com/sdk/apps/qml/index.html>`__
and Icons: `Suru Icons <http://docs.ubports.com/projects/icons/en/latest/>`__, but you can also ship your cross platform app using standard Qt QML QtQuick2 components.

You can use `Clickable <http://clickable.bhdouglass.com/en/latest/>`_ to facilitate Packaging, deploying, publishing and tests .

Check out informations about the platform and confinement model in :ref:`Platform <platform>` section
Check out informations about the platform and confinement model in :ref:`Platform <platform>` section
8 changes: 0 additions & 8 deletions appdev/publishing/index.rst

This file was deleted.

8 changes: 0 additions & 8 deletions appdev/samples/index.rst

This file was deleted.

4 changes: 2 additions & 2 deletions appdev/webapp/guide.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Guide
=====
Webapp guide
============

How the webapp fits into the shell
----------------------------------
Expand Down
25 changes: 18 additions & 7 deletions appdev/webapp/index.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
.. _webapp:

Web applications
================
Web apps
========

Ubuntu Webapps are a great way to deliver online web applications into Ubuntu.
Ubuntu Webapps can be a nice way to deliver online web applications into Ubuntu.

The Ubuntu platform provides an advanced web engine container to run online applications on the Ubuntu client devices.

Web applications are hosted online. They can be as simple as a website, like an online news site, or they can distribute content like videos. They can also have a rich user interface or use the WebGL extension to deliver games online.

Note: Ubuntu webapps and Ubuntu HTML5 apps are similar but not identical. The main difference is that the content of a webapp is provided through a URL, whereas HTML5 apps install their content (and usually provide an Ubuntu HTML5 GUI). Webapps also have restricted access to platform APIs.
.. note::
Ubuntu webapps and Ubuntu HTML5 apps are similar but not identical. The main difference is that the content of a webapp is provided through a URL, whereas HTML5 apps install their content (and usually provide an Ubuntu HTML5 GUI). Webapps also have restricted access to platform APIs.

.. note::

A different approach to webapps published in the open store is to simply create shortcuts directly yourself with `webber app <https://open-store.io/app/webber.timsueberkrueb>`__.

.. todo::

There is also another way to create somewhat more featureful webapps, sometimes referred to as webapp+ or alternative container.
This needst to be properly documented.
It's a simple qml app that can be easily configured.
Creation is almost as simple as 'classic' webapp, but result is more powerfull with the a nice navigation feature.
A rather advanced example of this is the `YouTube app <https://open-store.io/app/youtube-web.mateo-salta>`__ from Mateo Salta which has quite some modifications on top of the template.

Guide
-----

This guide targets webapps for converged Ubuntu, that is, Ubuntu for Devices (phones and tablets). The Ubuntu Desktop has additional webapps support not covered here. Support for webapps on converged Ubuntu will continue to grow, and of course the future of Ubuntu is convergence, so stay tuned.

.. toctree::
:maxdepth: 1
:name: toc-webapp
Expand All @@ -28,7 +39,7 @@ Quick start
There are several tools to help you package and deploy your webapp to your device:

- `Webapp creator <https://open-store.io/app/webapp-creator.jujuyeh>`_ application available from the openstore
- `Clickable <http://clickable.bhdouglass.com/en/latest/>`_ CLI
- `Clickable <https://clickable-ut.dev>`_ CLI


Debugging your webapp
Expand Down

0 comments on commit 978c16f

Please sign in to comment.