“If you build it…they will come.”
“Quick, they’re coming. Build something.”
Understanding Web 2.0 design patterns and the architectural processes behind them will give you an edge over your competition. The abstraction and identification of artifacts, tools of the architect’s trade, will help you to separate fact from hype.
If you picked up this book looking for a simple definition of Web 2.0, you’ll be disappointed. There is no single, commonly accepted definition, nor is there likely to ever be one. To understand why, you need to study the evolution of the term and the philosophy of its creator, Tim O’Reilly.
Why is it difficult to define Web 2.0? The Internet is changing so fast that by the time a definition was documented, it would be out of date. The Web is very dynamic and is built on a constant churn of incremental updating at every level, from blog content and comments to infrastructure.
Capturing a static or structural view of the Internet would not tell the whole story either. Web 2.0 is about more than how the technology works; it’s also about how the technology is used and its real-world effects. Consider the elation a user might feel upon being “favorited” on MySpace.com. How would you document that in a formal architecture? How can you quantify the emotions of humans as part of the machine?
|Fact: No formal architecture or specification exists to explicitly define Web 2.0, nor is there ever likely to be one.|
Use of the term “Web 2.0” has spiraled out of control as thousands of technology companies have applied it to their products and services as proof of their being on the cutting edge. These companies have not, however, bottled some magic solution.
|Fact: You cannot buy Web 2.0 for your enterprise.|
Companies may imply that they are selling you Web 2.0 by linking the term to specific technologies. Some of them remind us of circus hucksters, standing high on a soapbox announcing their wares: “Want to buy Web 2.0 stuff for your company? Don’t get left behind! Step right up! No pushing; we’ve got plenty to go around!” (If you ever encounter this sort of behavior, please run as fast and as far as you can.) Sadly, Web 2.0 is not something you can buy or install to suddenly become the hippest of the hip.
To understand why this is, it’s important to examine the roots of the term. Tim first coined the term back in 2003 when planning a conference. The first public use of the term seems to have been at an O’Reilly conference in 2004, where it immediately resonated with the audience. “Web 2.0” became an overnight sensation, one of the most-hyped technology terms in the industry. Everyone from analysts to the press seemed to jump on the bandwagon without worrying about a strict definition, or what the term might mean to others. Because every person who used the term probably had a slightly different opinion about what it meant, the chances of solidifying a formal definition slipped further away with every repetition, with those who were fresh to the term inferring its meaning based largely upon where they heard it.
In September 2005, Tim wrote a paper to further clarify Web 2.0. Rather than attempting to define the concept as a static architecture or some other type of specification, he illustrated what various examples of Web 2.0 meant by comparing them to similar examples in previous websites, technologies, or models. Figure 1-1, a table from Tim’s paper, has become perhaps the most widely used explanation of Web 2.0. The table compares what the old Web had to offer to the more recent evolution (bear in mind that much has changed since this chart was created).
The list went on and on. But what was it that made us identify one application or approach as “Web 1.0” and another as “Web 2.0”? (The question is particularly urgent because the Web 2.0 meme has become so widespread that companies are now pasting it on as a marketing buzzword, with no real understanding of just what it means. The question is particularly difficult because many of those buzzword-addicted startups are definitely not Web 2.0, while some of the applications we identified as Web 2.0, like Napster and BitTorrent, are not even properly Web applications!) We began trying to tease out the principles that are demonstrated in one way or another by the success stories of Web 1.0 and by the most interesting of the new applications.”
If you look beyond the examples themselves, you can distill a set of core patterns and abstract models. These patterns are the best way to clarify what Web 2.0 is. The following section offers a brief summary of the Web 2.0 patterns (Chapter 7 goes into much greater detail). To decouple the patterns from any specific implementations, we have abstracted them to a level in which they are no longer connected to any specific standards, protocols, products, businesses, or technologies.
Most of the Web 2.0 patterns we’ve identified can be abstracted on three levels, ranging from the most concrete (idiom) to the most abstract (high-level design pattern). Consider the following three statements:
A company uses a PDF form to collect user input from one of its customers.
An organization uses an electronic form to collect data from a person.
An entity uses an electronically encoded artifact to convey data between other entities and itself.
Each statement is true and accurate with respect to the same real-world example, yet the patterns become more abstract (and hence more easily repurposed) toward the bottom of the list. In the first pattern statement, the technology is constrained to PDF and the form users are specified as customers. The second pattern statement allows the pattern to be implemented in other technologies besides PDF and allows human users other than customers of a company. The third pattern statement can be applicable to electronic artifacts beyond mere forms and accounts for both machine and human users, regardless of whether they’re actual customers.
With that in mind, here’s a brief list of the Web 2.0 patterns in this book, sorted roughly from the most abstract to the most concrete:
SOA (defined by the OASIS Reference Model for SOA) is an architectural paradigm, a way of architecting a framework for matching needs and capabilities. A key feature of SOA is support for integrating services that are owned and managed independently. SOA is a core pattern underlying Web 2.0, and several other patterns (such as the Mashup pattern and the Software as a Service pattern) rely on it. An application server offering a SOAP endpoint where consumers can invoke a service to get a stock quote is a classic example of this pattern.
SaaS delivers computational functionality to users without them having to persist the entire application or system on their computers. It applies SOA to the realm of software, shifting away from the older model of locally installed, self-contained software. SaaS has evolved largely from the advent of web-aware applications. The website at http://createpdf.adobe.com is a good example of Software as a Service because you can use it to turn an HTML document into a PDF document without having to install any software on your local system. This example is also a specialized type of SOA. The ultimate expression of this pattern could be virtualization, the core pattern behind cloud computing.
The Participation-Collaboration pattern focuses on self-organizing communities and social interactions among Web 2.0 participants. It embraces reuse of content, fractional updates or contributions to collective works, the constant beta, trusting your users, and making the user a core part of the architecture and model for Web 2.0. Wikipedia is perhaps one of the most cited examples of this pattern, as many people contribute to it. This is also known as harnessing collective intelligence.
The Mashup pattern relies on services (see SOA), aggregating content or computational resources from multiple sources, and mixing them together to create something new. Commonly, in the resulting view two or more applications appear to be working together. An example of a mashup is a Google map with financial data overlaid on it.
Synonymous with a Rich Internet Application (RIA), a RUE is a replication of the complete, real-world interaction between two entities, rather than some part of that interaction. The RUE pattern combines several aspects, including visual presentation, contextually relevant information, and applications that are modeled to understand the complete scope of possible interactions between users and software. An offline example might be a conversation with an employee at a travel agency, wherein each party learns from and reacts to the other; in contrast, picking up a brochure from a travel agency to study on your own does not constitute a RUE.
In this pattern, multiple applications or users share the same state or view of the same state. Online video gamers commonly use this pattern (to be able to play games together online), but it has evolved far beyond such applications. It is an essential pattern that supports multiple forms of interaction, including request/response, subscribe/push, probe and match, pull, and others.
Commonly referred to as folksonomy, a term coined by Thomas Vander Wal, Collaborative Tagging refers to the ability of users to add “labels” (or tags) to link resources with semantic symbols that themselves are grounded in a conceptual domain (ontology). Major top-down efforts to create a semantic web have failed to take hold, yet in the meantime, the rise of Collaborative Tagging has added a new aspect to the creation of a common semantic layer for the Internet. The website at http://del.icio.us, where users can apply labels to public bookmarks, is a prime example of the Collaborative Tagging pattern.
In the real world, people make statements about just about everything. Declarative Living is the act of encoding those declarations in syntax that a machine can process, and making them visible to other entities on the Web. Tag Gardening is the act of harvesting the declarations to learn about the users’ collective state. This pattern is grounded in the Collaborative Tagging pattern. An example is Twitter, where users make declarations about their daily activities that others can access. Even social networks such as Facebook, where people simply “declare” existing social structures, are a specialized form of this pattern.
The Semantic Web Grounding pattern assembles interactions that monitor the links between declarations (e.g., “semantic tags”) and resources, as well as how users interact based on those artifacts. It facilitates self-learning, self-healing software, as observing the patterns of interactions can lead to inferences about the relevancy of semantic declarations. Google Search is probably the best-known example of this pattern, although many adaptive learning software systems embrace it as well.
Persistent Rights Management is a pattern of users retaining their Create, Read, Update, Delete (CRUD) rights on every copy of a digital artifact. As opposed to simply securing the location of the original copy, this pattern bestows author rights on all copies of a work. People sometimes confuse Digital Rights Management (DRM) with this pattern, but although DRM is similar, there are differences. DRM is a subset of Persistent Rights Management addressing read access to digital files, whereas Persistent Rights Management encompasses finer-grained rights that owners might need to control, including printing, viewing, modifying, and more. Adobe LiveCycle Rights Management Server and Microsoft’s Rights Management Server are both adopters of this pattern.
The advent of XML and the ability to apply customized tagging to specific elements has led to the rise of syntaxes commonly referred to as microformats. These are small formats with highly specialized abilities to mark up precise information within documents. The use of such formats, in conjunction with the rise of XHTML, lets Internet users address content at a much more granular level than ordinary HTML. The XML Friends Network (XFN) format is a good example of this pattern.
Chapters 3 and 7 of this book illustrate how these abstract patterns are distilled from examples. The patterns themselves capture and express the inner workings of each example and can be used to determine whether other websites embrace the same patterns. To infer the most knowledge from these patterns, it helps to understand the role that patterns and architecture play in Web 2.0.
 To disambiguate references to Tim O’Reilly and O’Reilly Media, we’ll use Tim’s full name at first mention in each chapter and then refer to him informally as “Tim” throughout the remainder of that chapter. All references to “O’Reilly” refer to the corporate entity.