Ajax Design Patterns

Embed Size (px)

Citation preview

  • 8/7/2019 Ajax Design Patterns

    1/50

    Applying Web 2.0:Applying Web 2.0:

    Early Notes from the FieldEarly Notes from the FieldDion HinchcliffeDion Hinchcliffe

    Web 2.0 Journal, EditorWeb 2.0 Journal, Editor --inin --ChiefChief

    http://web2journal.comhttp://web2journal.comAjaxWorld Magazine, EditorAjaxWorld Magazine, Editor --inin --ChiefChief

    http://ajaxworldmagazine.comhttp://ajaxworldmagazine.comZDNetZDNet s Enterprise Web 2.0s Enterprise Web 2.0

    http://blogs.zdnet.com/Hinchcliffehttp://blogs.zdnet.com/Hinchcliffe

    HinchcliffeHinchcliffe & Company& Companyhttp://hinchcliffeandco.comhttp://hinchcliffeandco.commailto:[email protected]:[email protected]

    http://web2journal.com/http://web2journal.com/http://ajaxworldmagazine.com/http://ajaxworldmagazine.com/http://blogs.zdnet.com/Hinchcliffehttp://blogs.zdnet.com/Hinchcliffehttp://hinchcliffeandco.com/http://hinchcliffeandco.com/mailto:[email protected]:[email protected]:[email protected]://hinchcliffeandco.com/http://blogs.zdnet.com/Hinchcliffehttp://ajaxworldmagazine.com/http://web2journal.com/
  • 8/7/2019 Ajax Design Patterns

    2/50

    First, some basics onFirst, some basics onWeb 2.0Web 2.0

  • 8/7/2019 Ajax Design Patterns

    3/50

    Backgrounder on Web 2.0Backgrounder on Web 2.0

    A term that signifies a set of clearly apparentA term that signifies a set of clearly apparentnew trends in the way that the Web is beingnew trends in the way that the Web is beingusedused

    Not really a technology; a widespreadNot really a technology; a widespreadchange in the behavior and scale of the Webchange in the behavior and scale of the Weband its audienceand its audienceSometimes known as the Read/Write WebSometimes known as the Read/Write WebThe core principle often cited isThe core principle often cited is harnessing harnessing collective intelligence ( collective intelligence ( Source Source : Tim O : Tim O Reilly)Reilly)

  • 8/7/2019 Ajax Design Patterns

    4/50

    45 million global users

    250,000 sites 80,000,000 sites

    publishedcontent

    user generated content

    1 billion+ global users

    publishedcontent user

    generated content

    the mostly read-only Web the wildly read-write Web

    collective intelligence

  • 8/7/2019 Ajax Design Patterns

    5/50

    Examples of Web 2.0Examples of Web 2.0Turning individual Web pages into entire softwareTurning individual Web pages into entire softwareapplications (aka AJAX)applications (aka AJAX)

    Writely.com Writely.com Gmail Gmail Basecamp Basecamp

    Web sites made of content created entirely by theirWeb sites made of content created entirely by theirusersusers

    MySpaceMySpaceYouTubeYouTubeDiggDigg

    eBayeBay

  • 8/7/2019 Ajax Design Patterns

    6/50

    More ExamplesMore ExamplesPeoplePeople remixingremixing the Web from the vastthe Web from the vastpool of content and servicespool of content and services

    HousingMaps.com HousingMaps.com ChicagoCrime ChicagoCrime

    ProgrammableWeb ProgrammableWeb s s hundreds hundreds of of mashups mashups Massive influx of user generated content Massive influx of user generated content

    YouTube YouTube (65,000 new videos a day)(65,000 new videos a day)Source: Source: YouTube YouTube Fact Sheet Fact Sheet

    Blogosphere Blogosphere (900,000 new posts per day)(900,000 new posts per day)Source: Source: Technorati Technorati

  • 8/7/2019 Ajax Design Patterns

    7/50

    A view ofA view of Harnessing Collective Harnessing Collective

    Intelligence Intelligence

    Key PropertiesKey PropertiesEmergentEmergent

    DiscoverableDiscoverableOpenOpenSharedShared

    User GeneratedUser Generated

  • 8/7/2019 Ajax Design Patterns

    8/50

    First Web 2.0First Web 2.0 CompactCompact DefinitionDefinition

    Web 2.0 is the network as platform, spanning allWeb 2.0 is the network as platform, spanning allconnected devices; Web 2.0 applications areconnected devices; Web 2.0 applications arethose that make the most of the intrinsicthose that make the most of the intrinsicadvantages of that platform: delivering softwareadvantages of that platform: delivering softwareas a continuallyas a continually --updated service that gets betterupdated service that gets better

    the more people use it, consuming and remixingthe more people use it, consuming and remixingdata from multiple sources, including individualdata from multiple sources, including individualusers, while providing their own data andusers, while providing their own data andservices in a form that allows remixing by others,services in a form that allows remixing by others,creating network effects through an "architecturecreating network effects through an "architectureof participation," and going beyond the pageof participation," and going beyond the pagemetaphor of Web 1.0 to deliver rich usermetaphor of Web 1.0 to deliver rich user

    experiences.experiences. Tim OTim O ReillyReilly

  • 8/7/2019 Ajax Design Patterns

    9/50

    Newest Compact DefinitionNewest Compact Definition

    of Web 2.0of Web 2.0

    Networked applications thatNetworked applications that

    explicitly leverage networkexplicitly leverage networkeffects.effects. Tim O Tim O Reilly Reilly

  • 8/7/2019 Ajax Design Patterns

    10/50

    What is a Network Effect?What is a Network Effect?

    AA network effect network effect occurs when a good oroccurs when a good or

    service has more value the more that otherservice has more value the more that otherpeople have it too.people have it too. -- WikipediaWikipediaPhonesPhones

    MailMailEE--mailmailInstant MessagingInstant MessagingWeb pagesWeb pagesBlogsBlogsAnything that has an open network structureAnything that has an open network structure

  • 8/7/2019 Ajax Design Patterns

    11/50

    Triggering Exponential ResultsTriggering Exponential Results

  • 8/7/2019 Ajax Design Patterns

    12/50

    Network Effects + ExplicitlyNetwork Effects + Explicitly

    Enabling Collective IntelligenceEnabling Collective Intelligence

    User ContributionsText, images, audio,video, news, etc.

    Database of IntentionsSearches, clicks, tagging,recommending, etc.

    Data SharingPrior similar uses,accumulated experience

    Collective Intelligence

    share

    audience

    growth

    exponential network effects

    viral feedback

    loops

    consume

    Moving to the Center of Software Design

    e-mail invites

    content

  • 8/7/2019 Ajax Design Patterns

    13/50

    Seven Major Tenets of Web 2.0Seven Major Tenets of Web 2.0The Web As PlatformThe Web As Platform

    The Web is becoming the place we keep our data andThe Web is becoming the place we keep our data andour software and conduct our work and personal livesour software and conduct our work and personal lives

    Harnessing Collective IntelligenceHarnessing Collective IntelligenceSites that improve and get richer the more that peopleSites that improve and get richer the more that people

    use them (use them ( WikipediaWikipedia ,, BitTorrentBitTorrent ,, MySpaceMySpace ))Information asInformation as thethe Core Capability, Not SoftwareCore Capability, Not Software

    Google Maps,Google Maps, SourceForgeSourceForge ,, BlogosphereBlogosphere

    End of Discrete Software ReleasesEnd of Discrete Software ReleasesContinuous improvement becomes the normContinuous improvement becomes the normNo installs, upgrades, or patchesNo installs, upgrades, or patches

    contcont d...d...

  • 8/7/2019 Ajax Design Patterns

    14/50

    Tenets of Web 2.0 ContinuedTenets of Web 2.0 ContinuedNew Lightweight Development Models for EveryoneNew Lightweight Development Models for Everyone

    The Web browser as the place where our software runsThe Web browser as the place where our software runs

    User Generated Software (User Generated Software ( blogsblogs , editable Web pages,, editable Web pages, mashupsmashups ,,use of widgets and badges)use of widgets and badges)Content that selfContent that self --replicates and is syndicated (RSS), reusedreplicates and is syndicated (RSS), reusedSupports innovation in assembly, similar to the mass productionSupports innovation in assembly, similar to the mass production ofof

    component PCs in the 80s and 90scomponent PCs in the 80s and 90sBut almost anyone can do it andBut almost anyone can do it and are are doing it in great numbersdoing it in great numbersFundamentally Federated Software SystemsFundamentally Federated Software Systems

    Examples:Examples: iTunesiTunes ,, blogosphereblogosphere

    Rich User ExperiencesRich User ExperiencesAjax, Flash, Flex, LaszloAjax, Flash, Flex, LaszloResults in software as good as can be found on the desktopResults in software as good as can be found on the desktop

    computer with few exceptionscomputer with few exceptionsYour software and data, available via hyperlink anywhereYour software and data, available via hyperlink anywhere

  • 8/7/2019 Ajax Design Patterns

    15/50

    Core Competencies of Web 2.0Core Competencies of Web 2.0

    Online services, not packaged software, withOnline services, not packaged software, withcostcost --effective scalabilityeffective scalabilityMaintaining control over unique, hardMaintaining control over unique, hard --toto--recreate information that gets richer the morerecreate information that gets richer the morethat people use itthat people use itTrusting users as coTrusting users as co --developersdevelopersHarnessing collective intelligenceHarnessing collective intelligenceLeveraging The Long TailLeveraging The Long TailLightweight user interfaces, developmentLightweight user interfaces, developmentmodels, and business modelsmodels, and business models

    Business Models:Business Models: Customer SelfCustomer Self --Service, The LongService, The Long

    Tail, Turning Applications into Platforms, EncouragingTail, Turning Applications into Platforms, EncouragingUnintended UsesUnintended Uses

  • 8/7/2019 Ajax Design Patterns

    16/50

    A View of Web 2.0 ArchitectureA View of Web 2.0 Architecture

    InformationCloud

    Web 2.0 Site A Ajax Client

    Web 2.0 Site B HTML Client

    Web 2.0 Site C Flash Client

    Mashup D Ajax Client

    Mashup E Flash Client

    Site AsWeb Services

    Site BsWeb Server

    Site CsWeb Services

    The truthiness barrier:Uncertain ownership and

    data provenance past this point

    Onlne Software ClientsPeople Direct WebServers& Services

    Data

    Database

    P u b l i c E d g e

    o f t h e E n t e r p r i s e

    Database

    DatabaseWeb

    Service

    WebService

    WebService

    Commerciallyand User

    GeneratedContent Both

    p a r t i c

    i p a t i o

    n

    mutual sense ofcommunity

    p a r t i c i p

    a t i o

    n

    REST

    SOAP

    JSON

    HTTP

    HTTP

    identity

    People in the Machine Nurture the Cloud

  • 8/7/2019 Ajax Design Patterns

    17/50

    More Complete View of Forces andMore Complete View of Forces and

    Elements of Web 2.0Elements of Web 2.0

    d a t a

  • 8/7/2019 Ajax Design Patterns

    18/50

    Web 2.0 and CollaborationWeb 2.0 and Collaboration

    Enormous online communities haveEnormous online communities have

    formed recently that are sharing contentformed recently that are sharing contentand information effectively and informallyand information effectively and informally

    MySpaceMySpace ,, YouTubeYouTube ,, blogosphereblogosphere ,, del.icio.usdel.icio.us ,,BitTorrentBitTorrent , and many others, and many othersThe proximate cause appears to be:The proximate cause appears to be:

    Radical simplicity in usage (extremely clearRadical simplicity in usage (extremely clearinteraction models, no training required)interaction models, no training required)Exploitation of network effectsExploitation of network effects

  • 8/7/2019 Ajax Design Patterns

    19/50

    The conceptual model ofThe conceptual model of

    Web 2.0Web 2.0 --style collaborationstyle collaboration

    A j a x

    F l e x

    F l a s h

    L a s z l o

    H T M L

    N a t i v e

    user contributions

    CollectiveIntelligence

    c o n t e n t c o n s

    u m p t i o n

    c o n t e n t c o n s u m

    p t i o n

    c o n t e n t

    c o n s

    u m p t i

    o nc o n t e n t c o n s u m p t i o n

    h u m

    a n / m a c h i n e i n t e r f a c e

    h u m a n

    / m a c

    h i n e i n t e

    r f a c

    e

    Webservices

    People

    WalledGardens

    Hard to RecreateData Sources

    (Wikipedia, Google Search Index, MySpace Content)

    User Generated ContentCountless Blogs and Wikis

  • 8/7/2019 Ajax Design Patterns

    20/50

    Who is doing this?Who is doing this?

    Not justNot just edge casesedge cases , early adopters, or, early adopters, ortechnophiles.technophiles.Rapid global adoptionRapid global adoption

    Between one and twoBetween one and two hundred million hundred million people worldpeople world --widewide

    BlogosphereBlogosphere continues to double in size everycontinues to double in size everysix monthssix months

    Over 60 times larger than it was 3 years agoOver 60 times larger than it was 3 years agoMySpaceMySpace consists of nearly 100 million usersconsists of nearly 100 million userssharing content, information, and forming ad hocsharing content, information, and forming ad hoc

    communitiescommunities

  • 8/7/2019 Ajax Design Patterns

    21/50

    LatestLatest TechnoratiTechnorati Figures onFigures on BlogsBlogs

  • 8/7/2019 Ajax Design Patterns

    22/50

    Why exactly is it happening now?Why exactly is it happening now?

    Maturation ofMaturation oftechniques thattechniques thatleverage how peopleleverage how peoplework bestwork bestRealization of theRealization of thepower of emergentpower of emergentsolutions over presolutions over pre --defined solutionsdefined solutionsNearly zeroNearly zero --barriersbarriersto useto use

    And more...And more...

    f o r m a l s t r u c t u r e

    t r a i n i n g r e q u i r e d

    s o f t w a r e i n s t a l l a t i o

    n

    c o m p l e x i t y

    e x p e r t s t o m a k e c h a

    n g e s

    p r e d e t e r m i n e d u s e s

    o n y

    n o n - s o c i a l

    m o r e

    i m p e

    d a n c e

    l e s s

    i m p e

    d a n c e

  • 8/7/2019 Ajax Design Patterns

    23/50

    Will this happen in the workplace?Will this happen in the workplace?

    To paraphrase JohnTo paraphrase John WillinskyWillinsky::

    Two preTwo pre --requisites to acquiring knowledgerequisites to acquiring knowledgeMotivationMotivation

    Will enterprises have the desire to unleash Web 2.0Will enterprises have the desire to unleash Web 2.0 --stylestyle

    forces in their organization?forces in their organization?

    Who will get control over IT systems?Who will get control over IT systems?Employees on the ground?Employees on the ground?

    ContextContextUnderstanding concepts and reasons for themUnderstanding concepts and reasons for them

    Familiarity with user generated content and harnessingFamiliarity with user generated content and harnessingcollective intelligence, for one thingcollective intelligence, for one thing

    One insight: Emergent rather than deliberate use ofOne insight: Emergent rather than deliberate use of blogsblogsandand wikiswikis

  • 8/7/2019 Ajax Design Patterns

    24/50

    Significant Motivation ExistsSignificant Motivation ExistsIncreased levels of productivity that wereIncreased levels of productivity that wereinaccessible until nowinaccessible until nowEnablement of tacit interactions on aEnablement of tacit interactions on apreviously unknown scalepreviously unknown scale

    Workforce Job Types Developed Countries

    20% 40% 40%

    Transformational:Extraction and

    conversion of raw

    materials

    Transactional:Routine

    interactions

    (standardized,invariable tasks)

    Tacit:Complex interactions

    (decision making,

    collaboration,knowledgeconsumption)

    high variabilityreduction = productivity

  • 8/7/2019 Ajax Design Patterns

    25/50

    Sidebar: Tacit InteractionsSidebar: Tacit Interactions[They] involve judgment or insight applied to complex[They] involve judgment or insight applied to complexcommunications or problem solving, and often occurs incommunications or problem solving, and often occurs inmanagement, sales, customer service.management, sales, customer service.

    Tacit interactions differ from transformational interactions (chTacit interactions differ from transformational interactions (ch anginganginga physical good into something else) and transactional interactia physical good into something else) and transactional interacti onsons(following set rules in a repeatable fashion). They now represen(following set rules in a repeatable fashion). They now represen t 41t 41percent of all U.S. worker activity (measured by number of jobs)percent of all U.S. worker activity (measured by number of jobs) andandare growing the most rapidly. However, only 24 percent of softwaare growing the most rapidly. However, only 24 percent of softwa rereinvestments today support them.investments today support them. SourceSource : Software 2006 Report: Software 2006 Report

    Thus the largest productivity gains remaining in theThus the largest productivity gains remaining in theeconomy can come from removing transactional burdenseconomy can come from removing transactional burdensfrom employees so they can engage in higherfrom employees so they can engage in higher --valuevalueinteractioninteraction activitesactivites .. SourceSource : McKinsey & Co.: McKinsey & Co.

    Simple example: Collaborative spam filtering reduces eSimple example: Collaborative spam filtering reduces e --mail burdenmail burdenEnabled by Web 2.0 style techniques likeEnabled by Web 2.0 style techniques like harnessing harnessing collective intelligence, customer self collective intelligence, customer self - - service, The Long Tail service, The Long Tail ,,and others.and others.

    f f f

  • 8/7/2019 Ajax Design Patterns

    26/50

    Specific Benefits ofSpecific Benefits of

    Tacit InteractionsTacit InteractionsUse technology to allocate activities more efficiently between tUse technology to allocate activities more efficiently between t acitacitinteraction and transactional employeesinteraction and transactional employees .. This frees up the highThis frees up the high --value workers to spend more time doing what only they can do.value workers to spend more time doing what only they can do.

    Benefit:Benefit: Improved output of highest Improved output of highest - - value activities.value activities.TechnogyTechnogy to boost the quality, speed, and scalability of theto boost the quality, speed, and scalability of thedecisions employees make.decisions employees make. Solutions: Easier access to filtered andSolutions: Easier access to filtered andstructured information:structured information:

    BenefitBenefit :: Fast access to the right informatio n Fast access to the right informatio n The Web 2.0 world has ta ckled The Web 2.0 world has ta ckled with many with many bl og bl og and search techniques like and search techniques like Memeorandum Memeorandum and and Google Google BlogSearch BlogSearch ..

    New and emerging technologies to extend the scope and breadth ofNew and emerging technologies to extend the scope and breadth of ofoftacit interactions.tacit interactions. ""Novel applications Novel applications " are called out such as" are called out such ascollaborative software tocollaborative software to facilitiatefacilitiate , speed, speed --up, and drastically cut the costup, and drastically cut the costof interactions.of interactions.

    Benefit:Benefit: Being able to easily and simply connect the systems needed Being able to easily and simply connect the systems needed

    dynamically to solve problems as they come up.dynamically to solve problems as they come up. With Web 2.0 technologies,With Web 2.0 technologies,the promise is close.the promise is close.

    http://memeorandum.com/http://memeorandum.com/http://memeorandum.com/http://blogsearch.google.com/http://memeorandum.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://memeorandum.com/http://memeorandum.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://blogsearch.google.com/http://memeorandum.com/
  • 8/7/2019 Ajax Design Patterns

    27/50

    Applying Web 2.0 to the workplaceApplying Web 2.0 to the workplace

    LowLow--barrier, available anywhere, Webbarrier, available anywhere, Web --basedbased mashupsmashups (Ajax and(Ajax and RIAsRIAs with granular URL structures)with granular URL structures)

    Allow business users to structure business informationAllow business users to structure business informationand content (and content ( folksonomiesfolksonomies over taxonomies)over taxonomies)Continuous, bottomContinuous, bottom --up business processes created byup business processes created bythe endthe end --users that use them (BPM 2.0)users that use them (BPM 2.0)Business processes exposed as Web services, turningBusiness processes exposed as Web services, turningthe business process into its own reusable platformthe business process into its own reusable platformEasy inclusion of external WebEasy inclusion of external Web --friendly data sources andfriendly data sources andservices into business processesservices into business processesBased onBased on simple simple ,, common common ,, recognized recognized standards asstandards asmuch as possible (much as possible ( OpenAjaxOpenAjax , RSS, ATOM, REST, etc.), RSS, ATOM, REST, etc.)Web 2.0Web 2.0 --style collaboration (style collaboration ( wikiwiki--style editing,style editing, blogblog --stylestyle

    publishing, social networking, etc.)publishing, social networking, etc.)Last but NOT least:Last but NOT least: GoogleGoogle --Quality Enterprise SearchQuality Enterprise Search

    K E i W b 2 0 T h iK E i W b 2 0 T h i

  • 8/7/2019 Ajax Design Patterns

    28/50

    Key Enterprise Web 2.0 Technique:Key Enterprise Web 2.0 Technique:

    Turning Applications Into PlatformsTurning Applications Into PlatformsOpenly exposing the features of software toOpenly exposing the features of software to

    customers, endcustomers, end --users, partners, andusers, partners, andsuppliers for reuse and remixingsuppliers for reuse and remixing

    This strategy requires documenting,This strategy requires documenting,encouraging, and actively supporting theencouraging, and actively supporting theapplication as a platformapplication as a platform

    Has governance implicationsHas governance implicationsProvide legal, technical, and businessProvide legal, technical, and business

    reasons to enable this:reasons to enable this:Fair licensing and pricing modelsFair licensing and pricing models

    S A Si il i iSt Att t Si il iti

  • 8/7/2019 Ajax Design Patterns

    29/50

    Strange Attractors: SimilaritiesStrange Attractors: Similarities

    betweenbetween Web 2.0 and SOAWeb 2.0 and SOAWeb 2.0Web 2.0

    Software as a serviceSoftware as a serviceInteroperability basedInteroperability basedon Web principleson Web principlesApplications asApplications asplatformsplatformsEncouragesEncouragesunintended usesunintended uses

    MashupsMashupsRich userRich user intefacesintefacesArchitecture ofArchitecture of

    ParticipationParticipation

    SOASOASoftware as servicesSoftware as servicesInteroperability basedInteroperability basedon Web standardson Web standardsApplications asApplications asPlatformsPlatformsPermits unintendedPermits unintendedusesuses

    Composite AppsComposite AppsLittle user interfaceLittle user interfaceguidanceguidance

    Little prescription ofLittle prescription ofuser participationuser participation

    SS Ob iOb i

  • 8/7/2019 Ajax Design Patterns

    30/50

    SomeSome ObservationsObservationsTopTop --downdown (pre(pre --defined) vs. Bottomdefined) vs. Bottom --Up (emergent)Up (emergent)

    SOAsSOAs tends to be a top down architectural phenomenontends to be a top down architectural phenomenon

    Few developers report developing with SOAFew developers report developing with SOA

    Web 2.0 is a widespread, grassroots industryWeb 2.0 is a widespread, grassroots industryphenomenonphenomenon

    Here todayHere today vs. promises tomorrowvs. promises tomorrowFullFull--strength SOA (WSstrength SOA (WS --* of any kind) is difficult to do with* of any kind) is difficult to do withavailable tooling (60+ standards today)available tooling (60+ standards today)

    However, Web 2.0 techniques are entirely in existenceHowever, Web 2.0 techniques are entirely in existencetodaytoday

    Though some, like endThough some, like end --user guided browseruser guided browser mashupsmashups , certainly, certainlyhave immature toolinghave immature tooling

    Wh t thWh t th

  • 8/7/2019 Ajax Design Patterns

    31/50

    What then areWhat then are

    Web 2.0Web 2.0 --style Web services?style Web services?The most common Web service approachesThe most common Web service approaches ininthe wildthe wild are ones based on theare ones based on the graingrain of theof theWeb:Web:

    Representation State Transfer, orRepresentation State Transfer, or RESTRESTCreated by Roy Fielding, the coCreated by Roy Fielding, the co --creator of HTTP, thecreator of HTTP, the

    fundamental protocol of the Web.fundamental protocol of the Web.Designed to fit naturally into Internet architectureDesigned to fit naturally into Internet architectureExtremely simple, not a standard, just a style of usingExtremely simple, not a standard, just a style of usingHTTPHTTPFully embraces the workings of HTTP and uses itsFully embraces the workings of HTTP and uses itsverbs (GET, PUT, POST, DELETE) on top of averbs (GET, PUT, POST, DELETE) on top of agranular,granular, sensicalsensical URL structure that reflects a naturalURL structure that reflects a naturalview of the data.view of the data.

    Is also fully subject toIs also fully subject to network effectsnetwork effects

  • 8/7/2019 Ajax Design Patterns

    32/50

    RESTREST Service Example:Service Example:

    The Res lt:The Result:

  • 8/7/2019 Ajax Design Patterns

    33/50

    The Result:The Result:

    WebWeb --Oriented Architecture or WOAOriented Architecture or WOA

  • 8/7/2019 Ajax Design Patterns

    34/50

    AdvantagesAdvantages of WOAof WOAFully aligns with theFully aligns with the graingrain of the Web resulting in lowestof the Web resulting in lowestimpedanceimpedance

    No XSD parsing, no serviceNo XSD parsing, no service --wide contract; only the parts youwide contract; only the parts youcare about; results in loosest coupling, natural, consistentcare about; results in loosest coupling, natural, consistentinformation architectureinformation architecture

    Requires no special software development toolkits (noRequires no special software development toolkits (noSOAP or WSSOAP or WS --* stack) and is compatible with every* stack) and is compatible with everybrowser today for use with Ajax andbrowser today for use with Ajax and RIAsRIAs ..Works with virtually every programming language andWorks with virtually every programming language anddevelopment platform that existsdevelopment platform that exists

    As long as it can do HTTPAs long as it can do HTTPResults in interoperability with virtually everyone, anywhereResults in interoperability with virtually everyone, anywhereBasis on HTTP means that performance, caching,Basis on HTTP means that performance, caching,security, routing, management, monitoringsecurity, routing, management, monitoring

    infrastructures are fully exploited.infrastructures are fully exploited.Anything you can do to improve HTTP, improves RESTAnything you can do to improve HTTP, improves REST

  • 8/7/2019 Ajax Design Patterns

    35/50

    DisadvantagesDisadvantages of WOAof WOAREST is a style and not quite as wellREST is a style and not quite as well --documented as SOAP, WSdocumented as SOAP, WS --**

    Roy FieldingRoy Fielding ss disserationdisseration is obtuseis obtuseCaveat: Good examples abound in AmazonCaveat: Good examples abound in Amazon s ands andWebjayWebjay ..

    Pushes some complexity back into the servicePushes some complexity back into the servicecontentcontentNo transaction support, no automatic policyNo transaction support, no automatic policyenforcement, pointenforcement, point --toto--point security onlypoint security onlyThe upside: 90% of applications actually donThe upside: 90% of applications actually don t needt needthese because theythese because they oiftenoiften violate the principles of SOviolate the principles of SOanyway.anyway.

    Use of JSON results in Web services that arenUse of JSON results in Web services that aren ttselfself --describing.describing.

  • 8/7/2019 Ajax Design Patterns

    36/50

    Web 2.0 AnecdotesWeb 2.0 Anecdotes

  • 8/7/2019 Ajax Design Patterns

    37/50

    Anecdote #1Anecdote #1IBM andIBM and QEDwikiQEDwiki June 15June 15 thth , 2006, 2006

    Announced editable Web pages (Announced editable Web pages ( wikiswikis) as a platform for end) as a platform for end --userusersoftware developmentsoftware developmentContext:Context:

    "Customers I talk to are abuzz about Web 2.0 and the creation of"Customers I talk to are abuzz about Web 2.0 and the creation ofpopular Internet services that seem to quickly appear out ofpopular Internet services that seem to quickly appear out ofnowhere, becoming instant global phenomena that are enjoyed bynowhere, becoming instant global phenomena that are enjoyed by

    the massesthe masses ---- including their employees. They want to apply thatincluding their employees. They want to apply thatnew paradigm to make their businesses act faster and grab newnew paradigm to make their businesses act faster and grab newopportunities. There's no going back."opportunities. There's no going back." -- IBMIBMs Rod Smiths Rod Smith

    Breaks down the barriers of traditional application developmentBreaks down the barriers of traditional application development

    and provides a framework that uses Web services andand provides a framework that uses Web services and wikiwikitechnology to allow people to create a customized application intechnology to allow people to create a customized application inless than five minutes.less than five minutes.Results in soResults in so --calledcalled situational softwaresituational software

    Puts more capability into an individuals hands and gives themPuts more capability into an individuals hands and gives themmore freedom to innovatemore freedom to innovate

    BlogsBlogs wikiswikis and other 2and other 2 wayway

  • 8/7/2019 Ajax Design Patterns

    38/50

    BlogsBlogs ,, wikiswikis , and other 2, and other 2 --wayway

    applications as collaborationapplications as collaboration platformsplatforms

  • 8/7/2019 Ajax Design Patterns

    39/50

    Anecdote #2Anecdote #2PremisePremise : If lightweight, Web 2.0: If lightweight, Web 2.0 --style ad hocstyle ad hoc

    community software was useful and producedcommunity software was useful and produced

    results, weresults, we d expect to see it happening in thed expect to see it happening in theDarwinianDarwinian Petri dishPetri dish of the Webof the WebResult #1Result #1 :: ProgrammableWeb.comProgrammableWeb.com andand

    MashupFeed.comMashupFeed.comProgrammableWebProgrammableWeb : 200+ Web APIs: 200+ Web APIsMashupFeedMashupFeed : 730: 730 MashupsMashupsThat are listed on these two sites. There are more...That are listed on these two sites. There are more...

    Result #2:Result #2: Amazon.comAmazon.com Web ServicesWeb ServicesOf the 50,000+ customers using the Web services, resultingOf the 50,000+ customers using the Web services, resultingin $211 million in total Web services net revenue in 2005in $211 million in total Web services net revenue in 2005alone.alone.

    There are many more examples...There are many more examples...

    Anecdote #3: ElicitingAnecdote #3: Eliciting

  • 8/7/2019 Ajax Design Patterns

    40/50

    Anecdote #3: ElicitingAnecdote #3: Eliciting

    ParticipationParticipationGovernment agency creates an internalGovernment agency creates an internal wikiwiki

    Wants to get workers to contribute high value informationWants to get workers to contribute high value informationReasonReason : Couldn: Couldn t get contributions from userst get contributions from users

    Not in their selfNot in their self --interestinterest

    ResponseResponse : Seeded information with subtle inaccuracies: Seeded information with subtle inaccuraciesSent out to subject matter expertsSent out to subject matter expertsResulted in a wave of corrections and improvementsResulted in a wave of corrections and improvements

    Key PointKey Point : Finding ways to motivate enterprise: Finding ways to motivate enterpriseusers to contribute is an important and emergingusers to contribute is an important and emergingscience. But, emergent and bottom up is still thescience. But, emergent and bottom up is still themost desirable; they should be doing it themselves.most desirable; they should be doing it themselves.

    Anecdote #4: Customers as CoAnecdote #4: Customers as Co --

  • 8/7/2019 Ajax Design Patterns

    41/50

    Anecdote #4: Customers as CoAnecdote #4: Customers as Co -

    CreatorsCreatorsChevy Apprentice CampaignChevy Apprentice Campaign

    TwoTwo --way collaborative video production effortway collaborative video production effortbetween customers and corporate.between customers and corporate.Over 22,000 videos were ultimately submitted.Over 22,000 videos were ultimately submitted.Including submissions highly critical of the ChevyIncluding submissions highly critical of the ChevyTahoe SUV.Tahoe SUV.GM anticipated this and only removed offensiveGM anticipated this and only removed offensivevideos.videos.

    Established trust with existing and potentialEstablished trust with existing and potentialcustomers.customers.Increased general awareness about the product.Increased general awareness about the product.

    Community and discussion about the product in aCommunity and discussion about the product in away that would never have happened otherwise.way that would never have happened otherwise.

    Anecdote #5: SelfAnecdote #5: Self --Organization:Organization:

  • 8/7/2019 Ajax Design Patterns

    42/50

    Anecdote #5: SelfAnecdote #5: Self Organization:Organization:

    KatrinaListKatrinaList andand PeopleFinderPeopleFinderHurricane KatrinaHurricane Katrina

    Survivors emerged andSurvivors emerged and

    announced where theyannounced where theywere on theirwere on their blogsblogsPeople watching thePeople watching theWebWeb s syndications syndication

    ecosystemecosystem noticed thenoticed thereportsreportsA small group collectedA small group collectedthe reports out of thethe reports out of theblogosphereblogosphere andandcentralized the listingcentralized the listingOver 50,000 survivorOver 50,000 survivorreports in the first 3 daysreports in the first 3 daysafter the disasterafter the disaster

    Anecdote #6: DocumentingAnecdote #6: Documenting

  • 8/7/2019 Ajax Design Patterns

    43/50

    Anecdote #6: DocumentingAnecdote #6: Documenting

    Genocide onGenocide on BlogsBlogsThe Rwanda SurvivorsThe Rwanda Survivors BlogBlog((http:// http:// rwandansurvivors.blogspot.comrwandansurvivors.blogspot.com /) /)

    Designed to be a voice and a platform for theDesigned to be a voice and a platform for thesurvivors of the Rwandan Genocide in 1994. Thesurvivors of the Rwandan Genocide in 1994. Theblogblog contains testimonials and accounts of thecontains testimonials and accounts of thegenocide but we also aim to look to the future andgenocide but we also aim to look to the future andwant to hear your views on how we can preventwant to hear your views on how we can preventthese atrocities happening again.these atrocities happening again. Uses lowUses low --barrier yet highly discoverable publicationbarrier yet highly discoverable publicationmechanismmechanismVirtually no cost yet global exposureVirtually no cost yet global exposureStories can be captured in perpetuityStories can be captured in perpetuityPotential future perpetrators of genocide havePotential future perpetrators of genocide haveincreasing sense of accountabilityincreasing sense of accountability

    The result of longThe result of long --term Web 2.0:term Web 2.0:

  • 8/7/2019 Ajax Design Patterns

    44/50

    The result of longThe result of long term Web 2.0:term Web 2.0:

    Social ComputingSocial ComputingGenerally accepted longGenerally accepted long --term trendsterm trendsInnovation is moving from a topInnovation is moving from a top --down to bottomdown to bottom --upupmodel, tomodel, to pull pull instead ofinstead of push push Value is shifting from ownership to experiencesValue is shifting from ownership to experiencesPower is moving from institutions to communitiesPower is moving from institutions to communities

    New social structure is emerging in whichNew social structure is emerging in whichtechnology puts power in communities, nottechnology puts power in communities, notinstitutions.institutions.Analogy from Forrester:Analogy from Forrester:

    Web 2.0 is the building of the Interstate HighwayWeb 2.0 is the building of the Interstate HighwaySystem in the 1950s; Social Computing is everythingSystem in the 1950s; Social Computing is everythingthat resulted next (for better or worse): suburbanthat resulted next (for better or worse): suburban

    sprawl, energy dependency, efficient commerce,sprawl, energy dependency, efficient commerce,Americans' lust for cheap and easy travel.Americans' lust for cheap and easy travel.

    Specific examples of SocialSpecific examples of Social

  • 8/7/2019 Ajax Design Patterns

    45/50

    Specific examples of SocialSpecific examples of Social

    Computing driversComputing drivers

    Individuals

    Legacy business models,products, and branding Response to individualcustomer needs

    Structured Spontaneous

    Linear and well-defined Controlled chaos

    Go to the customer Invite and engage customer

    Explicit Explicit and emergent

    Market research, surveys,focus groups

    Search, e-mail, blogs, wikis,online social communities

    OrganizationsInnovation Source:

    Drivers:

    Interaction Style:

    Interaction Process:

    Corporate Strategy:

    NeedsDetermination:

    Techniques:

    The Major Trends ofThe Major Trends of

  • 8/7/2019 Ajax Design Patterns

    46/50

    The Major Trends ofj

    EntepriseEnteprise Web 2.0Web 2.0 MashupsMashups and Ajaxand AjaxIncreasing software composition in the browserIncreasing software composition in the browserSelfSelf --service IT and BPM scenarios as users roll their own justservice IT and BPM scenarios as users roll their own just --inin--timetimeintegrations using tools that assist thisintegrations using tools that assist thisHelp leverage SOA investments; Ajax is a natural SOA delivery plHelp leverage SOA investments; Ajax is a natural SOA delivery pl atformatform

    AdAd --hoc yet Integrated Collaboration (Enterprise 2.0)hoc yet Integrated Collaboration (Enterprise 2.0)BlogsBlogs ,, wikiswikis, and other, and other freeform freeform ,, emergent emergent social softwaresocial software

    Integrated read/write withIntegrated read/write with SOAsSOAsSyndication models instead of twoSyndication models instead of two --way servicesway servicesIncrease in highIncrease in high --value tacit interaction and automated transaction workvalue tacit interaction and automated transaction workboth, resulting in higher productivityboth, resulting in higher productivity

    Useful processes emerge in 6Useful processes emerge in 6 --9 hours in lieu of the 69 hours in lieu of the 6 --9 months needed to9 months needed to

    build the custom IT systembuild the custom IT systemCan provide access to solutions too expensive to do with traditiCan provide access to solutions too expensive to do with traditi onal ITonal ITtechnologies and processestechnologies and processesAllow the business to capture much more information back into ITAllow the business to capture much more information back into IT systemssystemsthan normalthan normal

    Consistent Foundations for Software as a ServiceConsistent Foundations for Software as a ServiceNo upgrades, no patches, goNo upgrades, no patches, go --anywhere software that uses the sameanywhere software that uses the sameunderlying services and dataunderlying services and data

    Disruptive Implications ofDisruptive Implications of

  • 8/7/2019 Ajax Design Patterns

    47/50

    p pp p

    Web 2.0Web 2.0Loss of central control over many types ofLoss of central control over many types ofcollaborationcollaborationSecurity, testing, consistency, and businessSecurity, testing, consistency, and businesspolicy enforcement are all problematicpolicy enforcement are all problematic

    Trusting your users is often the only optionTrusting your users is often the only optionCentral IT departments risk becoming sidelinedCentral IT departments risk becoming sidelinedunless they can enable Web 2.0unless they can enable Web 2.0 --stylestylecollaborationcollaboration

    Jump or get off the ledgeJump or get off the ledgeA last chance to add desired enterprise context andA last chance to add desired enterprise context andpositive control before empowered users do itpositive control before empowered users do itthemselvesthemselves

    F ll C t t f W b 2 0F ll C t t f W b 2 0

  • 8/7/2019 Ajax Design Patterns

    48/50

    Full Context of Web 2.0Full Context of Web 2.0

    Recommendations for LeveragingRecommendations for Leveraging

  • 8/7/2019 Ajax Design Patterns

    49/50

    g gg g

    Web 2.0 in the WorkplaceWeb 2.0 in the WorkplaceSmall Pieces, Loosely JoinedSmall Pieces, Loosely JoinedThe larger the pieces are, the less they are usedThe larger the pieces are, the less they are usedDocument routing isnDocument routing isn t dead, just going smallt dead, just going small

    Simplicity and extreme loose coupling increases consumption scenSimplicity and extreme loose coupling increases consumption scen ariosariosSee patterns for this in JuneSee patterns for this in June s Microsoft Architecture Journal #8s Microsoft Architecture Journal #8

    AllowAllow blogsblogs ,, wikiswikis , and other discoverable, open collaboration to be easily, and other discoverable, open collaboration to be easilycreatedcreatedEstablish your organizationEstablish your organization s Web 2.0 strategys Web 2.0 strategy

    CreatCreat approved list of Web 2.0approved list of Web 2.0 --collaboration platformscollaboration platforms

    Make it clear to nonMake it clear to non --technical peopletechnical peopleEnable instead of constrain (restricting admin rights wonEnable instead of constrain (restricting admin rights won t stop Enterprise Web 2.0)t stop Enterprise Web 2.0)Internal vs. external reuse vs. building internal vs. externallyInternal vs. external reuse vs. building internal vs. externally

    Reuse first, build secondReuse first, build secondService Level Agreements (Service Level Agreements ( SLAsSLAs ) and governance will get extremely interesting) and governance will get extremely interesting

    Usually still easier and cheaper than recreating many servicesUsually still easier and cheaper than recreating many servicesOpen it all upOpen it all upMake sure itMake sure it s legal build businesses from, profitable for others, and extrems legal build businesses from, profitable for oth ers, and extrem elyelyeasy to doeasy to do (easier than anyone else, preferably)(easier than anyone else, preferably)

    And above all, provide a minimum structureAnd above all, provide a minimum structureand let users do this themselves.and let users do this themselves.

  • 8/7/2019 Ajax Design Patterns

    50/50

    Questions?Questions?