software tools, part 2 fall, 2002. overview toolkits toolkits prototyping languages prototyping...
TRANSCRIPT
Software Tools, Software Tools, Part 2Part 2Fall, 2002Fall, 2002
OverviewOverview
ToolkitsToolkits Prototyping LanguagesPrototyping Languages FrameworksFrameworks Groupware FrameworksGroupware Frameworks
GroupKitGroupKit THYMETHYME
Wrap UpWrap Up
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)
ToolkitsToolkits
TCL/TkTCL/Tk MotifMotif Mac ToolboxMac Toolbox MFCMFC Java AWTJava AWT
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
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
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
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
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
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
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
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
GroupKitGroupKit
FeaturesFeatures runtime infrastructureruntime infrastructure
manage communicationmanage communication handle interconnectionshandle interconnections
groupware programming abstractionsgroupware programming abstractions RPCRPC shared data structuresshared data structures
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
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
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
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`
QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.
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
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
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
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
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
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
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
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
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
QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.
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
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>
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
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
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
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