Friday, 8 July 2011

A bug reporting public service announcement

Ever get this error message in Maestro?

Object Reference not set to an instance of an object

This message and its exception type of System.NullReferenceException generally means that I (or a library I'm using) screwed up somewhere in the code.

However, just generally telling me this happened does not help me or you one iota because I require additional information:

  1. A stack trace of this exception message (so I can trace down the offending location in the code)

  2. The steps you took to produce this error (so I can construct the possible sequence of events and data that leads up to the offending location in the code)

  3. The data you are working with (where applicable)

Without these pieces of information, it makes it very hard for me to fix the cause of such errors.

The error handling in Maestro 3.5 now uses a more flexible dialog to display such exception information. Exceptions are now displayed in a more flexible dialog.

The message and detail components can both be copy/pasted or you can save the entire error dump to a text file and upload that as part an attachment to your trac issue, allowing for better quality bug reports.

However, what I have just explained doesn't just cover Maestro or this specific error. This is good practice for reporting bugs and issues in any application you use. Bad bug reports will most likely stay ignored because there is not enough information to work on. Developers are not psychic people, we need as much information as possible!

Providing at least the information as I've pointed out is a good start for any bug report and ensures that the developer can provide a suitable fix or workaround for you particular issue.

Wednesday, 6 July 2011

Announcing: MapGuide Maestro 3.5 beta 1

I'm happy to announce the first beta release of MapGuide Maestro 3.5

The significant new features of this beta are some new resource editors for:
  • Simple and Compound Symbol Definitions
  • Watermark Definitions
These editors are really rough quality at the moment and I would like feedback on these editors to see how the usability can be improved. Especially the Symbol Definition stuff as that has existed in MapGuide since 2007, but until now has not had a specialized editor due to the complexity of the XML schema.

If you need a refresher on Symbol Definitions and Advanced Stylization, here's a good starting point.

Other new features and changes include
  • Fusion Editor has been updated to use Google Maps V3. No more API keys required
  • The generated Web Layout for any resource preview includes a new command to report the map extents.
  • A more flexible dialog for error messages
  • Layer Definition editor has been re-structured to use less vertical screen space.
  • The usual assortment of bugfixes
This beta can reside side-by-side with older versions.


Sunday, 3 July 2011

Book Review: OpenLayers 2.10 Beginner's Guide

This post is a review of the book: OpenLayers 2.10 Beginner's Guide

Many thanks to Packt Publishing for provding me a review copy of this book allowing me to write this review.

Relevance/Shelf Life

The problem with some technological books is that the technology advances at such a rapid pace that is renders the book's content out of date or obsolete after several months.

Fortunately, this is not the case with this book because the current release OpenLayers is still 2.10 and the OpenLayers APIs have been relatively stable that the content in this book is relevant enough for future releases of OpenLayers to come. In short, don't let the version number in the book title fool you, the book does have lasting relevance should you decide to revisit the content in this book in the future.


The problem with writing a beginner's guide is, what level of knowledge do you assume the reader to have (if any)? If we were to take the book title at face value, then it assumes the reader has:
  • At least heard of a thing called javascript
  • Has used a web browser other than Internet Explorer.
Fortunately the book's introductory chapter covers the fundamentals of JavaScript, and all other foundational web development concepts (AJAX, JSON, Object Oriented Programming, etc) that eases you into to meat of the book: using the OpenLayers library to make compelling web mapping applications.

It is my own personal opinion that if you are to teach a newbie about web application development, they have to know what Firebug is and how to use it to simplify and optimize their web development workflow. I have stated in the past that if it weren't for Firebug (Ok. Let's extrapolate: If it weren't for modern web browsers like Firefox and Chrome), I wouldn't be in the business of doing web development.

Fortunately the book devotes an entire chapter to the Firebug extension for Firefox, which I believe should be a mandatory chapter in any book that delves into Web application development. In this respect, this book passes my newbie web developer test with flying colors.

So then comes the meat of this book: Using the OpenLayers library itself. The content is structured in a logical fashion, starting with getting a basic map up and running and then spicing it up with many different types of layer objects that you can add to this map (a single chapter is devoted to detailing all the available layer types you can add to your map). The important concept of projections is also significantly covered.

Another important aspect of OpenLayers is using controls to improve presentation and to add interactivity to your maps, and this book throughly covers the different types of controls available and how to use CSS to customize the style and appearance of these controls.

One last important aspect of OpenLayers is Vector Layers and the book covers all the intricacies of creating, styling and presenting Vector layers. (A sample chapter from the book covers Vector Layers)

The Web 2.0 ecosystem is an open-ended one where many different libraries and web services can talk to each other. OpenLayers is no different and the book clearly demonstrates the "Open" part of OpenLayers by showcasing how to interface and interop with third party libraries and web services. The book covers creating mashups with Google, Microsoft and Yahoo mapping services, as well as consuming photos from Flickr.

All in all, the content of this book does target its intended audience and does take care to not overwhelm the reader with OpenLayers API specifics, because that is what API reference documentation is for.


This book lives up to the title. It is a comprehensive introduction to OpenLayers and web 2.0 application development. The chapter on Firebug alone is enough to guide new users to the proper path of web development, something I am thankful for, because I do get tired of giving the same "use firebug" response to mailing list questions over and over again!

Score: 8/10