Most Helpful Customer Reviews
|
|
8 of 9 people found the following review helpful:
5.0 out of 5 stars
Turn Web into Desktop Skill, June 5, 2006
Did you know that PHP can be used to build desktop applications? Yeah, me neither. No, I don't mean Ajax stuff that simulates the responsiveness of a desktop application. We're talking double-click my icon, launch the program, self-contained type stuff here. I just finished reading Pro PHP-GTK by Scott Mattocks, which explains how to use the PHP-GTK extension to build powerful desktop applications. The implications for this are pretty big, because it means you can have data entry done from a controlled desktop environment, could be used for display in a website. This adds a layer of security by not having input fields on the Internet, yet allows for the benefits of displaying info online.
The book begins by explaining some of this history around PHP-GTK. By the way, PHP is a recursive acronym which stands for PHP Hypertext Preprocessor. Originally it used to stand for Personal Home Page. GTK stands for GIMP Took Kit. GIMP in turn stands for GNU Image Manipulation Program. GNU is a recursive acronym which stands for GNU's Not UNIX. UNIX stemmed from UNICS, short for Uniplexed Information and Computing System. Thoroughly confused yet? Yeah, me too. All you really need to know is that GTK is a platform independent extension which allows for building of consistent user interfaces, and that the PHP-GTK extension allows it to interface with PHP.
Scott also walks you through the initial setup, then explains how to use the SOAP extension, as well as PEAR and PECL packages. He then covers the concept of widgets, which are basically aspects of a program that can be interacted with. Everything from buttons, scrollbars and text input areas fall into this category. Next up are events and signals, which happen within the application, and can let it know when something significant has occured.
There are several chapters on window styling, using the layout rendering library called Pango to handle the presentation. I suppose you could think of it like CSS for a GTK desktop application, though it contains far more logic and is lighter on stylistic aspects. It involves things like frames, boxes, tables, fixed containers, and notebooks which are basically tabbed areas of a program. He also explains window dependency. For instance, when a loading screen appears until a program is fully launched, or how all sub-windows close during shut down.
There is also a slew of chapters on controlling data entry, covering things typical in HTML, which are also applicable to the desktop. These include labels, entry fields, combo boxes, sliding scales / spinners, and traditional buttons. You can also build quite a bit of flexibility into the text handling, such as adding bold or italics, changing the font face or text size. Additionally, he explains how to make collapsible data trees and nested lists, and covers how to make custom scrollable areas. You can even make the application respond to drag and dropping of other files and formats directly into the application's interface.
The last chapter covers program compiling and distribution, so that users of your application won't necessarily need to have PHP installed to use your programs. This helps make the whole process as seamless as possible. I also really like that from start to finish, he shows you how to build a real inventory tracking system, which could be used in real life. This whole book is cohesive, well thought-out, and quite comprehensive in its approach to covering PHP-GTK. I would highly recommend it to those who are already experienced with PHP, and want to become adept desktop programmers using familiar tools.
|
|
|
5 of 5 people found the following review helpful:
5.0 out of 5 stars
Highly recommended for the intended audience, September 5, 2006
If you want to do more with PHP than just write web-based applications then the GTK extensions may be just what you are looking for. With PHP-GTK you can develop a desktop application that has nothing to do with a website. In this book the author walks the reader through installing PHP-GTK and then provides a complete tutorial on writing programs with it.
The PHP-GTK documentation takes a functional approach by describing each function and how it is used. This is fine as long as you can work through the functions when you need one and determine how to make it work with other functions to get the results you want. The author of this book takes a different path by using a problem resolution approach. He describes common problems or common tasks and then walks the reader through how to resolve that problem or complete the task. This is a preferred method of learning how to use a programming language since each function of a language does not exist in a vacuum but in a relationship with other functions in order to achieve the results you want.
Pro PHP-GTK is a highly recommended book for those who want to know about using PHP-GTK to create stand-alone applications and already understand the basics of object-oriented programming.
|
|
|
3 of 3 people found the following review helpful:
4.0 out of 5 stars
300-page PHP-GTK tutorial, June 29, 2006
PHP-GTK is a library allowing PHP developers to create graphical GTK applications. Pro PHP-GTK by Scott Mattocks aims to teach this tool to people of all skill levels from those who can read PHP fairly well to professionals. This might make it kind of disturbing for the more advanced coder, because the book teaches even the most basic things like What is a GUI application? and What are they good for? Although the book is meant for beginning coders, too, it doesn't mean it should contain stuff that is aimed at people who know nothing about computers. Luckily, after a few chapters this problem seems to vanish.
After the basics have been taught, the book goes to how a real-life application would be built. It's a product information management system for a fictive corporation called Crisscott, inc. I think it's a very good choice for the example app. After all, developing such software is quite GUI centric and various widgets are needed. There are numerous example code listings. I feel that the vast majority of them are explained well enough to be understood.
In addition to the actual programming, the book also covers installing PHP-GTK 2 on Windows and Linux, and the installation of PEAR and PECL packages. The last chapter gives information on distributing applications, concentrating on PEAR but mentioning PHP compilers, too.
If you want a manual-like book, this one isn't for you. However I think it works very well as a tutorial-based approach to the subject. And as that's what the book aims to be, that's how I rate it.
|
|
|
Most Recent Customer Reviews
|