Bad Voltage, apps, and generic components for Ubuntu

I wrote a very simple app for Ubuntu for Bad Voltage, the finest podcast in the land. It shows you the list of shows, and lets you play them. Simple. Streaming: there’s no downloading for offline use here, no notifications of new shows; it’s a little app, only. So the first thing you should do is go search for it on your Ubuntu phone and install it.

More interestingly, though, I tried to make this a generic app. That is: the actual code which defines this as a Bad Voltage app looks like this:

import QtQuick 2.0
import Ubuntu.Components 0.1
import "components"

MainView {
    objectName: "mainView"
    applicationName: "org.kryogenix.badvoltage"
    automaticOrientation: false

    width: units.gu(40)
    height: units.gu(71)
    id: root
    backgroundColor: "black"

    GenericPodcastApp {
        name: "Bad Voltage"
        squareLogo: "http://farm4.staticflickr.com/3794/10457827766_59715d2694_o.jpg"
        author: "Stuart Langridge, Jono Bacon, Jeremy Garcia, and Bryan Lunduke"
        category: "Technology"
        feed: "http://www.badvoltage.org/feed/ogg/"
        description: "Every two weeks Bad Voltage " +
            "delivers an amusing take on technology, " +
            "Open Source, politics, music, and anything " +
            "else we think is interesting."
    }
}

To make a similar app for your podcast, just fetch the GenericPodcastApp.qml file from the Bad Voltage app source, include it in your project, and then use the GenericPodcastApp component. Define a name, squareLogo, author, category, feed, and description, and that’s it; you’re done.

I’d love there to be a whole bunch of generic components like this. Something where I don’t really have to mind how it works, I just grab it from somewhere, drop it into my project, and use it. A QR code scanner, a QR code generator, a circular dial widget, an online high-score table. Obviously it’s possible to make reusable components right now, but there’s no market in them; what I want is something almost like the Ubuntu app store but for developers, where I can look for components, grab one, and insert it into my project, right from the Ubuntu SDK editor. One button-push should update any of these components that I have in my project; that way, if someone fixes a component I can rebuild my app to include it with ease. What I really want is the Ubuntu component equivalent of npm install, I think. The ultimate destiny of any such component is to be so useful to so many people that the Ubuntu core team lift it out of the component store and into the SDK, but it’d be great if it were easier to do this before things get to that stage, and the SDK can’t contain everything. I see no reason why some of these components couldn’t be open source and some sold for money, so there’s potentially an income stream there for Ubuntu developers who make reusable things. GenericPodcastApp is hugely trivial, but an example of the sort of thing that I think could develop. Any component which doesn’t use anything very Ubuntu-specific would work on other QML platforms too, and vice-versa, so the market could even be usable by developers across many platforms.

More in the discussion (powered by webmentions)

  • A response was written at More on an Ubuntu Component Store (www.kryogenix.org) After yesterday’s musings on a “component store” for Ubuntu developers, a few people said “hm that sounds interesting, how would it work?” So I’ve thr…
  • A response was written at Ubuntu Component Store, redux (www.kryogenix.org) A while back I proposed an “Ubuntu Component Store” and built a noddy implementation of the command line utility for it. Recently, Nekhelesh Ramanatha…