Rich Cross-Platform Desktop Applications Using Open-Source Titanium
Titanium is an open-source platform that enables developers to build rich desktop applications using standard Web technologies. Titanium applications run natively on Linux, Mac OS X and Windows operating systems. At a high level, Titanium competes directly with Adobe AIR, although it differs from AIR in three major ways. First, Titanium is open source; it's licensed under the Apache Public License (version 2). Second, Titanium is fully extensible; Titanium extensions can be written using a number of popular languages, including C++, JavaScript, Ruby and Python. Finally, Titanium opens up user interface programming to popular languages like Ruby and Python—a job typically reserved only for JavaScript. Both Ruby and Python have full access to the Document Object Model (DOM), which puts these languages on par with JavaScript for building rich, dynamic user interfaces.
It is important to note that Titanium is not a system that provides a point-and-click ability to build a single application that runs both on the Web and on the desktop; however, that is not to say code sharing across the Web interface and desktop interface is impossible.
Some developers may choose to develop with a share-and-segregate pattern: write a common set of shared libraries, then write platform-specific code for use in a Web interface and other code for use in a desktop interface. In this case, you'll still have a single codebase, but you'll end up with two different apps.
Other developers may choose to develop using progressive enhancement. With progressive enhancement, you start by implementing a basic set of features, then as new resources become available, you build up functionality to make use of these new resources.
A good example is Google Docs. There's a basic set of features you can access on-line, but if you install Google Gears, you get off-line access and other features as well. The same goes for Titanium apps. Developers can enhance their Web applications progressively by adding features and functions that will be available only when the app is run on a Titanium instance. Using this approach you have just a single app.
Both of these techniques are valid choices when it comes to developing apps. Both techniques have pros and cons, and it's up to you as the developer to choose which method to use.
No matter which technique you choose—two separate codebases, one codebase and two apps, or one app—at the very least, Titanium allows you to leverage your Web development knowledge to build desktop applications. It lets you use HTML and JavaScript, as well as other languages most often associated with Web development, to develop desktop applications.
Titanium is a development platform with one clear goal: leverage Web technologies to create rich, cross-platform desktop applications. Using Titanium, you can create desktop applications using HTML and JavaScript, yet still get features not available on browser applications. For example, Titanium Web applications built for the desktop can access the filesystem and interact with the underlying operating system.
The idea behind Titanium isn't new, but Titanium clearly separates itself by giving you something unique: unlimited possibilities with open-source choices. You aren't forced to use anything proprietary—you can use any library or framework you want. All technological decisions are yours to make.
Although I mainly program with JavaScript for Web applications, it isn't the only technology that powers the Web. Titanium works well with Python, PHP, Ruby, Java, Flash and Flex, and Silverlight. So whatever technology you're using right now to develop your Web applications, you'll likely be able to use it with Titanium.
Because Titanium is distributed under the open-source Apache Public License v2, you can download the source code, play with it, fork it and extend it. It's this extensibility that makes Titanium a platform that developers can grow with in the future. The platform can morph and evolve into different forms as new needs emerge.
Titanium is evolving rapidly and has experienced several major changes to its architecture in the past few months.
The initial preview release of Titanium (PR1) incorporated WebKit and a modified version of Google Gears. Essentially, Titanium PR1 used WebKit as its main component, and additional features were exposed to the runtime via a native extensions system, which gave developers access to features from a modified version of Gears.
Soon after this initial preview release, the Titanium team started to re-architect the platform. Google Gears was removed, and instead, a new system for exposing new features was created: Kroll.
Kroll is the microkernel that powers Titanium and extends the framework. This compact microkernel, written in C++, is a cross-language, cross-platform “binding” and invocation framework that enables mixing and matching code within the kernel. All the features that Titanium exposes are accomplished via Kroll modules. By using Kroll, Titanium gains the ability to support a multitude of languages and technologies. And, because Kroll is fully extensible, anyone can add more features to the platform, using any technology. You don't need to be a C++ guru to extend Titanium. You can create new modules using Python and Ruby, or even just plain-old JavaScript.
Titanium's use of WebKit was retained during the rewrite from PR1, and for good reasons. Not only is WebKit one of the best, standards-compliant engines available today, but it also features lots of goodies, such as HTML5 client database storage, CSS transformations and animations, and a fast JavaScript engine. All of these, of course, are available on Titanium.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Dynamic DNS—an Object Lesson in Problem Solving
- Designing Electronics with Linux
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Web & UI Developer (JavaScript & j Query)
- Senior Perl Developer
- Technical Support Rep
- Symbolic Math with Python
- UX Designer
- Network Monitoring with Ethereal
- I once had a better way I
3 min 35 sec ago - Not only you I too assumed
20 min 58 sec ago - another very interesting
2 hours 14 min ago - Reply to comment | Linux Journal
4 hours 7 min ago - Reply to comment | Linux Journal
11 hours 1 min ago - Reply to comment | Linux Journal
11 hours 17 min ago - Favorite (and easily brute-forced) pw's
13 hours 8 min ago - Have you tried Boxen? It's a
19 hours 45 sec ago - seo services in india
23 hours 32 min ago - For KDE install kio-mtp
23 hours 33 min ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
Titanium: good idea, bad implementation
...except, the product is unreliable as stink (I am using 0.82). I am surprised you were able to get your example code running. Every corner I discover new show-stopper bugs that shouldn't even be in a beta product. On top of that, because you rely on their "cloud", you are at the mercy of their server code too - which is crazy unreliable. I would say 90% of the time I am not even able to get an installer built! And, once the installer is made, often it is corrupt - or doesn't install properly. Just go try to install some of the "example" apps on appcelerator's site - I only tried 3, but 2 wouldn't install properly. Geesh!
The idea is terrific: native apps with a UI in an embedded webkit. But the implementation is weird and unreliable. And, the whole so-called "cloud" bit to their development story is ridiculous. Let's hope 1.0 is dramatically better quality.