Develop Apps Quickly with Quickly

1
10216

Develop AppsThis aptly named tool makes the development of apps a simple and fast process.

Ubuntu is a Linux distribution that has gained a lot of momentum in the past few years. Ever since it brought about revolutionary changes like Unity in its interface, and now the upcoming display server known as Mir, it has been a topic of debate among Linux and open source enthusiasts. Regardless of whether these changes are good or bad, these features have certainly given it unprecedented exposure to the public, who are increasingly looking beyond Windows and Mac, to install Ubuntu on their machines.  Ubuntu installation is now easier than ever before, due to the much improved and refined installation procedure.

Under these circumstances, a lot of organisations like Valve are being tempted to begin support for the platform with products like Steam, and games like Portal and Left for Dead 2 which are now available on Linux. It now also makes sense for all big and small developers to take advantage of Ubuntu’s growing popularity and start focusing on this platform. But this throws up the problem of re-learning the innumerable tools and tricks involved in developing and publishing an app for Ubuntu. Though Linux provides multiple options for tools at each stage of software development, it becomes even harder when the developer has to choose the best tool for the purpose.
Quickly makes this process much easier by providing a standard application stack that guides the developer by simplifying and reducing each step to a much easier interface. It does this by providing a ready-made empty application template along with a tutorial that takes you through each step of application development. Of course, alternatives do exist in the form of Qt and the Mono framework, but Quickly will prove to be easier requiring less time to learn how to use the development tools.

The Quickly application stack
The Quickly application stack consists of a specific set of tools that are chosen on behalf of the developer to make the work much easier and provide a streamlined workflow, which is automated and interwoven into these technologies so that it can effectively act as a wrapper for all the unnecessary hard work that needs to be done.
It focuses on the following tools to make your process of application development easier:

  • Python
  • GTK+
  • PyGObject
  • Glade
  • Bazaar
  • Winpdb

Some of these tools, like Python, GTK+, PyGObject and Glade, are almost ubiquitous with Linux application development. Apps developed with these could easily be ported to other Linux distributions, if the packaging is done for their respective systems. Python is one of the few programming languages that is getting immensely popular for any type of application and if you don’t already know how to work with it, you should learn how to, because you are much more likely to encounter it for some other purpose due to many important components of Ubuntu being made in Python itself. Ubuntu also exposes many important APIs and libraries in Python for developers to use, so it makes sense to work in Python to make this work easier.

Bazaar, on the other hand, is a revision control system that is pretty robust. Since it is also used by Canonical for the development of Ubuntu, easier integration with its ecosystem is obviously one of its advantages. While it is certainly not the most popular, it is used by many developers due to its distributed capabilities and Launchpad integration.

Getting started with Quickly
To get started with installing Quickly, go to http://developer.ubuntu.com/get-started/ and click on the ‘Download Quickly’ button. Alternatively, you can run the following command on the development machine:

sudo apt-get install quickly quickly-ubuntu-template

When Ubuntu completes downloading and installing the Quickly application along with its dependencies, you will be able to use the Quickly workflow to create an Ubuntu application within seconds.
To get started with a basic application template, you can run the following:

quickly create ubuntu-application myfirstapp

This will create a project directory along with the bazaar repository so that you can start playing around with it. You will then also be able to see a sample window (Figure 1) that says the application has been created and can be edited further in the application designer for GTK+, i.e., Glade.
You can now go to the application’s directory, which has been created by Quickly:

cd myfirstapp

Glade can now be started with the following command:

quickly design

Fig 1Fig 2Fig 3Fig 4
Glade (Figure 2) will allow you to add new components and change their properties so that you can customise how each new window looks, along with a design view, just like any other IDE that you might have seen.
When the design part for your application is done, you can begin writing some code to actually make it work, and translate those bare bones design components into an integrated application that actually responds to the user’s actions in the manner in which you desire. This can be done at the edit stage, with a text editor like Gedit. The following command loads all the files (Figure 3) that can be edited so that the application can be customised to work according to your needs:

quickly edit

This involves event driven programming where a block of Python code is written for each ‘signal’. Signals for each component can be activated from within the signals tab in Glade. When the coding for this application is complete, you can run the application with the following command:

quickly  run

When everything is up and running fine, you can save and commit the work in Bazaar version control:

quickly save commit message

Towards the end of software development, you might consider debugging your application with the help of a utility provided by Quickly, which is known as winpdb (Figure 4). It works like any other debugging application that can step through code, and provide information about variables and exceptions that occur within the application. This Python debugging application can be launched with the following debugging command:

quickly debug

You could also choose to share your application’s code on Launchpad so that more collaborators can work and submit changes to your application. This can be done with the help of the quickly share and quickly release commands, but you need a Launchpad account for that. Launchpad is a project hosting tool that is used by Ubuntu and innumerable other projects to collaborate on their products.

Licensing and packaging
Before releasing the finished application for distribution to others, it is important to mention the licence under which the application is being distributed. As of now, by default, Quickly assumes this to be GPL3. To generate a licence, use the following licence command:

quickly license

This command adds the licence at the beginning of every file in the form of a comment header. It only works for the BSD, GPL-2, GPL-3, LGPL-2 and LGPL-3 licences. If any other licences are to be used, they are to be added in the form of a COPYING file, which will add it to each file generated by the Quickly workflow.

The Desktop file and Setup.py file can now be edited to add information specific to the application and the developer. This includes the category, type and icon of the application in the Desktop file, while the Setup.py file includes the author’s contact details and description of the application.

When everything is ready, you should be all set to start packaging your application in the form of a deb package so that it can be distributed and installed easily on any Ubuntu system:

quickly package

This will generate a deb package and a zip of the source code in the parent directory of the Quickly project folder. This deb can then be installed on your Ubuntu system (or any other Ubuntu system), and you will be able to see that it integrates into the dash properly as is the case with any other Ubuntu application. To distribute your app more easily, you might prefer using a Personal Package Archive or maybe even publish your application to the Ubuntu Software Center (USC). Every application that is submitted to the USC goes through an approval process defined by Canonical, and it could take a couple of days before the application is finally visible online.
Since you have now had a brief introduction to how the Quickly application development cycle works, you might have already noticed that the commands and work needed at each step are almost zero, and the majority of the work is done for the developer by preconfigured tools. I hope that as the project progresses, more options and templates will be made available.

1 COMMENT

  1. This is really a fantastic overview of the entire process! You really covered all the bases from startUp to Licensing and packaging.

    I hope too much hasn’t changed (as I’m writing this 4 years after the original post). I had no idea that something like Quickly even existed.

LEAVE A REPLY

Please enter your comment!
Please enter your name here