Design By Overlay

Software design methods usually are formed and mature in one kind of software products, then get spread into other industries. Mozilla could be one of such pioneer product, having many successful methods that can be lent to other areas of software productions. Especially to the embedded development.

Design by Overlay” may have not been a formal or popular term for a series of design methods yet. But it may and should become one someday. I copy and paste below how I put it in an book review.

Design by Overlay

5.0 out of 5 stars, August 11, 2010
By minghua (New Reviewer Rank: 3,715,732 on Sept 27 2011)
This review is from: Rapid Application Development with Mozilla (Paperback)

Mozilla is successful in real world. As well as its design. Many tough design decisions, on a very complicated application platform software. This book reveals some of the important ones.

This book is a must have for any serious Mozilla developers or any serious software developers who is interested in the underlying technology. Be aware of that this is not a tutorial book for novice developers to get step by step help. There have been a few successful software platforms, Mozilla is a very distinct one among those. A serious software developer should spend time studying what makes the success. I’ve browsed through this book in bookshops a few times many many years ago. Downloaded the free version many years ago. Borrowed one from a public library last year. Finally bought my own so I can reference back whenever I need it.

The topics are organized around a Not-Perfectly-Accurate (NPA) diagram. The term NPA is a bit misleading. It’d be better named something like the Technology Architecture Diagram. The diagram reveals how various technologies are linked together to form the platform and the application software. It hints the architecture design started with technology considerations. The technologies used and the relationship among them played a vital role in the top level design. A sharp contrast to today’s popular software architecture approaches where the customer-facing features are of top importance and the whole software is designed around the feature requirements. The success of Mozilla tells that the underlying technology architecture decisions at early days affect how the application based on the platform will become flexible in long run, how it will adapt to consistently changing requirements.

At the very bottom of the technology stack is the Mozilla components, and the access to components through ContractID/XPConnect/XPCOM. Plug-ins are hooked up here. Javascript language bindings are also linked up here. On top of this infrastructural foundation, there comes the most fundamental concept in modern software structure, consciously designed or accidentally evolved into, the overlay. The overlay is the composition of a software at its very top level. The overlay technology employed by a software will significantly affect its easiness in developing, debugging, sustaining phases of a software life time. Mozilla made it very clear that any application developed on top of its platform will be an overlaid piece for a specific feature set. To show how important this concept is, the later chapters always start with an partially highlighted NPR, emphasizing that the topic of the chapter is overlaid to the highlighted parts of the NPR. When it comes to the XUL programming it is even more obvious that the top level description file starts with “overlay” as a keyword. Though the book does not say it explicitly, it makes it clear that the software design is not a single process, not a single pattern, not a single architecture. No matter you are designing the top level architecture or a small component inside a big system. It’s an overlay always! Simple truth but it took me many years to realize. Starting from that point I’ve seen a few popular platforms having this overlay design in their core. I believe this design philosophy plays a key role in making a software application stable from the beginning and maintainable for a long run. Software are complicated. Overlay makes them manageable.

Usually people think software design and development as using a single method or approach. When structured design was in fashion, every software was designed in structured ways. When concurrent design became popular, a software is always partitioned into concurrent tasks, important features will find their task-representations in the system. When there came the event driven, every piece of code becomes headless event-driven callbacks. Interestingly this book reveals that the event model needs to accommodate several different types of events according to their sources. Actually for every event source the handling requirements and techniques are so different that each of them effectively forms an individual event model and system. And the overall general event model, is an overlay of that several models and systems. Yes, another overlay again in event handling paths. When exposed to the web developers (who handle mostly the http/html content) the central event handling workhorse is the two-phase capturing-bubbling model on DOM. For the plug-in developers (or the rapid application developers as the book title intended to suggest) the focus will be very different when you want to handle a keyboard/mouse event, or when you want to handle content stream event, or a timer event. Usually event-driven design books give us an illusion that one event model shall fit all. This book says that was only a myth.

With this overlay theme, the book goes into details of each important technology, each programming area, each composite blocks in the NPA diagram. By which the book overlays every parts one by one onto the whole picture of a Mozilla application. As many earlier insightful reviewers have mentioned many aspects of this book, I’m not going to iterate over the many new technologies this book describes in very deep depth. To that, I can only say this book is very informative.

A well-written software design book, by an insightful and knowledgeable author in the topic area.

Creative Commons License
This work by is licensed under a Creative Commons Attribution 3.0 Unported License.
This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
Published on on Sep 27, 2011 @ 5:53 GMT

About minghuasweblog

a long time coder
This entry was posted in All, Methods and tagged , , . Bookmark the permalink.

2 Responses to Design By Overlay

  1. Pingback: AOSD Glossary and Principles | minghuasweblog

  2. Pingback: Software Observability, Structure, and Automation – Why and How | minghuasweblog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s