Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The current packaging needs to be rethought. This is to be tackled in a separate effort (See Concept - package reorganisation concretes).

Design

We should finalize the API in terms of finding the right level of abstraction. The API should guide the app developer and not expose internals.

App Framework

The framework is a set of interfaces and abstract utility classes that assist by implementing an app - see Wiki Page explaining the App Framework for details.

These interfaces and classes are in magnolia-ui-framework. The implementation AppController and the location handling are in magnolia-ui-admincentral.

Key interfaces

...

Action: Clean upp AppContext and SubAppContext from methods used internally only. 

AppController

References

Abstract

...

  • The AppController takes care of LocationChangedEvents coming from info.magnolia.ui.admincentral.app.simple.AppControllerImpl#onLocationChanged which can for example be fired by the info.magnolia.ui.framework.location.LocationController#goTo when clicking on icon in the AppLauncher. It takes the Location passed and extracts AppName and subAppId and gets the corresponding AppDescriptor from the info.magnolia.ui.framework.app.launcherlayout.AppLauncherLayoutManager.
  • It creates a new AppContext for the App
  • keeps history of running app and currently focused app
  • used by the MagnoliaShell to query the current Status of the appController
  • Used by FieldBuilders to get the AppContext and ComponentProviders for opening ChooseDialogs.

...

Open Issues

The AppController is in general in a good shape. Interface is well defined and usages are legit.

...

info.magnolia.ui.admincentral.app.simple.AppControllerImpl#onLocationChanged
too heavy, should delegate to methods rather, see focusEvent

AppContext

References

UML

Abstract

The AppContext serves multiple different purposes:

  • An app uses the AppContext to interact with the App Framework. Some examples:
    • resolve the configured App Label for setting the correct title in the tab.
    • send notification Messages to the MessagesManager
  • The AppController uses it to delegate handling of location changes and to the app and subApp
  • Takes care of reading subApp configurations and mapping locations to to the correct subApp
  • creates both componentProviders for App and subApp

Open Issues

There is definitely room for improvement in this class. 

...