Summary

Quickly will offer a set of commands that can be issued by a developer to:

  1. Quickly get a new project started
  2. Quickly create a deb package
  3. Quickly upload or update a package to a PPA

The first project template will be ubuntu-project. The system will be simple to extend by adding to a template or creating new templates.

Release Note

Quickly is new in 9.10. Quickly makes it easy for developers to make new applications for Ubuntu, and to share those application with other Ubuntu users.

Rationale

It is currently very difficult for developers to get started building applications that work with Ubuntu. There is ample documentation on how to contribute to ubuntu itself, but there is no prescriptive guidance on how to best build an application for Ubuntu. The forums and other sources provide lists of many different options, but there is no trustworthy authority.

Once a program is written, it is quite difficult to get it to end users. Programmers can create debs and use PPAs, but these are technically complex operations, with confusing guidance and multiple choices.

Quickly strives to solve this problem by:

  1. Creating a canonical project that makes opinionated choices for the developer in terms of what tools to use, and how to use them.
  2. Make creating a deb very easy.
  3. Make creating a PPA very easy.

User stories

Betty wants to create a simple application to track pencil usage in her office, where they all use Ubuntu on their desktops. She runs the command "quickly new ubuntu-project pencils". This creates a stub project, including pointers to documentation, etc... She write the application using python and pygtk.

She uses the command "quickly deb". This creates a deb package for her, she tries it out and it works.

So she uses "quickly ppa". This prompts her to create a launchpad account. After which, the project is loaded into her PPA. Her colleagues then use the ppa to load the pencils app onto their computer.

She gets a feature request, and adds the feature. She increments the version number, and runs quickly ppa again. Her users get an updated copy through update-manager.

Assumptions

Toolkit and Language for ubuntu-project

The core template will be "ubuntu-project".

  1. python is the language
  2. pygtk is the framework
  3. glade-3 is the UI editor
  4. gtkbuilder is the binding library
  5. classes encapsulate windows and dialogs (rather than inherit)

Dependencies

  1. The ubuntu-project template should understand automagic python build system conventions and lay out projects in a compatible manner.
  2. Launchpad PPAs must be understood and effectively scripted.

Design

The primary design mantra of Quickly is that everything should be Fun and Easy.

  1. Convention over configuration
  2. Minimal and simple configuration files
  3. Tool agnostic (we are not building or integrating into an IDE)
  4. Reward every action with progress
  5. Make next steps visible

How a Template Works

A template is a set of commands and related content that is designed to set up a project from scratch for the user, as well as potentially containing commands for enhancing and changing the project. It is essentially a directory with a set of python scripts and supporting files that lives in quickly/templates.

The only required command is "new". The new command should create a directory for the user with the necessary files for a functioning program that can be extended and enhanced. It should also create a "quickly" file that contains the name of the template. This is used by the quickly.py script.

Templates rule detection

Implementation

  1. Implement the ubuntu-project template
  2. Implement new window command
  3. Implement new dialog command
  4. quickly command directing script
  5. wrap automagic python build script
  6. wrap ppa script
  7. create tutorial

Commands

General behavior

On exemple is pre_new() command that will create the project folder and generate the .quickly file before the new() command is called.

The Quickly Script

quickly.py is essentially a simple command line parser. The general structure of a quickly call is: quickly <command>

When receiving a command it follows the following steps:

  1. Check if the command is a builtins one using no existing project ("new", "quickly"). If so, try to use the specified template.
  2. If not, it looks in the template specified by the -t option for a python script that matches the name.
  3. If no command is found, it looks in the .quickly file (if exists) and get the template where to look for a command.
  4. If the command is not found in the specified template, then quickly.py looks in a canonical commands directory ("builtins").
  5. If the command is still not found, quickly.py returns an error.

Remember that hooks in "builtins/commands.py" file are executed before and after the commands, if this is found.

quickly.py, therefore, has no inherent knowledge of specific templates or commands, and should, therefore, be quite easy to change and extend.

Also, even if you are in a project binded to "ubuntu-project", you can execute a "release" command from another template using in the project folder : quickly -t kubuntu-project release instead of quickly release.

quickly file

This file is create by pre_new() (see further) in a project directory. The general format is foo = bar

It can have commentaries with # following one instruction or in this own line. Parsing it and adding/changing one value must not change the general layout of it.

Some builtins commands do not rely on .quickly file (quickly new, quickly quickly)

