05-830, User Interface
Software, Spring, 1997
Lecture 18, April 30,
1997
Copyright © 1997 - Brad A. Myers
Previous
Lecture . . .
Final Exam Instructions
Component Technologies
Overview
- Andrew Toolkit, OLE, OpenDoc, Java Beans
- Goals:
- Allow different applications to co-exist closely
- Data from one to another be "active", unlike Cut and Paste
- No need for an application to have a viewer for all kinds of data
- Just invoke the right editor
- Allow smaller applications because don't have to implement redundant
functions
- No need for Microsoft Word to implement a drawing program
- PowerPoint and Excel can share a charting program
- Reusable pieces
- Allow applications from different vendors to cooperate
- Concepts:
- Components -- Andrew "Insets" = OLE "Embedded Object"
= OpenDoc "Parts" = Java "Beans"
- Containers -- also called "Shells", "Frames", "Forms", what the
components are embedded in.
- Scripting -- initiate and direct interactions among components.
Might be regular programming in C/C++ or Java, or some kind of scripting
language like Visual Basic, tcl, JavaScript, etc.
- Issues:
- Sharing and Controlling the space: layout
- Sharing and Controlling the menus, which might be global menubars
- Sharing and Controlling the mouse pointer: who gets the clicks?
- "Use" vs. "Mention" problem
- How save contents to a file ("persistence")
- How embed a new kind of object?
- Pick from a list of all possible applications?
- Components register themselves when loaded. (network?)
- Need to dynamically load and link to the code of the new component
- Drag and drop among components, and of components
- OLE: How find out which protocols the component supports?
- JavaBeans: How interface to an Interactive Builder?
Andrew Toolkit
- Previous guest lecture about Andrew
- Main development, 1985-1987
- Goal: embed any kind of editor inside of a text editor (recursively)
- Custom object system in C
- Embedding new kinds of objects: type in the Unix file name
OLE
- Microsoft's technology for components
- "Object Linking and Embedding"
- Quite complicated due to need to be
- backwards compatible
- language independent (multiple programming languages)
- not shared address space
- Somewhat easier if use MFC framework rather than raw C or
C++ calls
- Based on "COM" = "Component Object Model
- also:
- OLE Automation (control app from Visual Basic, etc.)
- Also for spell checkers, EndNote, etc.
- OLE Controls (how create new widgets, especially for use with Visual
Basic
- Query OLE objects to ask them what "interfaces" (protocols) they
support
- Then use the protocols for communication
- Embedded Object vs. Linked Object -- where the "real" data is
- "In-place activation" (not in OLE 1.0)
- Double click to open
- Modifies main menubars
- Renamed "ActiveX", which is a subset designed for use with
the Web
- Allows OLE controls to run inside Internet Explorer 3.0
and for regular applications
- Java (or VB, Delphi, C, etc.) applications in an OLE wrapper
- "Encapsulation" of components
- Only runs on Win32 machines
- Thousands of controls and components available
- http://www.microsoft.com/oledev/
OpenDoc
- From Apple
- Officially "CI Labs" consortium (with IBM, Novell, Adobe, 300 others...)
- Now officially not to be supported by Apple -- moving to Java
instead
- All C++, so easier to use
- True object system with inheritance
- Addresses some perceived shortcomings of OLE:
- Overlapping and non-rectangular shaped frames
- Editing of multiple objects at same time
- Active ("Live") objects
- Better network support (CORBA compliant)
- Claims less development effort than OLE
- OpenDoc provides OLE compatibility
- Apparently renamed to be "Live Objects"
- http://www.opendoc.apple.com//
- http://cyberdog.apple.com --
pretty cool network browser
Java Beans
- Component technology for Java
- Different from Applets, since Applets don't interact with each other
- Takes advantage of features of Java
- Some added specifically to make components easier
- "Platform Neutral" -- fully portable
- Security for untrusted components
- "Java Core Reflection" - for Introspection - to find out what methods
a class supports
- If follow "Design Patterns", then don't have to explicitly specify
the interface
- e.g., GetFoo, SetFoo for the foo property
- "Java Object Serialization" - to store to files ("persistence")
- AWT - for layout and graphics
- Goal: to be simple and small
- Can be easily integrated into a builder tool (and edit exposed properties)
- "Bridge" to OLE and OpenDoc
- Uses CORBA and remote method invocation for networking
- "Real" support for networking and distributed computation
- Each component runs in a separate address space (for security)
- JavaBeans Development Kit (JDK), V1.1 as of Apr'97
- Implements a kind of constraints with property-change-listeners
- Future: Menubar merging
- http://splash.javasoft.com/beans/
Back to 05-830 main page