PrefacePreface
Once you understand the design patterns and have had an “Aha!” experience with them,
you won’t ever think about . . . design in the same way.1
The inspiration for writing this book came from my own “Aha!” moment. Initially I dismissed mashups as a hack best suited to consumer-focused sites that did things like combine craigslist and Google Maps2 or merge local event calendars. I couldn’t see how any public information on the Internet could benefit my employer. I laughed behind the backs of vendors who tried to demonstrate the promise of the technology based on examples that involved checking the weather or searching for a used car.
I had my epiphany when I was meeting with some frustrated business associates one afternoon. They were performing a series of tedious actions that seemed ripe for automation except for one problem: They had to repeatedly consult an outside vendor’s Web site at each step of the process. The Web site didn’t expose an application programming interface (API), so they mistakenly thought that some degree of human interaction was inevitable. After all, Web pages are just for people, right? It suddenly dawned on me that the mashup tools I had dismissed could get around this problem. I could automatically extract the data I needed from the site and write a small application to perform the rest of the process. In essence, I could create an API where none existed before. Once the “people requirement” was removed, the entire procedure was easily offloaded to a computer.
Traditional approaches to application reuse require that a systemor its constituent parts be designed for inclusion in new solutions. While an admirable goal, one limitation of this architecture is that it’s implemented “by developers, for developers.” Mashups explode this narrow view of reuse. Mashups can certainly leverage open systems, but they can also reach deep into applications where no API currently exists to grab data or automate processing. In addition, many mashup tools leverage the latest advances in user interface design to make the entire solution-building process accessible to the average user.
The goal of this book is to demonstrate situations where mashups can be used to solve what appear to be intractable problems outside the realm of traditional solutions. Once you have a breakthrough moment similar to mine, you’ll never look at application development the same way again. In learning about how mashups foster efficiencies and inspire creativity, you may discover a path that will lead your business toward profitable new areas.
There are many meanings of “pattern” in the world of software engineering. In the classic text Design Patterns, the authors include the following disclaimer:
Point of view affects one’s interpretation of what is and isn’t a pattern. One person’s pattern can be another person’s primitive building block.
In this book I am using a less rigorous interpretation of the term “pattern.” I hope this will not prevent readers from exploring the text on mere ideological grounds. My goal is not to provide an academic treatise on the subject, but rather to provide a cookbook of ideas that will help you unlock the hidden potential in the resources that surround you. Enterprise mashups present exciting new opportunities for organizations to mine wikis, blogs, and other document-centric Web content as first-class data. Firms can combine these resources with others inside the corporation, such as databases and Web Services, in a near-endless series of permutations.
Not all of the patterns presented here will fit perfectly within your company—but ideally they will trigger fresh ways of thinking that will lead you to build exciting new solutions.
Who Should Read This BookAn understanding of mashup technology can spark new ideas for addressing old or dismissed problems. This book caters to the broad community of skills and abilities found within the next generation enterprise.
Software DevelopersEach pattern is presented within a standard template that provides a technical summary (diagram, problem statement, and solution) of that pattern. This summary will resonate most with developers, who are often accustomed to dealing with abstractions as part of their normal course of work. Mashups can be a key tool for personnel in an organization’s Information Technology (IT) department to address the backlog of unmet or unfulfilled end-user requirements.
Content CreatorsContent creators should also familiarize themselves with the examples provided for each pattern, as these sections will provide insight into how their information is being consumed. In the era of mashups, anything placed on the Web is fair game not only for people, but also for software agents, automated bots, Web scrapers, and crawlers.
Business Users and Executive ManagementMashups are sometimes viewed as part of an egalitarian new world where information is freely shared. While that may be the case, they can also be used to flat-out make money. The examples given for each pattern provide the layperson with details about how mashups help a business be more productive and competitive.
The discussion of security in Chapter 10 is applicable to everyone. The rampant adoption of any technology without appropriate controls for managing its use is a recipe for failure. Almost every day a new headline cries out about how an employee accidentally mishandled or abused data. This behavior can lead to loss of trust or outright litigation between a company and its customers. Unless we want mashups to become the latest high-profile failure, we must work to supervise them correctly.
The organization of this book is designed to encourage browsing and self-discovery. I encourage you to skip around and explore the numerous feats of which mashups are capable. There is no “right way” to use them. When you apply a mashup to solve a particularly thorny problem, you’ve succeeded!
How Patterns Are PresentedEach pattern is presented by means of a standard template:
- Name. The name is the most succinct summary of what the pattern actually does. Once a pattern enters common usage, it’s typically referenced in conversation only by its name.
- Icon. To facilitate use of the patterns in architectural diagrams, each one has been assigned a specific icon.
- Diagram. The diagram provides a visual representation of how the pattern is constructed. The diagrams are especially useful to demonstrate how multiple patterns interact (e.g., API Enabler and Competitive Analysis).
- Core Activities. Every mashup is associated with a set of highly generic capabilities (data extraction, transformation, and so on). Not all mashup products necessarily implement all of these features. Rather than redundantly list each requirement with each pattern, they have been abstracted into a set of core activities. When you attempt to use a pattern, you should verify that your selected toolset supports the functionality of the requisite core activities.
- Problem. This section explains the difficulty or opportunity that the pattern seeks to address; it offers a short summary that explains the value proposition of the pattern.
- Solution. This part addresses the problem identified earlier to show how mashups can be used to create a solution. Success in implementing a solution may depend on the toolset you are using, the sites participating in the mashup, and the pattern’s fragility rating.
- Related Patterns. The context in which a pattern is applied can have a major impact on its description. This section references the use of similar mashup features in other patterns. If the pattern described is a composite of other patterns with new functionality, the leveraged patterns are listed here as well.
- Fragility. Mashups may contain elements of instability based on the resources they leverage. The degree of this fragility varies with each implementation. In essence, mashups allow some fragility for the benefit of agility. This section assigns a general risk rating to a particular pattern and provides a brief explanation of how it was derived.
- Examples. These short vignettes illustrate uses of the particular pattern in an enterprise context.
About the Pattern ExamplesThe most persuasive component of a pattern’s detail is an example. To drive home the benefits regardless of the reader’s background, this book typically presents more than one example of each pattern’s use that spans different industries. It’s my hope that as you peruse these examples some will resonate as potential opportunities within your organization. In addition, these sections should serve to expand your knowledge regarding the flexibility and capabilities of enterprise mashups.
In a divergence from some patterns books, Mashup Patterns does not supplement the formal definitions with sample code. At this early stage of evolution, no standard libraries or toolkits have been developed for mashups, and the capabilities of off-the-shelf products vary greatly. In place of code, examples are provided based on Web sites, applications, and other resources. Where an example relies on interactions with external data sources and third-party applications (e.g., API Enabler, Field Agent, Competitive Analysis, Usability Enhancer), sample products were constructed from scratch. Any resemblance to actual software or Web sites is purely coincidental.
The case studies presented in the book’s appendix illustrate how leading organizations have used specific products to implement the patterns described in the text. This material should neither be interpreted as an endorsement of any particular product nor used as a substitute for conducting your own due-diligence analysis. Rather, the case studies are intended to underscore the practical nature of the technology and to encourage you to explore mashups further.
Mashups aren’t just about Web sites, of course. Because the Internet is probably the richest source of raw material for their construction, however, I inevitably used it as a primary ingredient in many of the examples. Please excuse these momentary demonstrations of bias while I try and drive a larger point home. Don’t forget that many mashup products support sources ranging from Web Services, XML feeds, and databases to email and binary formats (e.g., Excel and PDF).
What You Will Gain from Reading This Book The information contained in this book will help you unleash the potential of enterprise mashups within your firm. The following topics are covered:
- An overview of Web 2.0 and Enterprise 2.0 and an exploration of how mashups fit into this framework
- Familiarity with the technology that makes mashups work
- Perspectives on how mashups coexist with other IT tools and initiatives
- A collection of patterns and practical examples that both explain and demonstrate the benefits of mashups in an enterprise context
Other ResourcesThis book has a companion Web site, http://mashuppatterns.com, where you can learn about new mashup patterns and contribute your own ideas and comments. You may contact the author at mike@mashuppatterns.com. The site also contains corrections to any errata discovered in this text. Please stop by and share your experiences with enterprise mashups!
1Gamma, Erich, Richard Helm, Ralph Johnson, and John M. Vlissides. Design Patterns. Addison-Wesley Professional, 1994.
2http://Housingmap.com, created by Paul Rademacher, combined the craigslist.com and Google Maps Web sites in what is considered the Web’s first mashup.
© Copyright Pearson Education. All rights reserved.