The browser:tool directive

The '' directive

Status

Author

JimFulton, AnthonyBaxter

Background

Starting at the second OzZope? sprint, the site-management user interface is evolving to become more task oriented. There are three broad tasks that site managers will be able to perform:

  • Management of tools

    Tools unify services and utilities, along the lines of CMF tools. They are purely a UI concept. There are no "tool" objects. Site managers manage tools by managing their services and utilities in logical groups. Services define one fixed group. Other groups correspond to kinds of utilities, such as database adapters, catalogs, vocabularies, and so on.

  • Management of software

    Developers and site managers manage objects in site-management folders. Developers are the main audience, as they use site-management folders to contain software artifacts like modules and templates.

    It also happens that tools created while managing tools are created in site-management folders too, although site managers may not care about that.

  • Management of types

    We will provide a user interface for browsing the types known by the system, including all of the configuration for those types. It will be possible to change the system configuration in a type-centric way. This facility is in the spirit of the CMF types tool, but will be more comrehensive.

As the title of this proposal suggests, the focus of this proposal is on tools.

As mentioned above, tools are simply catagories of services and utilities, where services are a fixed group. We want to define other groups as collections of utilities (and utility factories).

Given the definition of a collection of utilities, we can automatically generate a UI for managing utilities in a group.

For example, we can define a "Database Adapter" tool. All database adapter utilities are database adapter tools. When a site manager elects to manage tools, they'll be presented with a page that lists the tool types, including "Database Adapters". If the site manager selects "Database Adapters", they'll be shown a user interface for viewing, navigating, adding and removing database adapters. If they elect to add a database adapter, they will be shown a menu of all of the database adapter factories.

Proposal

We create a new '' directive, to allow the definition of tool types. A couple simple example to illustrate:

        <browser:tool
            interface="zope.app.interfaces.rdb.IZopeDatabaseAdapter"
            title="Database Adapters"
            description="Database Adapters provide connectivity
                         to external relational databases"
        />

This allows us to automatically generate views in the site manager to show tools of a given type, to compute a list of tool types (along with some descriptive text), and to build an add screen for a given tool type.

The add screen will provide a list of factories that implement the interface for the selected tool - this requires the refactoring to manage interfaces via the Utility service.

Further, when someone adds a utility to a site-management folder, and the utility implements a tool interface, the tool interface (the first if there are more than one) is selected in the utilility-configuration UI.

Design notes

So, what happens when someone uses the '' directive?

We generate:

  • A contents view on the site manager that lists the utilities of the given type. For each item, we display some descriptive info. We also provide:
    • The component name
    • Check box, indicating/controling whether the component is active.

    If only one component (99% case) is registered for the given name, we show:

    • Link to component instance

    If there are more than one component registered:

    • Link to a configuration UI

    The contents view allows delete, copy, paste, and rename of tools.

    The contents view also allows adding of tools. To accomplish this, it uses a custom adding described below.

  • A custom adding view that filters on tool interface to sllow adding only of utilities of the given tool type. When the user adds a tool, we create a utility instance in a destination folder. (see below) and create a registration with the given name. If the destination folder doesn't exist, it will be created.

    The default destination folder is named "tools". A folder attribute can be provided in the tool directive to specify an alternate folder name. This would, for example, allow collection of all database adapters created through the tool-managemnt UI to be created in a separate folder.



( 98 subscribers )