[Governor09] Chapter 1. An Architect’s View of the Web

来源:百度文库 编辑:神马文学网 时间:2024/04/27 17:42:51

Chapter 1. An Architect’s View of the Web

“If you build it…they will come.”

—from Field of Dreams

“Quick, they’re coming. Buildsomething.”

—motto for new Internet startups

Understanding Web 2.0 design patterns and the architecturalprocesses behind them will give you an edge over your competition. Theabstraction and identification of artifacts, tools of the architect’strade, will help you to separate fact from hype.

1.1. Looking for Web 2.0

If you picked up this book looking for a simple definition of Web2.0, you’ll be disappointed. There is no single, commonly accepteddefinition, nor is there likely to ever be one. To understand why, youneed to study the evolution of the term and the philosophy of itscreator, Tim O’Reilly.[11]

[11] 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 thenrefer to him informally as “Tim” throughout the remainder of thatchapter. All references to “O’Reilly” refer to the corporateentity.

Why is it difficult to define Web 2.0? The Internet is changing sofast that by the time a definition was documented, it would be out ofdate. The Web is very dynamic and is built on a constant churn ofincremental updating at every level, from blog content and comments toinfrastructure.

Capturing a static or structural view of the Internet would nottell the whole story either. Web 2.0 is about more than how thetechnology works; it’s also about how the technology is used and itsreal-world effects. Consider the elation a user might feel upon being“favorited” on MySpace.com. How would you document that in a formalarchitecture? How can you quantify the emotions of humans as part of themachine?

Fact: No formal architecture or specification existsto explicitly define Web 2.0, nor is there ever likely to beone.

Use of the term “Web 2.0” has spiraled out of control as thousandsof technology companies have applied it to their products and servicesas 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 yourenterprise.