Special command like new and quickly

quickly new enables to create a new project. The idea is to simplify the command line for it and quickly new ubuntu-project foo is far easier than quickly -t ubuntu-project new foo. The latter is still valid, but user will prefer quickly new <template_name> <project_name>.

Same with quickly quickly, which duplicate a template to another directory with a new name. quickly quickly ubuntu-project foo-template will copy "ubuntu-project" to ~/.quickly/templates/foo-template. Quickly generate the skeleton of a quickly template. This should jump start quickly template contributions, and help ensure they use the proper heuristics, etc...

Ubuntu-projects template

As said above, ubuntu-project relies on bzr + LP + ppa. But it should avoid technical terms in commands.

Required

This create the .quickly file in a new foo/ directory with "template=ubuntu-project\nproject=foo" (this hook is in pre_new), then new setup a basic pygtk/glade python project.

This init a bzr repository and commit a first state. The commiter's name will be "bzr whoami" result, even default one. bzr whoami update path is:

Warning /!\ No Launchpad action is done yet. (or we will get tons of dummy empty project).

Create a snapshot using bzr (commit). Still no binding with LP. The commiter's name will be "bzr whoami" result. If LP binding is done (with next command, quickly release). This will push by default over the network to bzr repository of the team associated to the project (trunk if it's not a fix).

An option --offline, can be setup to continue to commit offline, even when LP binding is done.

This command commit locally, tag the revision, and then push over LP, creating a release, tar.gz and building the deb in the ppa (by default, with the same ubuntu release than the developper's one).

If the project is not yet binded to LP (information saved in .quickly file), try to setup launchpad credential (if needed). Then,it should only ask for a project name, seek for them and let user choose an already existing one.

This will bzr pull from lp trunk or fixed version (see below "quickly fix"). Only available after first release.

Setup the default ubuntu version we aimed for when creating a deb. The default is the result of "lsb_release -cs".

This will launch pbuilder to create a package locally.

Nice to Have

  1. New Widget
  2. Stub Events
  3. Remove project (which will remove the project and all related ressources in LP)

Other Templates

Only the ubuntu-project template is required for Karmic. However, the following templates would be nice.

pyGame

Quickly get started creating a game with pygame.

gedit plugin

Quickly get started with a new menu and/or pane in gedit. This would be great for programmers building their own tools.

Miscellanous

Test/Demo Plan

Project Creation

Steps

$quickly create ubuntu-project boo

Response

A project is created and run. The window is title "Boo". Note that the application called Boo should actually run.

Project Editing

Steps

$cd boo $quickly edit

Response

Gedit (or whatever is the default editor) should open. Only python files should open.

UI Editing

Steps

$quickly glade

Response

Running a Project

Steps

Response

The application runs again, but the image is gone, or whatever the edit was is noticeable.

Packaging

Steps

Response

Unresolved issues

This will created a derivated branch from 0.1 release bzr tag and ask the user to cd in it. This will mark some metatag in .quickly file. When quickly release (it's forbidden to specify a revision in this case, it will create 0.11 and push to another branch than trunk in LP, creating debs...)

BoF agenda and discussion

UDS NOTES

automagic python build system is under development as a separate project by pitti.

Pitti's BoF notes: lool: private PPAs? pitti: once LP supports it, it's easy; however, you can put a .deb on your company web server; PPAs are for "easy discovery" use case lool: right, so we need a non-PPA release method, outputting a .deb for instance

KDE support can be added with "quickly new kubuntu-project" (just a matter of adding templates)

new functionality: quickly release -> bzr add new files, commit, tag as new release, update changelogs, upload to PPA (if configured)

promotion:

===== end of pitti's notes -- slightly updated by lool :-P ==== =====begin ken's notes========== Opportunistic programmer, generally different mindset than the systematic programmer

What is a opportunistic programmer?

Application Layer Cake

iPhone has a great implementation, SDK to the app store

For ubuntu it is far more complex

Current plans

Examples

Everything in quickly must be fun and easy

Functions

Nice to have

How do we convice people that this is the way to create applications?

Look at github for social ideas, but that is probably more of a github vs. launchpad discussion

Override default plugin perhaps make quickly a gedit plugin

What about Kubuntu?

=====end ken's notes==========


CategorySpec

DesktopTeam/Specs/Karmic/Quickly (last edited 2009-09-25 21:04:08 by 97-126-110-78)