software tools, part 2 fall, 2002. overview toolkits toolkits prototyping languages prototyping...

34
Software Tools, Software Tools, Part 2 Part 2 Fall, 2002 Fall, 2002

Upload: edwina-martin

Post on 05-Jan-2016

231 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Software Tools, Software Tools, Part 2Part 2Fall, 2002Fall, 2002

Page 2: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

OverviewOverview

ToolkitsToolkits Prototyping LanguagesPrototyping Languages FrameworksFrameworks Groupware FrameworksGroupware Frameworks

GroupKitGroupKit THYMETHYME

Wrap UpWrap Up

Page 3: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

ToolkitsToolkits

Ease development by providing fully-Ease development by providing fully-fleshed out UI widgetsfleshed out UI widgets

A UI component has two major partsA UI component has two major parts The UI presentation (a button)The UI presentation (a button) The outlet (how the program is The outlet (how the program is

informed when the button is pressed)informed when the button is pressed)

Page 4: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

ToolkitsToolkits

TCL/TkTCL/Tk MotifMotif Mac ToolboxMac Toolbox MFCMFC Java AWTJava AWT

Page 5: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

ToolkitsToolkits

DisadvantagesDisadvantages does not necessarily contain all the does not necessarily contain all the

functionality you needfunctionality you need constrained by the programming modelconstrained by the programming model

motif and pseudo-objectsmotif and pseudo-objects AWT and layout managersAWT and layout managers

toolkits can be specific to a languagetoolkits can be specific to a language AWT and JavaAWT and Java TCL/Tk and TCLTCL/Tk and TCL

Page 6: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Prototyping LanguagesPrototyping Languages

By hiding programming details, a By hiding programming details, a developer can build a functional developer can build a functional prototype quickerprototype quicker

Hidden detailsHidden details memory allocation / garbage collectionmemory allocation / garbage collection UIUI flow controlflow control

Page 7: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Prototyping LanguagesPrototyping Languages

JavaJava Application / Applet languageApplication / Applet language Cross platform. Intent is that all Cross platform. Intent is that all

applications act the same on all applications act the same on all platformsplatforms

HypercardHypercard Movement between Cards (screens)Movement between Cards (screens)

Tcl/TkTcl/Tk Scripting languageScripting language

Page 8: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Prototyping LanguagesPrototyping Languages

The final prototype unsuitable for a The final prototype unsuitable for a released productreleased product speedspeed memory footprintmemory footprint

Interface to external libraries can be Interface to external libraries can be difficult (but is usually possible)difficult (but is usually possible) JNI for interfacing to C libraries from JNI for interfacing to C libraries from

JavaJava SWIG for PerlSWIG for Perl

Page 9: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Toolkits and LanguagesToolkits and LanguagesThe MessageThe Message

Toolkits provide UI widgets that can Toolkits provide UI widgets that can be used to develop the applicationbe used to develop the application

This lets the developer focus on This lets the developer focus on building the application, instead of building the application, instead of the widgetsthe widgets

Prototyping languages allow the Prototyping languages allow the rapid development of prototype rapid development of prototype applications, but can entail trade-offsapplications, but can entail trade-offs

Page 10: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

FrameworksFrameworks My definition: Frameworks provide My definition: Frameworks provide

structure for the developer to build structure for the developer to build an application aroundan application around

Other definitions:Other definitions: MacOSX frameworks (i.e., Cocoa, MacOSX frameworks (i.e., Cocoa,

Carbon) as object oriented librariesCarbon) as object oriented libraries Often synonym for toolkitOften synonym for toolkit

Page 11: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Groupware FrameworksGroupware Frameworks

Provide the infrastructure for Provide the infrastructure for building groupwarebuilding groupware

UI ToolkitUI Toolkit Messaging / Networking / etcMessaging / Networking / etc DiscoveryDiscovery Other featuresOther features

transcriptiontranscription analysisanalysis

Page 12: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

GroupKitGroupKit

Roseman and Greenberg, 1995Roseman and Greenberg, 1995 TCL/Tk framework for building TCL/Tk framework for building

distributed, synchronous groupwaredistributed, synchronous groupware Room-based, called conferences, Room-based, called conferences,

handled by the session managerhandled by the session manager

Page 13: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

