Envisage An Extensible Application Framework Martin Chilvers Enthought Inc
What is Envisage? A framework for Extensible Applications 2. Extensible GUI Applications 3. Extensible Scientific Applications
1. A Framework for Extensible Applications Plugin model – load, create, start and stop Plugins contribute to the application – Extension Points Well-defined places to add functionality/data – Application Objects Well-known/shared objects
Extension Points Declarative! Definitions are Python classes class Message(ExtensionPoint): author = Str text = Str Contributions are Python instances message = Message( author = “Martin Chilvers”, text = “The first rule of live demos: never do live demos” ) Stored in the Extension Registry
Application Objects Publish application.publish_application_object( uol, object, properties ) Lookup application.lookup_application_object(uol) Universal Object Locators (UOLs) – URL-like object references – Extensible set of supported protocols
Universal Object Locators Python import – Publish Create Python module – Lookup import://package.subpackage.module.symbol Service Registry ('Yellow Pages') – Publish application.publish_application_object( 'service://Plumber', Plumber(), {'price' : 50} ) – Lookup application.lookup_application_object( 'service://Plumber?price<100' )
An Envisage Application Extension Registry Service Registry Plugi n Application Objects
The Core Plugin Extension Points – Type Manager Adapters Categories Factories Hooks – Runnable Application Objects – Services Type manager(s) Naming
The Naming Service 'White Pages' style lookup – Publish application.publish_application_object( 'enthought/plumbers/fred', Plumber() ) – Lookup fred = application.lookup_application_object( 'name://enthought/plumbers/fred' )
Resource Types How domain types are 'lifted' into Envisage – Metadata – Additional behavior Visualization Serialization etc... Built using type manager – Adapters, Categories, Hooks
The Resource Plugin Extension Points – ResourceManager ResourceType Application Objects – Services Resource Managers
An Envisage Application Extension Registry Service Registry Plugi n Resource Plugin Core Plugi n Application Objects Naming Type Manager Resourc e Manage r
Key Concepts Extension Points (and extensions) – Declarative! Application Objects – UOLs, Service Registry, Naming... Type Management – Adapters, Categories, Hooks Resource Types
DEMO: 'Message of the Day' (MOTD) Application
What is Envisage? A framework for Extensible Applications 2. Extensible GUI applications 3. Extensible Scientific Applications
2. A Framework for Extensible GUI Applications The Workbench – A GUI for a common style of application – IDE-like Windows Perspectives Views Editors Actions – Menubars, Toolbars etc
Workbench Window View s Editor s Action s
Perspectives A set of related views etc – User configurable Support a specific user task (or tasks) – e.g. In an IDE tasks might be Editing Test Generation Debug Source code control Project management etc...
Demo: Perspectives
What is Envisage? A framework for Extensible Applications 2. Extensible GUI applications 3. Extensible Scientific Applications
3. A framework for Extensible Scientific Applications What we have – Text editor – Python shell – Mayavi – SciPy – Profiling – Debugging – Code browser Work-in-progress – Data import/export – Experiments – Materials Database – Distributed and Parallel computation – Scripting/Macro recording
Future Work Expand set of provided plugins Use Python Eggs for plugin loading – versioning/updating etc Documentation...
Further Information – Downloads – Mailing List – Source code repository (svn)