This summer, I’ve seen all kinds of programming approaches as I’ve bounced between the Web, XSLT, Erlang, and XML, with visits to many other environments. As I look through the cool new possibilities for interfaces, for scaling up and down, and for dealing with data, I keep seeing two basic patterns repeating: walking trees (of data or document structure), and handling events.
However, trees have become a rather natural default, and not just for objects, for good reason. They provide as clean a representation of an HTML (or XML, or JSON) document tree as can be found. While they are more complex than flat tables, they can provide more efficient representations of nested query data than the usual simple denormalization. If something “has many”, a tree lets you show that relationship directly rather than just creating repeating many. We’ve also become very good at identifying locations within trees (letting us skip the ‘walking’), decorating trees, and establishing links among different parts of trees.
These two broad practices seem to me to have replaced the need for many of the more specialized tools developers have used for the last five decades. They aren’t new: both models emerged almost as quickly as computers could support their needed level of abstraction. They seem, however, to grow more dominant every day. Learn them well, figure out how your environments handle them, and you’ll be able to manage many complex tasks with a minimal set of tools. There will often be room for further refinement, but you’ll have a solid base on which to build.Related