GroupKitGroupKit

FeaturesFeatures runtime infrastructureruntime infrastructure

manage communicationmanage communication handle interconnectionshandle interconnections

groupware programming abstractionsgroupware programming abstractions RPCRPC shared data structuresshared data structures

Page 14: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

GroupKitGroupKit

FeaturesFeatures groupware widgetsgroupware widgets

multi-user scrollbarmulti-user scrollbar shared whiteboardshared whiteboard telepointerstelepointers

session managementsession management discovery of sessionsdiscovery of sessions grouping of usersgrouping of users

Page 15: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

THYMETHYME flexibleflexible

the developer should have access to the the developer should have access to the infrastructure, not be limited by itinfrastructure, not be limited by it

extensibleextensible the developer should be able to add the developer should be able to add

infrastructureinfrastructure introspectableintrospectable

the developer should be able to extract the developer should be able to extract contextual informationcontextual information

consistentconsistent patterns and structurepatterns and structure

Page 16: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

THYMETHYME

component modelcomponent model driven by communication between driven by communication between

componentscomponents developer’s work involves writing new developer’s work involves writing new

components which communicate to components which communicate to other developer written components other developer written components and existing, infrastructure components and existing, infrastructure components

infrastructure follows this component infrastructure follows this component model, no special casesmodel, no special cases

Page 17: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

What You GetWhat You Get

my-project-basemy-project-base contains thyme-corecontains thyme-core chats - the THYME Chat Roomchats - the THYME Chat Room swab - the THYME Shared Whiteboardswab - the THYME Shared Whiteboard abs - the THYME Build Systemabs - the THYME Build System my-project - your stuff goes heremy-project - your stuff goes here

building everything involves `make` building everything involves `make` or `ant`or `ant`

Page 18: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.

Page 19: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

What You’ll DoWhat You’ll Do

add your components and message add your components and message source code to my-projectsource code to my-project the roomthe room the clientthe client

add your component specifications add your component specifications to my-projectto my-project

run your applicationrun your application collect datacollect data

Page 20: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Anatomy of a ComponentAnatomy of a Component a component is the functional piece of a component is the functional piece of

THYME applicationTHYME application uniquely identifieduniquely identified sends and receives messagessends and receives messages

lifecyclelifecycle on<Stage>() methodson<Stage>() methods

infrastructureinfrastructure taken care of for youtaken care of for you

functionalfunctional your responsibilityyour responsibility

Page 21: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Reference IdsReference Ids

An Id uniquely points to a componentAn Id uniquely points to a component Contains a classid and an instanceidContains a classid and an instanceid

the classid is specified in the specification the classid is specified in the specification filefile

the instanceid is developer specifiedthe instanceid is developer specified the combination of instanceid and classid the combination of instanceid and classid

is unique within a Nodeis unique within a Node An Id is never constructed by the An Id is never constructed by the

developer, it is obtained via the Id developer, it is obtained via the Id managermanager

Page 22: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Obtaining a ComponentObtaining a Component A given Id always references the same A given Id always references the same

component. There is no difference component. There is no difference between obtaining and constructing a between obtaining and constructing a componentcomponent

No direct construction (i.e., you will never No direct construction (i.e., you will never call new MyComponent())call new MyComponent())

You should pass around an Id, not a You should pass around an Id, not a componentcomponent

How it worksHow it works1.1. obtain an Id that represents the componentobtain an Id that represents the component2.2. obtain the component managerobtain the component manager3.3. request a new component request a new component

Page 23: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

MessagingMessaging

THYME provides simple semantics THYME provides simple semantics for communicating between for communicating between components, local or remote.components, local or remote.

No RMI / RPC (yet)No RMI / RPC (yet) A message object is constructed and A message object is constructed and

sent to a specified componentsent to a specified component A component is informed of a new A component is informed of a new

message via the receive() methodmessage via the receive() method

Page 24: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

LifecycleLifecycle Lifecycle stages exist to provide a granular set of Lifecycle stages exist to provide a granular set of

post-constructorspost-constructors Extensible, but don’t bother hereExtensible, but don’t bother here Cumulative and orderedCumulative and ordered

i.e., setReady() on a constructed component will call i.e., setReady() on a constructed component will call onInit() and onReady(), in orderonInit() and onReady(), in order

