Ubuntu Touch SDK Beta - A New Way To Program Linux |
Written by Ian Elliot | |||
Friday, 26 July 2013 | |||
Canonical has just announced the beta SDK for Ubuntu Touch. While this might look just like another attempt at getting developers to work with yet another mobile operating system - it is much more. In fact you should be interested in this SDK even if you have no interest in mobile. Canonical has a serious communications problem at the moment. Its headline news is that it is readying Ubuntu to work on touch enabled devices - phones, tablets and presumably TVs. This is a reasonable enough idea, but one that will be greeted by many with a bit of a yawn because we already have too many Linux based mobile operating systems. While Ubuntu enthusiasts might cheer the team on, the rest of us are already too deep into Android, iOS and even Firefox OS. However, you should stifle that yawn because Ubuntu's strategy is something you need to know about. It isn't just about developing apps for a mobile operating system that doesn't actually have any shipping hardware at the moment. This is about developing what look like native apps that work on a very popular version of desktop Linux, i.e. Ubuntu. The fact that Canonical is producing versions of Ubuntu for mobile and touch enabled devices in general is therefore, to many developers, just the icing on the cake. The first thing to say is that you can do native development in C/C++ using Qt as your UI framework. This is nothing very new apart from the UI framework being touch enabled. You can also write apps using the QML UI design language and JavaScript. What is special about this SDK is that it lets you write applications using HTML and JavaScript that look and behave like native applications. At this point you might say that this is nothing new - after all both Firefox OS and Chrome OS do this. But wait, Ubuntu is a Linux operating system not a browser. It doesn't naturally have a way to render HTML or run JavaScript - unless you put a browser on top of it. Ubunto lets you write HTML/JavaScript and run the result as a native app. It uses the same techniques that Cordova, a.k.a PhoneGap, uses. In this case the Cordova API has been implemented to map the JavaScrpt calls directly to native calls. The UI is created by using data-role attributes to map divs to Qt widgets. It really is that simple and works wiith any Qt widget that you want to use. For example:
puts a Qt CheckBox on the page. You can see that this isn't exactly the standard HTML way to create a UI, but it is close and you get something that looks and feels like a native application that will run on everything from Desktop Ubuntu, through a tablet to a phone. You can even use responsive design to make sure tha the layout looks good. If you think that this approach sounds familiar, it is worth saying that it is very much like the way Microsoft has implemented HTML/JavaScript apps under WinRT where the same trick of mapping HTML tags to native controls is used. There is a lot missing from this SDK and things don't always work first time - there is a lot of closing down the Qt creator and starting it up again for example - but you can see where the whole thing is going. Canonical is not only creating a touch enabled version of Ubuntu, it is building an easy-to-use development environment workable in a range of languages. You can select C/C++, Qt, QML, HTML and JavaScript. In the future other languages such as Python will probably be officially supported. The idea seems to be write once run anywhere - as long as it is a flavor of Ubuntu. All you need to work with the SDK is the latest Ubuntu on a desktop machine and perhaps a developer phone.
More InformationRelated ArticlesUbuntu For Tablets Completes The Set Canonical Wants Help With Ubuntu Phone Apps
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
Comments
or email your comment to: comments@i-programmer.info
|
|||
Last Updated ( Saturday, 27 July 2013 ) |