Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Viewer Stories

On the ProjectIdeasForStudents page I’ve listed a number of suggestions for extending the Apache Isis. Some of the larger projects are around building a generic viewer OOUI in various technologies (Android, JavaFX, GWT, etc).

To help understand what it takes to develop such a viewer, here’s a list of user stories / features. I’ve ordered them in the probable order of implementation.

In addition, you might want to check out the codebase for the wicket viewer. This is the viewer I’ve been working on recently; its design would – I think – make a good basis for any viewers that are web-based.

Bootstrapping & Services
  • bootstrap Apache Isis
    • start the app using the viewer technologies normal mechanism (e.g. from web.xml), but bootstrap Apache Isis in its initialisation
  • application services
    • provide a representation of application services (as registered via nakedobjects.properties file), e.g. as an icon or a link
  • application service actions
    • display the actions for application services, e.g. as links or drop-down menu items etc
  • invoke no-arg action
    • invoke an (application service) action, taking no arguments
Display Entity
  • display entity summary
    • display the icon and title of an entity
    • i.e. resultant from invoking an action
  • display entity properties, read only
    • display the properties of an entity, in read-only mode
    • just handle basic types (integer, string, date, boolean) initially
  • display entity collections, read only
    • display each of the collections of an entity, in read-only mode
  • display actions for an entity
    • render actions available for an entity, e.g. as menu items or links
Invoke Actions
  • invoke action on entity
    • invoke a (no-arg) action for entity
  • display collection of entities, read only
    • i.e. resultant from invoking an action
  • handle actions returning void
    • render a meaningful view for an action returning void
  • render action with parameters
    • display form to capture arguments
    • handle basic types only
  • invoke action with parameters
    • … and handle results using existing mechanisms
  • handle contributed actions
    • ensure contributed actions invoked on contributor (application service), not entity
    • automatically default the contributed entity as an action param
  • combine infrastructure for action arguments and entity properties
    • they’re basically the same thing… scalars
  • validate individual action arguments
    • as per validateNXxx() method for argument N
  • validate all action arguments
    • as per validateXxx() method
Edit Entity
  • display entity for edit
    • editable properties for values
  • editable references
    • allow property or parameter that references another object to be set
    • allow property or parameter that references another object to be cleared
  • entity object-level validation
    • validate object prior to saving, as per validate() method
  • support all built-in value types
    • remaining built-ins, e.g. java.math.BigDecimal
  • action argument defaults
    • when bring up action parameter form, default any action arguments if exist, as per defaultNXxx()
  • action argument choices
    • in action parameter form, display choices for parameter if exist (as per choicesNXxx()]
  • entity property defaults
    • when bring up entity edit form for newly instantiated entity, default any properties if exist, as per defaultXxx()
  • entity property choices
    • in entity edit form, display choices for property if exist (as per choicesXxx())
  • support any value objects for action parameter or entity property
    • Support all value types (as per @Value annotation), so long as are parseable/encodable
  • handle actions returning values
    • display “results” (a meaningful view) for an action returning a value
  • recent references
    • For action parameter form for reference parameters, provide drop-down of recently-used entities of correct type
    • For entity properties form for reference properties, provide drop-down of recently-used entities of correct type
Entity Collections
  • lazy/load entity collections
    • Lazy load entity collections rather than eagerly load
  • load only small part of the objects in the collection (e.g. icon + title)
    • so the collection of 100 elements won't lead us to load 100 complete object just to select the only one
  • add/remove from entity collection
    • allow entities to be added to or removed from collection if not @Disabled
  • validate add/remove from entity collection
    • validate entities being added to or removed from entity collections, as per validateAddToXxx() and validateRemoveFromXxx()
Other
  • process objects
    • handle actions returning transient objects
  • immutable
    • do not allow editing of immutable objects
  • deal with multi-threading
    • ensure multi-threading concerns dealt with (e.g. NakedObjectsContext implementation if required)
  • error handling
    • handle various errors conditions, e.g. optimistic locking
  • extensibility
    • allow new renderers for properties, for entities, for values