As you’ve probably heard already, Ubuntu is running an App Developer Showdown competition where contestants have three weeks to build an Ubuntu app from scratch. The rules are simple: It has to be new code, it has to run on Ubuntu, and it has to be submitted to the Software Center. The more you use Ubuntu’s tools, the better your chances of winning will be. This week we ran a series of workshops introducing these tools and how they can be used. It all seemed like so much fun, that I’ve decided to participate with my own submission!
Now 2 our of the 6 judges for this competition are my immediate co-workers, so let me just start off by saying that I will not be eligible for any of the prizes. But it’s still a fun and interesting challenge, so I’m going to participate anyway. But what is my entry going to be? Well in my typical fashion of building tools for tools, I’ve decided to write a GUI wrapper on to of Quickly, using Quickly.
Before I started on any code, I first wanted to brainstorm some ideas about the interface itself. For that I went back to my favorite mockup tool: Pencil. I knew I wanted to cover all of Quickly’s functions, both for creating projects and working on them afterwards. I also wanted something that would keep track of my projects, so I wouldn’t have to find where they are on my disk whenever I wanted to hack on them.
Now, I’ve never been a fan of GUI builders. Even back when I was writing Java/Swing apps, and GUI builders were all the rage, I never used them. I didn’t use one for Hello Unity, and I wasn’t planning on using Glade for this project either. But after Jono’s fantastic workshop session about Glade, I decided to give it another chance. I found that I was able to get a basic UI built and running in very little time. I’m still struggling with some, and there’s a point where you need to switch from Glade to code, but all in all it has saved me a significant amount of time.
Quickly also saved me a large amount of time, both in creating the project and adding things too it. Being able to add an Application Indicator to your app by just running “quickly add indicator” is amazing. From there is was a simple matter to build a menu based on available Quickly commands and tie them in with callback functions.
But the part I like the best about this app so far, is that it’s useful even when you’re not using it. Most of the time you spend developing a Quickly app is going to be in some other application, such as your code editor of choice, Glade or something. Thanks to Unity’s HUD, and the fact that it’s smart enough to check Indicator menus in addition to the focused application’s menus, you can call your Quickly commands any time, simply by tapping ‘Alt’ and the command you want to run. It’s like having Quickly integrated into all of your other tools.
And thanks to the developer tools available in Ubuntu, I was able to accomplish all of this in only a few hours of work.
Now it’s very, very far from being complete. For instance, the “active” project is hard-coded to my quickly-gtk working directory, it can’t start a project yet, or support commands that take optional arguments or user input. But in a short amount of time I was able to go from a mockup to a working layout and even some functional code. It even packages successfully, something I found out quite by accident when I selected “Share” from the indicator menu and ended up with a package in my PPA.
Building an app in 4 hours then accidentally building a proper package and uploading it to a PPA, who’d have thought we’d ever make it that easy? I hope you all are having as much fun and success in your showdown applications as I am.