340 likes | 448 Views
Software Tools, Part 2. Fall, 2002. Overview. Toolkits Prototyping Languages Frameworks Groupware Frameworks GroupKit THYME Wrap Up. Toolkits. Ease development by providing fully-fleshed out UI widgets A UI component has two major parts The UI presentation (a button)
E N D
Software Tools, Part 2 Fall, 2002
Overview • Toolkits • Prototyping Languages • Frameworks • Groupware Frameworks • GroupKit • THYME • Wrap Up
Toolkits • Ease development by providing fully-fleshed out UI widgets • A UI component has two major parts • The UI presentation (a button) • The outlet (how the program is informed when the button is pressed)
Toolkits • TCL/Tk • Motif • Mac Toolbox • MFC • Java AWT
Toolkits • Disadvantages • does not necessarily contain all the functionality you need • constrained by the programming model • motif and pseudo-objects • AWT and layout managers • toolkits can be specific to a language • AWT and Java • TCL/Tk and TCL
Prototyping Languages • By hiding programming details, a developer can build a functional prototype quicker • Hidden details • memory allocation / garbage collection • UI • flow control
Prototyping Languages • Java • Application / Applet language • Cross platform. Intent is that all applications act the same on all platforms • Hypercard • Movement between Cards (screens) • Tcl/Tk • Scripting language
Prototyping Languages • The final prototype unsuitable for a released product • speed • memory footprint • Interface to external libraries can be difficult (but is usually possible) • JNI for interfacing to C libraries from Java • SWIG for Perl
Toolkits and LanguagesThe Message • Toolkits provide UI widgets that can be used to develop the application • This lets the developer focus on building the application, instead of the widgets • Prototyping languages allow the rapid development of prototype applications, but can entail trade-offs
Frameworks • My definition: Frameworks provide structure for the developer to build an application around • Other definitions: • MacOSX frameworks (i.e., Cocoa, Carbon) as object oriented libraries • Often synonym for toolkit
Groupware Frameworks • Provide the infrastructure for building groupware • UI Toolkit • Messaging / Networking / etc • Discovery • Other features • transcription • analysis
GroupKit • Roseman and Greenberg, 1995 • TCL/Tk framework for building distributed, synchronous groupware • Room-based, called conferences, handled by the session manager
GroupKit • Features • runtime infrastructure • manage communication • handle interconnections • groupware programming abstractions • RPC • shared data structures
GroupKit • Features • groupware widgets • multi-user scrollbar • shared whiteboard • telepointers • session management • discovery of sessions • grouping of users
THYME • flexible • the developer should have access to the infrastructure, not be limited by it • extensible • the developer should be able to add infrastructure • introspectable • the developer should be able to extract contextual information • consistent • patterns and structure
THYME • component model • driven by communication between components • developer’s work involves writing new components which communicate to other developer written components and existing, infrastructure components • infrastructure follows this component model, no special cases
What You Get • my-project-base • contains thyme-core • chats - the THYME Chat Room • swab - the THYME Shared Whiteboard • abs - the THYME Build System • my-project - your stuff goes here • building everything involves `make` or `ant`
What You’ll Do • add your components and message source code to my-project • the room • the client • add your component specifications to my-project • run your application • collect data
Anatomy of a Component • a component is the functional piece of THYME application • uniquely identified • sends and receives messages • lifecycle • on<Stage>() methods • infrastructure • taken care of for you • functional • your responsibility
Reference Ids • An Id uniquely points to a component • Contains a classid and an instanceid • the classid is specified in the specification file • the instanceid is developer specified • the combination of instanceid and classid is unique within a Node • An Id is never constructed by the developer, it is obtained via the Id manager
Obtaining a Component • A given Id always references the same component. There is no difference between obtaining and constructing a component • No direct construction (i.e., you will never call new MyComponent()) • You should pass around an Id, not a component • How it works • obtain an Id that represents the component • obtain the component manager • request a new component
Messaging • THYME provides simple semantics for communicating between components, local or remote. • No RMI / RPC (yet) • A message object is constructed and sent to a specified component • A component is informed of a new message via the receive() method
Lifecycle • Lifecycle stages exist to provide a granular set of post-constructors • Extensible, but don’t bother here • Cumulative and ordered • i.e., setReady() on a constructed component will call onInit() and onReady(), in order • 3 methods • set<StageTransition>() is called on the component and causes a transition is • <Stage>() is called on a component and returns a boolean • on<Stage>() is implemented in the component and called appropriately
Lifecycle • Stages (in order) • constructed • initialized • ready • shutdown • Transitions • constructed + init = initialized • initialized + ready = ready • * + reset = initialized • * + shutdown = shutdown
Transcription • Transcription is performed by collecting messages that are sent between components • Transcript is optional, a message can be ignored by setting setTranscribe(false). • Transcribed messages are set the transcription service, which exists within a separate VM
Running Your Application • Each component exists in exactly one container component, called a Node • The Node brokers the component for discovery and ensures that addressed messages get to it • Each Node exists on exactly one host, although one host can have multiple nodes
Running Your Application • To run your application, you need to • tell the node what components it might need to create and use • instantiate at least one component to start the application going • pass control to that component
Running Your Application • Each application has a specification file, which provides these elements <?xml?> <system> <init class=“some.class”/> <blocs> <bloc id=“an-id” class=“the.class.for.id”/> </blocs> </system>
Discovery • I start up a chat room client, how do I get a list of all chat rooms I might want to connect to? • Explicit, specify the room on the command line • Implicit, talk to the registrar
Registrar • The node registrar provides a list of all Nodes that have been registered with it • Each node can be introspected to get a list of components that it contains • The list can be searched for matching criteria • All this is encapsulated by the THYME find manager component
Wrap Up • Specification Methods • grammars, transition diagrams, state charts, UAN • Interface Building Tools • rapid prototyping • Evaluation Tools • Toolkits • Frameworks • GroupKit, THYME
THYME Resources • Email • thyme@cs.brandeis.edu • IRC • irc://group.cs.brandeis.edu #thyme • Webpage • http://group.cs.brandeis.edu/thyme • JavaDocs • http://group.cs.brandeis.edu/thyme/api • Manual • http://group.cs.brandeis.edu/thyme/manual