Why we write elementary apps in Valaby David Gomes

If you follow elementary OS development, you may know that we do not write our applications on C or Python, but rather a language called Vala. While it is true that a more mainstream language would lower the barrier to entry for new first-party and third-party developers, Vala has proven to be a tremendously effective tool for our needs. Here's why:

Vala is an object-oriented programming language developed by the GNOME Project, which was first released in 2006. Syntax-wise, Vala looks and acts very similarly to Java or C#, which makes it easy for new contributors to leverage their knowledge and experience from other languages. Vala's clear syntax and tight coupling with the strongly-typed GObject system promotes highly readable, expressive, and maintainable code, while preventing entire classes of crashes and bugs.

Since Vala compiles to C (and then into binary), we gain access to a large number of bindings for libraries written in C. This is extremely important given the number of C libraries available for the Linux desktop. All of our desktop applications are written using the GTK+ toolkit, and many rely heavily on related GObject-based libraries, including Gee, WebKitGTK, VTE, and GStreamer. Bindings for dozens of popular GObject C libraries exist, and writing new ones is easy.

Before we adopted Vala, we wrote our desktop applications in Python. As both a language and a platform, Python made developing apps quick and easy. However, this ease of development came at a serious cost — performance, binding support, and maintainability became major pain points for us with Python. Worse, the slow and fragmented adoption of Python 3 over Python 2, particularly across Linux distributions, made packaging our apps and developer tools for different environments tedious and challenging. Vala's native binaries have proven to be a better fit for us.

Because Vala is developed by the same incredible folks who make GTK+, integration between Vala and GTK+ is tight. Here's an example from the official Vala source of GTK Samples

Extending GTK+ with Vala has also proven successful. In fact, we've crafted our own set of widgets that build on and complement what GTK+ provides by default. This super-set of GTK+, called Granite, is at the heart of nearly every elementary application, and Vala's excellent object-oriented inheritance system, among other sophistocated language features, have been key to our development.

Vala has excellent documentation, be it in the form of tutorials, code samples or a very easy-to-use API Reference. So if you’re interested in hacking on our projects (which we very much appreciate — we are always looking for new contributors!), or are planning to release fantastic third-party desktop applications for elementary OS, we can't recommend Vala enough. Dive in!

Published May 12th, 2014


gregorej 3 months ago

Thanks for this post! I got to know about Vala. Also, I started to develop an Intellij plugin for this language: https://github.com/gregorej/vala-intellij-plugin

joan chen 5 months ago

Sorry, network outages, repeated published

joan chen 5 months ago

  I come from China,The English translation from Google,
  I just wanted to express my personal thoughts,Why do not you use the GO language development desktop environment.Please refer to the system environment from China.
Linux Deepin :www.linuxdeepin.com(Can refer to them thinking)

joan chen 5 months ago

  I come from China,The English translation from Google,
  I just wanted to express my personal thoughts,Why do not you use the GO language development desktop environment,Please refer to the system environment from China.
Linux Deepin :www.linuxdeepin.com(Can refer to them thinking)

fhjguieisie 9 months ago


fhjguieisie 9 months ago


Mike Lacey 9 months ago

Is there any documentation on building a Vala development environment?

Mike Lacey 9 months ago

Answer my own question…

Yes there is, tutorial documentation at:


logos88 9 months ago

Do you consider Rust language to write apps in the long future? It looks like a very promising language :D

Sergey Davidoff 8 months ago

Rust is more or less like C with memory safety, designed for the same use cases. While memory safety is a cool feat, Rust is a bit too low-level for us (AFAIK).

andrezlatin 9 months ago

The name you are using for your new OS is now used against us, to kill and terrorize people. I, and tens of thousands of users who read the news and know about the world we live in, can’t stand this anymore. It’s because your operating system is not for killing. I demand you now to call your creative team and get some name changes going. Please, do something! youtube.com/watch?v=vOGLesXQ4Tc

Christopher Kaster 9 months ago

Isis is still the name of an Egyptian goddess though.

Samuel Cecílio 9 months ago

Don’t worry! Isis is not ISIS. And I suppose there is no terrorist in the Elementary OS dev team.

Daniel Foré 9 months ago

We are aware of the Islamic State in Iraq and Syria (unfortunately abbreviated as ISIS). We are strongly considering an alternate code name for the next release of elementary OS. We’ll be keeping tabs on world events to see if more people associate the name with terrorism than with the mother goddess of Egypt.

Jochen Breuer 9 months ago

Vala indeed looks not too bad. But what about UI developement? Is it possible to use Glade not only for pure GTK applications but also for granite based applications?

runej 9 months ago

...and if possible, then how to do it :)
I tried Glade yesterday, but coming from a VB environment found I might be missing some information about how it works in combination with Vala. I have the basic idea, but so fat only been able to write/compile in Terminal. If someone could make a short video tutorial…?

Phrodo_00 9 months ago

You just load the xml file with GtkBuilder, and then retrieve the references to the stuff you need.

runej 9 months ago

Is GTKbuilder something I have to install? Synaptics doesn’t know it…
And do I edit the code in GTKbuilder?
Thanks for your answer.

George Sofianos 9 months ago

Gtk.Builder is a class. You have to create a Builder object , load the glade file and then you ask from it the widget you need to handle.

var builder = new Gtk.Builder.fromfile(“myfile.glade”);
var label = builder.get
object(“label1”) as Gtk.Label;
label.set_text(“Changed label”);

Gtk.Builder class : http://references.valadoc.org/#!api=gtk+-3.0/Gtk.Builder

runej 9 months ago

Thanks a lot, that answered my question very welll.

Load More Comments

Login to place a comment.

Just one second… Login in to comment, ask questions and more.