You are previewing GNOME 3 Application Development Beginner's Guide.
O'Reilly logo
GNOME 3 Application Development Beginner's Guide

Book Description

Step by step practical guide to get to grips with GNOME application development

  • Full of easy to follow tutorials with ready-to-run code

  • Covers most of the subsystems in the GNOME 3 platform stack, from low to high level

  • Adapts common good development practices with GNOME 3 development environment

In Detail

GNOME is a desktop environment and graphical user interface that runs on top of a computer operating system. GNOME 3 provides both modern desktops and development platforms with more than 50 supported languages of the world. Since 1999, it has been evolving into a very nice desktop to use and an interesting platform to develop on.

"GNOME 3 Application Development Beginner's Guide" is about developing GNOME 3 application with Vala and JavaScript programming languages. It guides the reader to build Gtk+, Clutter, and HTML5 applications on the GNOME 3 platform. It covers GNOME 3 specific subsystems such as data access, multimedia, networking, and filesystem. It also covers good software engineering practices such as localization and testing.

This book is full of step-by-step tutorials and ready to run codes. The examples are written in a simple and straightforward way to make it easier for the reader to get a thorough understanding of the topics.

The book starts with the installation of GNOME 3 and ends with building two exciting projects, a web browser and a Twitter client. The book starts from the basics and gradually talks about more advanced topics.

It then guides the readers in using the development environment starts from Anjuta IDE, Glade, and DevHelp. The essential GNOME 3 subsystems like GStreamer, GLib, GIO, GSettings, Evolutions Data Server, WebKit, and GNOME desktop are then uncovered one by one. Then the internationalization, localization, and unit testing techniques are brought up.

"GNOME 3 Application Development Beginner's Guide" is really a guide that a novice GNOME 3 application developer must not miss.