3 methods3 methods set<StageTransition>() is called on the component and set<StageTransition>() is called on the component and

causes a transition iscauses a transition is <Stage>() is called on a component and returns a <Stage>() is called on a component and returns a

booleanboolean on<Stage>() is implemented in the component and on<Stage>() is implemented in the component and

called appropriatelycalled appropriately

Page 25: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

LifecycleLifecycle Stages (in order)Stages (in order)

constructedconstructed initializedinitialized readyready shutdownshutdown

TransitionsTransitions constructed + init = initializedconstructed + init = initialized initialized + ready = readyinitialized + ready = ready * + reset = initialized* + reset = initialized * + shutdown = shutdown* + shutdown = shutdown

Page 26: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

TranscriptionTranscription

Transcription is performed by Transcription is performed by collecting messages that are sent collecting messages that are sent between componentsbetween components

Transcript is optional, a message can Transcript is optional, a message can be ignored by setting be ignored by setting setTranscribe(false).setTranscribe(false).

Transcribed messages are set the Transcribed messages are set the transcription service, which exists transcription service, which exists within a separate VMwithin a separate VM

Page 27: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Running Your Running Your ApplicationApplication

Each component exists in exactly one Each component exists in exactly one container component, called a Nodecontainer component, called a Node

The Node brokers the component for The Node brokers the component for discovery and ensures that addressed discovery and ensures that addressed messages get to itmessages get to it

Each Node exists on exactly one host, Each Node exists on exactly one host, although one host can have multiple although one host can have multiple nodesnodes

Page 28: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.

Page 29: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Running Your Running Your ApplicationApplication

To run your application, you need to To run your application, you need to tell the node what components it might tell the node what components it might

need to create and useneed to create and use instantiate at least one component to instantiate at least one component to

start the application goingstart the application going pass control to that componentpass control to that component

Page 30: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Running Your Running Your ApplicationApplication

Each application has a specification file, Each application has a specification file, which provides these elementswhich provides these elements

<?xml?><?xml?><system><system>

<init class=“some.class”/><init class=“some.class”/><blocs><blocs>

<bloc id=“an-id” <bloc id=“an-id” class=“the.class.for.id”/>class=“the.class.for.id”/></blocs></blocs>

</system></system>

Page 31: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

DiscoveryDiscovery

I start up a chat room client, how do I start up a chat room client, how do I get a list of all chat rooms I might I get a list of all chat rooms I might want to connect to?want to connect to?

Explicit, specify the room on the Explicit, specify the room on the command linecommand line

Implicit, talk to the registrarImplicit, talk to the registrar

Page 32: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

RegistrarRegistrar

The node registrar provides a list of The node registrar provides a list of all Nodes that have been registered all Nodes that have been registered with itwith it

Each node can be introspected to get Each node can be introspected to get a list of components that it containsa list of components that it contains

The list can be searched for matching The list can be searched for matching criteriacriteria

All this is encapsulated by the THYME All this is encapsulated by the THYME find manager componentfind manager component

Page 33: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

Wrap UpWrap Up

Specification MethodsSpecification Methods grammars, transition diagrams, state charts, grammars, transition diagrams, state charts,

UANUAN Interface Building ToolsInterface Building Tools

rapid prototypingrapid prototyping Evaluation ToolsEvaluation Tools ToolkitsToolkits FrameworksFrameworks

GroupKit, THYMEGroupKit, THYME

Page 34: Software Tools, Part 2 Fall, 2002. Overview Toolkits Toolkits Prototyping Languages Prototyping Languages Frameworks Frameworks Groupware Frameworks Groupware

THYME ResourcesTHYME Resources EmailEmail

[email protected]@cs.brandeis.edu IRCIRC

irc://group.cs.brandeis.edu #thymeirc://group.cs.brandeis.edu #thyme WebpageWebpage

http://group.cs.brandeis.edu/thymehttp://group.cs.brandeis.edu/thyme JavaDocsJavaDocs

http://group.cs.brandeis.edu/thyme/http://group.cs.brandeis.edu/thyme/apiapi ManualManual

http://group.cs.brandeis.edu/thyme/manualhttp://group.cs.brandeis.edu/thyme/manual