Companies may imply that they are selling you Web 2.0 by linkingthe term to specific technologies. Some of them remind us of circushucksters, standing high on a soapbox announcing their wares: “Want tobuy Web 2.0 stuff for your company? Don’t get left behind! Step rightup! No pushing; we’ve got plenty to go around!” (If you ever encounterthis 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 thehippest of the hip.

To understand why this is, it’s important to examine the roots ofthe term. Tim first coined the term back in 2003 when planning aconference.[12] The first public use of the term seems to have been at anO’Reilly conference in 2004, where it immediately resonated with theaudience.[13] “Web 2.0” became an overnight sensation, one of themost-hyped technology terms in the industry. Everyone from analysts tothe press seemed to jump on the bandwagon without worrying about astrict definition, or what the term might mean to others. Because everyperson who used the term probably had a slightly different opinion aboutwhat it meant, the chances of solidifying a formal definition slippedfurther away with every repetition, with those who were fresh to theterm inferring its meaning based largely upon where they heardit.

[12] See http://radar.oreilly.com/archives/2006/05/controversy_about_our_web_20_s.html.

[13] See http://en.wikipedia.org/wiki/Web_2.

In September 2005, Tim wrote a paper to further clarify Web2.0.[14] Rather than attempting to define the concept as a staticarchitecture or some other type of specification, he illustrated whatvarious examples of Web 2.0 meant by comparing them to similar examplesin previous websites, technologies, or models. Figure 1-1, a table from Tim’spaper, 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 recentevolution (bear in mind that much has changed since this chart wascreated).

[14] See http://www.oreilly.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html.

Figure 1-1. Tim’s list of Web 1.0 versus Web 2.0 examples


After presenting this list, Tim continued:

The list went on and on. But what was it that made us identifyone application or approach as “Web 1.0” and another as “Web 2.0”?(The question is particularly urgent because the Web 2.0 meme hasbecome so widespread that companies are now pasting it on as amarketing buzzword, with no real understanding of just what it means.The question is particularly difficult because many of thosebuzzword-addicted startups are definitely not Web 2.0, while some ofthe applications we identified as Web 2.0, like Napster andBitTorrent, are not even properly Web applications!) We began tryingto tease out the principles that are demonstrated in one way oranother by the success stories of Web 1.0 and by the most interestingof the new applications.”[15]

[15] From http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html.

If you look beyond the examples themselves, you can distill a setof core patterns and abstract models. These patterns are the best way toclarify what Web 2.0 is. The following section offers a brief summary ofthe Web 2.0 patterns (Chapter 7goes into much greater detail). To decouple the patterns from anyspecific implementations, we have abstracted them to a level in whichthey are no longer connected to any specific standards, protocols,products, businesses, or technologies.

1.1.1. Common Web 2.0 Architecture Patterns

Most of the Web 2.0 patterns we’ve identified can be abstractedon three levels, ranging from the most concrete (idiom) to the mostabstract (high-level design pattern). Consider the following threestatements:

  1. A company uses a PDF form to collect user input from one of its customers.

  2. An organization uses an electronic form to collect data from a person.

  3. 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 samereal-world example, yet the patterns become more abstract (and hencemore easily repurposed) toward the bottom of the list. In the firstpattern statement, the technology is constrained to PDF and the formusers are specified as customers. The second pattern statement allowsthe pattern to be implemented in other technologies besides PDF andallows human users other than customers of a company. The thirdpattern statement can be applicable to electronic artifacts beyondmere forms and accounts for both machine and human users, regardlessof whether they’re actual customers.

With that in mind, here’s a brief list of the Web 2.0 patternsin this book, sorted roughly from the most abstract to the mostconcrete:


Service-Oriented Architecture (SOA)

SOA (defined by the OASIS Reference Model forSOA[16]) is an architectural paradigm, a way ofarchitecting a framework for matching needs and capabilities. Akey feature of SOA is support for integrating services that areowned and managed independently. SOA is a core patternunderlying Web 2.0, and several other patterns (such as theMashup pattern and the Software as a Service pattern) rely onit. An application server offering a SOAP endpoint whereconsumers can invoke a service to get a stock quote is a classicexample of this pattern.

[16] See http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=soa-rm.


Software as a Service (SaaS)

SaaS delivers computational functionality to users without themhaving to persist the entire application or system on theircomputers. It applies SOA to the realm of software, shiftingaway from the older model of locally installed, self-containedsoftware. SaaS has evolved largely from the advent of web-awareapplications. The website at http://createpdf.adobe.com is a good example ofSoftware as a Service because you can use it to turn an HTMLdocument into a PDF document without having to install anysoftware on your local system. This example is also aspecialized type of SOA. The ultimate expression of this patterncould be virtualization, the core pattern behind cloudcomputing.


Participation-Collaboration

The Participation-Collaboration pattern focuses onself-organizing communities and social interactions among Web2.0 participants. It embraces reuse of content, fractionalupdates or contributions to collective works, the constant beta,trusting your users, and making the user a core part of thearchitecture and model for Web 2.0. Wikipedia is perhaps one ofthe most cited examples of this pattern, as many peoplecontribute to it. This is also known asharnessing collectiveintelligence.


Asynchronous Particle Update

This is the core pattern behind Asynchronous JavaScript and XML (AJAX), yet itcan also be implemented in other technologies. Rather thanforcing a complete object (page view) update, a smaller part ofthe whole can be updated asynchronously. This pattern hasseveral variations that could trigger such an update, includingtimeouts, user activity, changes in state, and presetparameters. These triggers can happen on a server or a client,or in some other locale, such as in cloud computing.


Mashup

The Mashup pattern relies on services (see SOA), aggregating contentor computational resources from multiple sources, and mixingthem together to create something new. Commonly, in theresulting view two or more applications appear to be workingtogether. An example of a mashup is a Google map with financialdata overlaid on it.


Rich User Experience (RUE)

Synonymous with a Rich Internet Application (RIA), a RUE is areplication of the complete, real-world interaction between twoentities, rather than some part of that interaction. The RUEpattern combines several aspects, including visual presentation,contextually relevant information, and applications that aremodeled to understand the complete scope of possibleinteractions between users and software. An offline examplemight be a conversation with an employee at a travel agency,wherein each party learns from and reacts to the other; incontrast, picking up a brochure from a travel agency to study onyour own does not constitute a RUE.


The Synchronized Web

In this pattern, multiple applications or users share thesame state or view of the same state. Online video gamerscommonly use this pattern (to be able to play games togetheronline), but it has evolved far beyond such applications. It isan essential pattern that supports multiple forms ofinteraction, including request/response, subscribe/push, probeand match, pull, and others.


Collaborative Tagging

Commonly referred to as folksonomy, aterm coined by Thomas Vander Wal, Collaborative Tagging refersto the ability of users to add “labels” (or tags) to linkresources with semantic symbols that themselves are grounded ina conceptual domain (ontology). Major top-down efforts to createa semantic web have failed to take hold, yet in the meantime,the rise of Collaborative Tagging has added a new aspect to thecreation of a common semantic layer for the Internet. Thewebsite at http://del.icio.us, where userscan apply labels to public bookmarks, is a prime example of theCollaborative Tagging pattern.


Declarative Living and Tag Gardening

In the real world, people make statements about just abouteverything. Declarative Living is the act of encoding thosedeclarations in syntax that a machine can process, and makingthem visible to other entities on the Web. Tag Gardening is theact of harvesting the declarations to learn about the users’collective state. This pattern is grounded in the CollaborativeTagging pattern. An example is Twitter, where users makedeclarations about their daily activities that others canaccess. Even social networks such as Facebook, where people simply “declare” existingsocial structures, are a specialized form of thispattern.


Semantic Web Grounding

The Semantic Web Grounding pattern assemblesinteractions that monitor the links between declarations (e.g.,“semantic tags”) and resources, as well as how users interactbased on those artifacts. It facilitates self-learning,self-healing software, as observing the patterns of interactionscan lead to inferences about the relevancy of semanticdeclarations. Google Search is probably the best-known example of thispattern, although many adaptive learning software systemsembrace it as well.


Persistent Rights Management

Persistent Rights Management is a pattern of users retaining their Create,Read, Update, Delete (CRUD) rights on every copy of a digital artifact. Asopposed 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 thispattern, but although DRM is similar, there are differences. DRMis a subset of Persistent Rights Management[17] addressing read access to digital files,[18] whereas Persistent Rights Management encompassesfiner-grained rights that owners might need to control,including printing, viewing, modifying, and more.[19] Adobe LiveCycle Rights Management Serverand Microsoft’s Rights Management Serverare both adopters of this pattern.

[17] See http://www.adobe.com/products/livecycle/rightsmanagement/.

[18] See http://en.wikipedia.org/wiki/Digital_rights_management.

[19] See http://xml.coverpages.org/MicrosoftRMS.html.


Structured Information

The advent of XML and the ability to apply customized taggingto specific elements has led to the rise of syntaxes commonlyreferred to as microformats. These are small formats with highlyspecialized abilities to mark up precise information withindocuments. The use of such formats, in conjunction with the riseof XHTML, lets Internet users address content at a much moregranular level than ordinary HTML. The XML Friends Network (XFN)format is a good example of this pattern.

Chapters Chapter 3 and Chapter 7 of this book illustrate how theseabstract patterns are distilled from examples. The patterns themselvescapture and express the inner workings of each example and can be usedto determine whether other websites embrace the same patterns. Toinfer the most knowledge from these patterns, it helps to understandthe role that patterns and architecture play in Web 2.0.

  • Create Bookmark (Key: b)Create Bookmark
  • Create Note or Tag (Key: t)Create Note or Tag
  • Download (Key: d)Download
  • Email This Page (Key: e)Email This Page
  • PrintPrint
  • Html View (Key: h)Html View
  • Zoom Out (Key: -)Zoom Out
  • Zoom In (Key: +)Zoom In
  • Toggle to Full Screen (Key: f)
  • Previous (Key: p)Previous
  • Next (Key: n)Next

Related Content

Application architect
From: WebSphere Studio 5.1.2 JavaServer Faces and Service Data Objects

Architecting Your Application
From: Sams Teach Yourself Adobe® AIR™ Programming in 24 Hours

For solution architects
From: Patterns: Model-Driven Development Using IBM Rational Software Architect

What an Enterprise Architect Needs to Do
From: WebSphere® Engineering: A Practical Guide for WebSphere Support Managers and Senior Consultants

Infrastructure Architect
From: Working with Microsoft® Visual Studio® 2005 Team System

Application Architect
From: Working with Microsoft® Visual Studio® 2005 Team System

The Architect Role
From: Working with Microsoft® Visual Studio® 2005 Team System

All companies are web companies
From: Managing.com