Most Popular

Search this site

Most Recent

Vala Tutorial

A very useful tutorial that describes the Vala programming languages and the basics of it

Categories: Documentation, Vala
Homepage: http://live.gnome.org/Vala/Tutorial
Published by: ossdeveloper.com admin
Total page views: 109
Total rating: 0
Total votes: 0
Date added: 2008-06-27 10:44:52
Date modified: 2008-06-27 10:44:52

Description

What is Vala?

Vala is a new programming language that allows modern programming techniques to be used to write applications that run on the gnome runtime libraries, particularly glib and gobject. This platform has long provided a very complete programming environment, with such features as a dynamic type system and assisted memory management. However, before Vala, the only ways to program for the platform were with the machine native C API (which exposes a lot of often unwanted detail,) with a high level language with an attendant virtual machine (such as Python or a Mono language,) or with C++ through a wrapper library.

Vala is different from all these other techniques as it in fact outputs C code which can be compiled to run with no extra library support beyond the Gnome platform. This has several consequences, but most importantly:

  • Programs written in Vala should have have broadly similar performance to those written directly in C, whilst being easier and faster to write an maintain.
  • A Vala application can do nothing that a C equivalent cannot. Whilst Vala introduces a lot of language features that are not available in C, these are all in fact mapped to C constructs, albeit often ones difficult or time consuming to write directly.

As such, whilst Vala is a modern language with the features you would expect for that, it gains its power from an existing platform and must in some ways comply with rules set down by it.

Who is this tutorial for?

This tutorial will not go into depth about basic programming practices. It will only briefly explain the principles of Object Oriented programming, instead focusing on how Vala applies the concepts. As such it will be helpful if you have experience of a variety of programming languages already, although in depth knowledge of any particular one is not required.

Vala shares a lot of syntax with C#, but I will try to avoid describing features in terms of their similarity of differences with either C# or Java in order to hopefully make the tutorial more accessible.

What will be useful, is a reasonable understanding of C. Whilst this isn\'t needed for understanding Vala per se, it is important to realise that Vala programs are executed as C, and will often interact with C libraries. Knowledge of C will certainly make a deeper understanding of Vala far easier to come by.

More information

Access the home page for more information

Leave a comment

Your name

Your comments

Please type the characters you see in the image below