Easily one of the best books ever written on Mathematica is David Wagner's Power Programming with Mathematica: The Kernel.
It was written more than ten years ago at a time when version 3 of Mathematica was current but is every bit as much relevant today as it was then since the foundation on which Mathematica is built has not changed that much over the intervening years.
Unfortunately the book is out of print and it may be difficult to locate a used copy ... a university library however should be able to obtain a copy easily through inter-library loan. This beautifully written book is well worth the trouble of tracking it down.
As an aside question: does anyone know where David Wagner is today?
In the interest of completeness, Wellin's An Introduction to Programming in Mathematica is also worth mentioning here (nice section on front-end programming and provides example of a complete DSL implementation in Mma) in addition to Maeder's Computer Science with Mathematica (especially helpful for those trying to use Mma in a OOP style), Mangano's Mathematica Cookbook (full of in-depth recipes for a multitude of concrete problems), Wagon's Mathematica in Action (focused on solving mathematical problems in Mma many of a recreational nature) and Trott's four-volume Guidebooks on Numerics, Programming, Symbolics, and Graphics (which includes thousands of pages of examples of Mathematica being used to solve a wide range of different problems with in-depth discussion and demonstration of Mma programming language features).
There are of course many more Mma books out there. These are just some of the titles that I've found most useful over the last decade or two using Mathematica.