By tapping the strengths of the open-source movement, developers can write custom Linux software without spending a dime on licensing fees. Aimed at the experienced C/C++ programmer, Professional Linux Programming
provides a wide-ranging and hands-on guide to the different pieces of the puzzle that are required to program successfully on this exciting new platform.
The book is framed as a case study for building a custom database program in Linux for a video rental store. After a tour of the requirements and a brief look at project management for creating this software, the various Linux packages that are needed to implement this system are described, along with sample code, most of which is written in C. Some packages, such as the CVS version-control package, come with most distributions of Linux; others will require downloading additional software over the Internet. In every case, you're provided with the actual command-line arguments that are needed to install, configure, and run each package.
Besides a great exploration of CVS for version control, this title offers excellent coverage of the free PostgreSQL and MySQL databases, which are two very popular choices for Linux databases. The book also does a good job of explaining UI design under both the GTK+/GNOME and KDE (two popular Linux desktops), and how to extend the reach of the sample database application by using Remote Procedure Calls (RPCs) and CORBA. Of course, the finished application doesn't use every Linux API that's covered here, but the book does cast a wide net, and introduces features and tools that are available.
Two prominent chapters take you on a tour of the essentials of other programming languages. There's PHP for Web development and an appealing, enthusiastic introduction to Python (which probably will turn you into a Python convert). Later chapters provide practical tips for testing and debugging applications, including how to profile your code. The book closes with a useful guide to creating Red Hat Package Manager (RPM) packages for deploying applications, as well as an overview of your options for internationalization.
By covering so many APIs, languages, and tools effectively, Professional Linux Programming gives experienced C/C++ programmers all that they need to get started with Linux development. With its remarkably clear presentation style and abundance of practical tips, the book is an admirably useful blueprint for building custom software. --Richard Dragan
- Introduction to open-source software and Linux requirements
- Use cases and sample C objects for sample video rental store
- Version control and CVS (command-line options, revisions, branches, and multiuser version control)
- Open-source freeware packages compared (mSQL, MySQL, and PostgreSQL)
- Introduction to databases
- Installing and using PostgreSQL
- Tutorial on psql SQL
- PostgreSQL C database APIs using libcq and embedded SQL calls with ECPG
- Installing and using MySQL (command-line utilities and C database APIs)
- Debugging with gdb
- Introduction and tutorial to UI programming with glib
- GTK+ and GNOME
- Source trees and GNOME
- UI design with Glade
- Testing strategies (including regression testing, profiling, and memory bounds checking)
- KDE/Qt UI programming
- Introduction and quick tutorial to Python (keywords and basic syntax)
- PHP for Web programming
- Introduction to Remote Procedure Calls (RPCs) and CORBA
- XML basics (document structure, parsing, and libxml)
- Strategies for documentation (including custom man pages)
- Distributing Linux applications with Red Hat Package Manager (RPM) packages
- Code patches
From the Publisher
This book is for people who have Linux installed, are comfortable with it and have some knowledge of programming. They may well have bought BLP and now want to delve deeper. Advocating the "right tool for the job", but with different tools in mind, this volume shows the reader how to program databases, next-generation GUIs, and controlling devices.