Table of Contents

  1. GNOME 3 Application Development Beginner's Guide
    1. Table of Contents
    2. GNOME 3 Application Development Beginner's Guide
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Time for action – heading
        1. What just happened?
        2. Pop quiz – heading
        3. Have a go hero – heading
      6. Reader feedback
      7. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Installing GNOME 3 and SDK
      1. System requirements
        1. The GNOME Shell
        2. GNOME Panel/Fallback
        3. Development requirements
      2. GNOME 3 desktop architecture
      3. GNOME and the SDK
      4. Time for action – installing GNOME and SDK in Fedora 17
        1. What just happened?
        2. Marking packages to be installed
        3. Ready to install the packages
      5. Time for action – installing GNOME and SDK in openSUSE 12
        1. What just happened?
        2. Marking SDK packages
        3. Starting the installation
      6. Time for action – installing GNOME and SDK in Debian Testing
        1. What just happened?
        2. Marking SDK packages
        3. Applying the installation
      7. Time for action – installing GNOME and SDK in Ubuntu 12.04
        1. What just happened?
        2. Continue installing the SDK
      8. Summary
    9. 2. Preparing Our Weapons
      1. Firing up Anjuta
      2. Time for action – creating a new Vala project
        1. What just happened?
        2. The IDE layout
          1. Bookmarks
          2. Files
          3. Project
          4. Symbols
          5. Watches
          6. Breakpoints
          7. Messages
          8. Terminal
      3. Navigation between tabs
      4. Time for action – navigating between tabs
        1. What just happened?
      5. Comment block
      6. Time for action – commenting/uncommenting a block
        1. What just happened?
        2. Have a go hero – uncommenting the block
      7. Time for action – running the program for the first time
        1. What just happened?
        2. Make an error and see how it works
      8. Editing UI
      9. Time for action – editing UI
        1. What just happened?
        2. Palette
        3. Widgets
      10. Time for action – adding a label and a button
        1. What just happened?
      11. Time for action – changing widget properties
      12. A responsive button
      13. Time for action – making the button responsive
        1. What just happened?
        2. Pop quiz – naming a signal
      14. Tracking symbols
      15. Time for action – finding a symbol
      16. Getting help
      17. Summary
    10. 3. Programming Languages
      1. Programming GNOME with JavaScript
      2. Time for action – saying hello to Seed
        1. What just happened?
        2. Have a go hero – trying more JavaScript code here
      3. Time for action – running our program with Seed
        1. What just happened?
        2. Loosely typed language
      4. Time for action – playing with data types
        1. What just happened?
        2. Pop quiz – what is the value now?
        3. Controlling iteration
      5. Time for action – controlling Iteration
        1. What just happened?
        2. Have a go hero – counting down
      6. Time for action – manipulating an array
        1. What just happened?
        2. Have a go hero – fill with anything you want
        3. Object-oriented programming (OOP) with JavaScript
      7. Time for action – using the JavaScript object
        1. What just happened?
        2. With great power comes great responsibility
        3. Have a go hero – another way to fill the object
        4. Constructing objects
      8. Time for action – playing with constructors
        1. What just happened?
        2. Class and object
        3. Pop quiz – can you see the difference now?
        4. Using prototypes
      9. Time for action – adding prototypes
        1. What just happened?
        2. Have a go hero – adding more methods
      10. Time for action – modifying the prototype of an object
        1. What just happened?
        2. Pop quiz – how to make it global then?
        3. Have a go hero – changing the implementation details
        4. Modularization
      11. Time for action – modularizing our program
        1. What just happened?
      12. Getting to know Vala
      13. Time for action – entry point to our program
        1. What just happened?
        2. Have a go hero – look at the generated C code
        3. Member access specifier
      14. Time for action – defining member access
        1. What just happened?
        2. The access specifiers
        3. Pop quiz – how to fix this?
        4. Basic data types
      15. Time for action – experiment with data types
        1. What just happened?
        2. Gee, what is it?
      16. Time for action – adding the Gee library
        1. What just happened?
      17. Time for action – Gee in action
        1. What just happened?
        2. Initializing members when declaring
      18. Time for action – watching for signals
        1. What just happened?
        2. Have a go hero – putting parameters in signals
      19. Summary
    11. 4. Using GNOME Core Libraries
      1. Before we start
      2. The GLib main loop
      3. Time for action – playing with the GLib main loop
        1. What just happened?
        2. Have a go hero – stopping the timeout
      4. GObject signals
      5. Time for action – handling GObject signals
        1. What just happened?
        2. Have a go hero – writing it in Vala
      6. GLib properties
      7. Time for action – accessing properties
        1. What just happened?
        2. Pop quiz – why the value of zero is printed out
        3. Have a go hero – making a property read-only
      8. Configuration files
      9. Time for action – reading configuration files
        1. What just happened?
        2. Have a go hero – multi-section configuration
      10. GIO, the input/output library
      11. Time for action – accessing files
        1. What just happened?
      12. Network access with GIO
      13. Time for action – accessing a network
        1. What just happened?
        2. Have a go hero – making an echo server
      14. Understanding GSettings
      15. Time for action – learning GSettings
        1. What just happened?
      16. GSettings API
      17. Time for action – accessing GSettings programmatically
        1. What just happened?
      18. Summary
    12. 5. Building Graphical User Interface Applications
      1. Before we start
      2. Creating a basic GTK+ application
      3. Time for action – implementing the mockup
        1. What just happened?
        2. Pop quiz
        3. Have a go hero – creating a Vala version
      4. Time for action – adding icons to the buttons
        1. What just happened?
        2. Have a go hero – adjusting the icon placement
      5. Porting the code without GtkBuilder
      6. Time for action – programming with raw GTK+
        1. What just happened?
      7. GUI programming with Clutter
      8. Time for action – implementing the mockup with Clutter
        1. What just happened?
        2. Have a go hero – playing with the animations
      9. Summary
    13. 6. Creating Widgets
      1. Before we take off
      2. Overriding the widget's standard functions
      3. Time for action – overriding the set_title function
        1. What just happened?
      4. Adding new functionalities
      5. Time for action – making a composite widget
        1. What just happened?
      6. Maintaining compatibility
        1. Have a go hero – hiding the entry after use
      7. Implementing a GTK+ custom widget
      8. Time for action – implementing the custom widget
        1. What just happened?
      9. Maintaining widgets in a library
      10. Time for action – creating a library
        1. What just happened?
      11. Summary
    14. 7. Having Fun with Multimedia
      1. Packages required
      2. Understanding the basic concept of GStreamer
      3. Accessing the GStreamer pipeline with the command line
      4. Time for action – testing the pipeline
        1. What just happened?
      5. Time for action – programmatically playing the audio
        1. What just happened?
      6. Time for action – handling the events
        1. What just happened?
      7. Playing a video media
      8. Time for action – playing video
        1. What just happened?
        2. Have a go hero – defining the audio first
      9. Time for action – programmatically playing the video
        1. What just happened?
      10. Summary
    15. 8. Playing with Data
      1. Presenting data with TreeView
      2. Time for action – using TreeView
        1. What just happened?
      3. The Evolution Data Server (EDS) architecture
      4. Time for action – setting up the address book and the calendar data source
        1. What just happened?
      5. Time for action – accessing the address book
        1. What just happened?
      6. Have a go hero – saving data to the address book
      7. Summary
    16. 9. Deploying HTML5 Applications with GNOME
      1. Before we start
      2. Embedding WebKit
      3. Time for action – embedding WebKit
        1. What just happened?
      4. Runtime with JavaScriptCore
      5. Time for action – calling the Vala object from the frontend
        1. What just happened?
        2. Have a go hero – using a separate HTML file
      6. Time for action – connecting GNOME with client-side JavaScript
        1. What just happened?
        2. Have a go hero – where to put index.html
      7. Summary
    17. 10. Desktop Integration
      1. Talking to each other with D-Bus
      2. Time for action – listening to D-Bus
        1. What just happened?
        2. Pop quiz – a good example application?
      3. The GNOME session manager
      4. Time for action – talking to the session manager
        1. What just happened?
        2. Have a go hero – checking all nulls
      5. Launcher
      6. Time for action – putting our application in the launcher
        1. What just happened?
      7. GNOME keyring
      8. Time for action – storing passwords securely
        1. What just happened?
      9. Notification system
      10. Time for action – sending notifications
        1. What just happened?
        2. Have a go hero – displaying an icon
      11. Summary
    18. 11. Making Our Applications Go International
      1. Understanding locale
      2. Time for action – getting the available locales
        1. What just happened?
        2. Have a go hero – exploring the locale parameters
      3. Time for action – adding a locale
        1. What just happened?
      4. Time for action – getting different outputs with different locales
        1. What just happened?
        2. Have a go hero – using a bogus local identifier
      5. i18n in a Vala project
      6. Time for action – bootstrapping the infrastructure
        1. What just happened?
      7. Time for action – creating a UI
        1. What just happened?
      8. Time for action – translating UI texts
        1. What just happened?
        2. Have a go hero – installing another locale
      9. The localization process
      10. Summary
    19. 12. Quality Made Easy
      1. Reasons for performing unit testing
      2. Time for action – creating our first unit test
        1. What just happened?
        2. Have a go hero – checking the actual value
        3. Stubbing our tests
      3. Time for action – creating stubs
        1. What just happened?
      4. Testing GUI modules
      5. Time for action – testing a GTK+ module
        1. What just happened?
        2. Have a go hero – adding missing tests
      6. Summary
    20. 13. Exciting Projects
      1. Part I – web browser
      2. Time for action – designing our UI
        1. What just happened?
        2. Browser interaction
      3. Time for action – preparing the build infrastructure
        1. What just happened?
      4. Time for action – finishing up
        1. What just happened?
        2. Have a go hero – creating more tests
      5. Part II – A Twitter client
      6. Time for action – implementing the Twitter client
        1. What just happened?
      7. Summary
    21. A. Pop Quiz Answers
      1. Chapter 2, Preparing Our Weapons
        1. Pop quiz – naming a signal
      2. Chapter 3, Programming Languages
        1. Pop quiz – how to fix this?
        2. Pop quiz – what is the value now?
        3. Pop quiz – can you see the difference now?
        4. Pop quiz – how to make it global
      3. Chapter 4, Using GNOME Core Libraries
        1. Pop quiz – why the value of zero is printed out
      4. Chapter 5, Building Graphical User Interface Applications
        1. Pop quiz
      5. Chapter 10, Desktop Integration
        1. Pop quiz – a good example application
    22. Index