pac-120129112758-phpapp01 (1)

download pac-120129112758-phpapp01 (1)

of 21

Transcript of pac-120129112758-phpapp01 (1)

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    1/21

    PACPresentation-Abstraction-Control

    Islamgozhayev Talgat

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    2/21

    What is PAC?The Presentation-Abstraction-Control

    pattern(PAC) defines a structure forinteractive software systems in

    the form of a hierarchy ofcooperating agents.

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    3/21

    MoreoverEvery agent is responsible for a specific

    aspect of the application's functionality and

    consists of three componentspresentation! abstraction! and control. Thissubdivision separates the human"computerinteraction aspects of the agent from its

    functional core and its communication withother agents.

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    4/21

    As the comparisonThe PAC abstraction component corresponds

    roughly to the model component o M!C"

    The presentation component in PAC is acombination o the vie# and controlcomponents in M!C"

    The control component o PAC mediates

    bet#een agents and has no e$uivalent inM!C"

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    5/21

    %&ampleConsider a simple inormation system or political elections

    #ith proportional representation" This o'ers a spreadsheetor entering data and several (inds o tables and charts orpresenting current standings" )sers interact #ith thesot#are through a graphical interace" *i'erent versions+

    ho#ever+ adapt the user interace to speci,c needs" ore&ample+ one version supports additional vie#s o the data+such as the assignment o parliament seats to politicalparties"

    The classic e&ample o a PAC architecture is an air tra.c

    control system" /ne PAC Agent ta(es input rom a radarsystem about the location o an incoming 010+ and uses thePresentation component to paint a picture o that blip on acanvas 2screen3" Another Agent independently ta(es inputabout a *C-45 that is ta(ing o'+ and paints that blip to the

    canvas as #ell" 6till another ta(es in #eather data andpaints clouds+ #hile another trac(s the incoming enemy

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    6/21

    %&ample

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    7/21

    PAC AgentsIn the conte&t o the Presentation-Abstraction-

    Control pattern+ an agent is an inormationprocessing component that includes7

    8 %vent receivers and transmitters"8 *ata structures to maintain state"

    8 A processor that handles incoming events+updates its o#n state+ and may produce

    ne# events"Agents can be a s small as a single ob:ect+ but

    also as comple& as a complete sot#aresystem"

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    8/21

    Conte&tInteractive systems can oten be vie#ed as a set ocooperating agents"

    8 Agents specialized in human-computer interaction acceptuser input and display data"

    8 /ther agents maintain the data model o the system ando'er unctionality that operates on this data"

    8 Additional agents are responsible or diverse tas(s such aserror handling or communication #ith other sot#aresystems"

    ;esides this horizontal decomposition o systemunctionality+ #e oten encounter a vertical decomposition"

    In such an architecture o cooperating agents+ each agent isspecialized or a speci,c tas(+ and all agents togetherprovide the system unctionality" This architecture capturesboth a horizontal and vertical decomposition"

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    9/21

    orcesAgents oten maintain their o#n state and data"

    8 or e&ample+ in a production planning system+ theproduction planning and the actual production controlmay #or( on di'erent data models+ one tuned or

    planning and simulation and one perormance- optimized

    or e.cient production"Interactive agents provide their o#n user interace+ since

    their respective human-computer interactions oten di'er#idely"

    8 or e&ample+ entering data into spreadsheets is done

    using (eyboard input+ #hile the manipulation ographical ob:ects uses a pointing device"

    6ystems evolve over time"

    8 Their presentation aspect is particularly prone to change"

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    10/21

    6olution6tructure the interactive application as a tree-li(e

    hierarchy o PAC agents"

    There should be one top-level agent+ severalintermediate- level agents+ and even more bottom-

    level agents"%very agent is responsible or a speci,c aspect o

    the application

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    11/21

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    12/21

    >o# it #or(s?The agent

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    13/21

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    14/21

    Top-evelThe top-level PAC agent provides the

    unctional core o the system"

    8 The top-level PAC agent includes those partso the user interace that cannot be assignedto particular subtas(s+ such as menu bars or adialog bo& displaying inormation about theapplication"

    8 Most other PAC agents depend or operate onthis core"

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    15/21

    ;ottom-level;ottom-level PAC agents represent sel-

    contained concepts on #hich users o thesystem can act+ such as spreadsheets andcharts"

    8 The bottom-level agents present theseconcepts to the user and support alloperations that users can perorm on theseagents+ such as zooming or moving a chart"

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    16/21

    Intermediate-levelIntermediate-level PAC agents represent

    either combinations o+ or relationshipsbet#een+ lo#er-level agents+ e"g" a =oor planand an e&ternal vie# o a house in a CA*system or architecture"

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    17/21

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    18/21

    Continue"

    6upport or multitas(ing"8 PAC agents can be distributed easily to

    di'erent threads+ processes+ or machines"%&tending a PAC agent #ith appropriate inter-

    process communication unctionality onlya'ects its control component"

    8 Multitas(ing also acilitates multi-userapplications" or e&ample+ in our inormationsystem a ne#scaster can present the latestpro:ection #hile data entry personnel updatethe data base #ith ne# election data"

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    19/21

    iability o PACIncreased system complexity.

    8 The implementation o every semantic concept #ithin an applicationas its o#n PAC agent may result in a comple& system structure"

    8 I the level o granularity is too ,ne+ the system could dro#n in a seao agents" Agents must also be coordinated and controlled+ #hichre$uires additional coordination agents"

    Complex control component.8 The $uality o the control component implementations is thereore

    crucial to an e'ective collaboration bet#een agents+ and thereoreor the overall $uality o the system architecture"

    Efciency.

    8 The overhead in the communication bet#een PAC agents may

    impact system e.ciency especially i agents are distributed"Applicability.

    8 The smaller the atomic semantic concepts o an application are+ andthe more similar their user interaces+ the less applicable this patternis"

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    20/21

    )sage e&amples/n the server side+ *rupal ollo#s the PAC 2Presentation-Abstraction-Control3 design pattern"

    The *rupal Core provides the controller" It responds to userre$uests and routes them to the appropriate handlers"

    The theme system provides the presentation layer" Themodules 2including the built-in modules li(e @ode3 access andmanipulate the data #hich is the :ob o the abstraction layer"

    The menu system acts as the Controller" It accepts input via asingle source 2>TTP %T and P/6T3+ routes re$uests to the

    appropriate helper unctions+ pulls data out o the Abstraction2nodes and+ in *rupal B+ orms3+ and then pushes it through a,lter to get a Presentation o it 2the theme system3" It evenhas multiple+ parallel PAC agents in the orm o bloc(s thatpush data out to a common convas 2page"tpl"php3"

  • 7/23/2019 pac-120129112758-phpapp01 (1)

    21/21