SVG Pocket Primer

Author: Oswald Campesato
Publisher: Mercury Learning
ISBN: 978-1944534592
Audience: JavaScript Programmers
Rating: 3
Reviewer: David Conrad 

An SVG pocket book seems like a good way to keep track of all those commands.

SVG is a vector graphics format that works in all modern web browsers. It also has a life of its own as a graphics format in programs such as InkScape and Adobe Illustrator. In most cases you are better off creating SVG graphics using a stand alone program but even then you usually need to know something about SVG to customize and make use of them. 

The big problem with SVG is that there are a lot of different commands and possible ways of using the commands in combinations to create different graphics effects. This is the sort of topic a pocket book could help with.


This particular pocketbook is packed with lots and lots of examples and it comes with a disc bound into the back so that you can load and try them out. 

The first chapter is an introduction to SVG and it position in the HTML ecosystem. This then goes on to look at important ideas such as the coordinate system and simple drawing primitives. By the end of chapter one we have deal with line, rect, path, polygon, polyline and text. We have also looked at different ways of showing SVG graphics - view box, embed, object, img element using base64 encoding. This is a lot to get though and there are lots of quite long examples. The big problem is that you aren't given much guidance on why you might want to do things in a particular way. What is the best way to embed SVG for example in any particular situation?

Chapter 2 is on gradients and filters which are often considered to be advanced SVG. This is fairly much a catalog and demonstration of the sort of things you can achieve. You can find out almost as much by just using InkScape say. 

Chapter 3 is about SVG transforms and again we are presented more or less with a list of effects that can be achieved. What isn't covered is the way that a transform can be considered to be an active transformation of an object or just a passive change to the co-ordinate system. 

Chapter 4 moves on to examine curves and while there are a lot of examples showing how you can use the functions there is nothing that explains how a Bezier curve works. What would be better would be to give some idea how to control a Bezier curve to produce a shape. Once again this is probably something better done using a program such as InkScape. 




From this point the book moves off the topic of pure SVG and starts to examine associated technologies. Chapter 5 is on CSS3 and animation. While CSS3 has a lot to contribute to HTML graphics we really could have spent more time on SVG. Chapter 6 goes even further away from the basics and looks at the D3 graphics library which is based on SVG. The net two chapters are all about D3 - animation and mouse events and data visualization. Chapter 9 goes into mobile apps including off topic subjects such as Google's AMP.  

The book concludes with a chapter on miscellaneous topics. This include a look at some SVG programs and libraries. Finally we have an appendix on ReactJS and Angular 2 working with SVG.


If you are looking for a book that explains the concepts and practicalities of SVG in detail then this isn't for you. What it does contain is lots and lots of programs with short explanations. Big topics like how to organize SVG programs, how to use Bezier curves and transformation are just ignored. 

This doesn't mean the book is without value but it isn't a particularly good pocket book because it isn't easy to use to look something up unless you want a fairly big program example to study. 


To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.


Python All-in-One, 2nd Ed (For Dummies)

Authors: John Shovic and Alan Simpson
Publisher: For Dummies
Date: April 2021
Pages: 720
ISBN: 978-1119787600
Print: 1119787602
Kindle: B091DGDLK8
Audience: People wanting to learn Python
Rating: 2
Reviewer: Mike James
All-in-one refers to the fact that this is seven books put together - why?

Deep Learning with JavaScript

Authors: Shanqing Cai, Stan Bileschi and Eric Nielsen
Publisher: Manning
Date: February 2020
Pages: 560
ISBN: 978-1617296178
Print: 1617296171
Audience: JavaScript Programmers
Rating: 5
Reviewer: Mike James
JavaScript doesn't seen a natural for AI but...

More Reviews


Last Updated ( Saturday, 04 February 2017 )