Quickly: Rebooted

Shortly after the Ubuntu App Showdown earlier this year, Didier Roche and Michael Terry kicked off a series of discussions about a ground-up re-write of Quickly.  Not only would this fix many of the complications app developers experienced during the Showdown competition, but it would also make it easier to write tools around Quickly itself.

Unfortunately, neither Didier nor Michael were going to have much time this cycle to work on the reboot.  We had a UDS session to discuss the initiative, but we were going to need community contributions in order to get it done.

JFDI

I was very excited about the prospects of a Quickly reboot, but knowing that the current maintainers weren’t going to have time to work on it was a bit of a concern.  So much so, that during my 9+ hour flight from Orlando to Copenhagen, I decided to have a go at it myself. Between the flight, a layover in Frankfurt without wifi, and a few late nights in the Bella Sky hotel, I had the start of something promising enough to present during the UDS session.  I was pleased that both Didier and Michael liked my approach, and gave me some very good feedback on where to take it next.  Add another 9+ hour flight home, and I had a foundation on which a reboot can begin.

Where is stands now

My code branch is now a part of the Quickly project on Launchpad, you can grab a copy of it by running bzr branch lp:quickly/reboot.  The code currently provides some basic command-line functionality (including shell completion), as well as base classes for Templates, Projects and Commands.  I’ve begun porting the ubuntu-application template, reusing the current project_root files, but built on the new foundation.  Currently only the ‘create’ and ‘run’ commands have been converted to the new object-oriented command class.

I also have examples showing how this new approach will allow template authors to easily sub-class Templates and Commands, by starting both a port of the ubuntu-cli template, and also creating an ubuntu-git-application template that uses git instead of bzr.

What comes next

This is only the very beginning of the reboot process, and there is still a massive amount of work to be done.  For starters, the whole thing needs to be converted from Python 2 to Python 3, which should be relatively easy except for one area that does some import trickery (to keep Templates as python modules, without having to install them to PYTHON_PATH).  The Command class also needs to gain argument parameters, so they can be easily introspected to see what arguments they can take on the command line.  And the whole thing needs to gain a structured meta-data output mechanism so that non-Python application can still query it for information about available templates, a project’s commands and their arguments.

Where you come in

As I said at the beginning of the post, this reboot can only succeed if it has community contributions.  The groundwork has been laid, but there’s a lot more work to be done than I can do myself.  Our 13.04 goal is to have all of the existing functionality and templates (with the exception of the Flash template) ported to the reboot.  I can use help with the inner-working of Quickly core, but I absolutely need help porting the existing templates.

The new Template and Command classes make this much easier (in my opinion, anyway), so it will mostly be a matter of copy/paste/tweak from the old commands to the new ones. In many cases, it will make sense to sub-class and re-use parts of one Template or Command in another, further reducing the amount of work.

Getting started

If you are interested in helping with this effort, or if you simply want to take the current work for a spin, the first thing you should do is grab the code (bzr branch lp:quickly/reboot).  You can call the quickly binary by running ./bin/quickly from within the project’s root.

Some things you can try are:

./bin/quickly create ubuntu-application /tmp/foo

This will create a new python-gtk project called ‘foo’ in /tmp/foo.  You can then call:

./bin/quickly -p /tmp/foo run

This will run the applicaiton.  Note that you can use -p /path/to/project to make the command run against a specific project, without having to actually be in that directory.  If you are in that directory, you won’t need to use -p (but you will need to give the full path to the new quickly binary).

If you are interested in the templates, they are in ./data/templates/, each folder name corresponds to a template name.  The code will look for a class called Template in the base python namespace for the template (in ubuntu-application/__init__.py for example), which must be a subclass of the BaseTemplate class.  You don’t have to define the class there, but you do need to import it there.  Commands are added to the Template class definition, they can take arguments at the time you define them (see code for examples), and their .run() method will be called when invoked from the command line.  Unlike Templates, Commands can be defined anywhere, with any name, as long as they subclass BaseCommand and are attached to a template.

This entry was posted in OpenSource, Programming, Projects, Work and tagged , , , , , , , , , , . Bookmark the permalink.

9 Responses to Quickly: Rebooted

  1. Sepehr Aryani says:

    Hi,
    Nice to hear about quickly improvements. I’m also glad that you are getting app development this much serious. But my question is that why don’t canonical invests on creating a user friendly IDE? An IDE that has support for broader languages and technologies. With quickly developers are bound to Python while many like to write their apps in C/C++, Vala, etc…
    Needless to say that python apps are always slower and more memory hungry (like Ubuntu software center).

    • Michael Hall says:

      Quickly itself is written in Python, but it doesn’t limit developers to Python. There are already templates for C++ projects, and I hope that after the reboot we will get contributors building even more templates in more languages.

    • Thomas Kluyver says:

      People in the FOSS world have strong and different preferences for their editors, so they’ll probably never get behind one IDE. As I see it, Quickly gives us some of the advantages of an IDE (projects that you can easily run, tools for packaging & distributing), while letting people use their preferred tools. I think of it as a ‘Loosely Integrated Development Environment’.

      • JanC says:

        Also, it should be possible to integrate Quickly in IDEs & editors like Geany, Anjute, Gedit, vi, emacs, etc.

        • Michael Hall says:

          That is definitely my plan. I’m working on a way to export command meta-data now, that should be something plugins for those IDEs can consume

  2. stefan says:

    Hi Michael,

    do you have something like trello, blueprints or something like this for tracking the next features and things to do?

  3. Pingback: Quickly: Reborn | Michael Hall

  4. Cary Hartline says:

    I love that Quickly is getting more attention. It seems like all of the focus of SDKs is focused on mobile when we still need a concise way of building applications for desktop Ubuntu. Also, I am trying to run your example, but I am getting:

    2013-04-08 11:24:27,445 ERROR Could not find command matching /home/kerihartline/Dokumentujo/foo

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>