Programmers Guide to GEM

Reviewed by Matthew Jones

 

Issue 26

Mar/Apr 87

Next Article >>

<< Prev Article

 

 

Published by SYBEX
£19.95

GEM is not a system that you can learn overnight. Indeed if you are new to programming a graphics oriented system, then you will find that there are a large number of new concepts which you have to grasp in order to fully understand, and thus get the best out of, GEM. The first books published which gave information about GEM programming were very much repeats of the Digital Research 'GEM Programmers Guide', giving a function by function description of the facilities of GEM. They told you, for instance, that to set the font alignment to baseline mode, then you use such-and-such a call. What they did not do was tell you why you would want to set the alignment at all. This is where the SYBEX 'Programmers guide to GEM' comes in.

This book, aimed at both IBM and Atari owners (see later), gives you a good grounding to each set of library functions, explaining what they do, why you would want to do them, and it usually gives a few examples of 'C' source code to experiment with. Very good use is made of illustrations to support the text (in the given alignment case, an example of each effect is shown).

The book has six chapters, covering: Introduction to GEM; the Application Environment Services (AES), including an overview and then complete function descriptions; The Virtual Device Interface (VDI), including a short primer on graphics and then the VDI functions; GEM SAMPLE PROGRAM: HELLO, a complete GEM application, with listing and full explanation; GEM DEMO (DOODLE), a more complex example (see below); ADVANCED GEM TOPICS, including design, Metafiles, debugging, the bindings, and a tool survey. The six appendixes include a good glossary, AES and VDI quick references, Resource construction set tutorial, the listing of DEMO, and Metafile functions.

While I think that the general descriptions of the AES and VDI functions of this book make it the best yet, what really makes it a must for the new programmer is the two sample programs. When I first started GEM programming, all I had to learn from was a single relatively un-commented listing (ahh!). This book provides two complete programs (header files as well) as examples, and thoroughly explains why each command is being done. Thus instead of telling you that at the start of your program you should have these seven lines, it actually explains why you should have them, and what they are doing: By providing this sort of information you will become a much more proficient programmer because you will understand what you are doing. The second example used is DRI's DR DOODLE program, and includes listings of all of the standard GEM header files.

While this book is very good, it does have its omissions. I cannot find any reference to the vqmouse or vqtattributes functions, or indeed many other 'lower level' functions. The reason for this (according to the preface), is that they wanted to give a 'conceptual framework' tutorial, not a reference manual. But although you will still need a separate 'function by function' manual, the books advantages outweigh this (I think slight) disadvantage.

In general, this book is well worth the (rather large) asking price, and I recommed it for anyone's library.

top