Page History
...
These interfaces and classes are in magnolia-ui-framework. The implementation AppController and the location handling are in magnolia-ui-admincentral.
Proposed Implementation
From An App Developers perspective
Approved Steps currently in development
- Convert abstract *Apps (AbstractApp, AbstractSubApp, ...) to concrete classes (BaseApp, BaseSubApp, ...)
- Interface for AppFrameView (AppView), inject interface into BaseApp
- AppView.Listener implemented by AppContext -> listens to AppView events
- remove tab dependency from events
- Remove vaadin dependencies from AppContext
- Rename AppContextImpl ->AppInstanceControllerImpl
- AppInstanceControllerImpl implements two interfaces:
- AppContext for contextual information relevant for the app
- AppInstanceController exposing the contract to the AppController
- AppController: use AppDescriptorRegistry instead of AppLauncherLayoutManager
Missing:
- info.magnolia.ui.framework.app.AppController#getCurrentAppInstanceController
- should go
- javadoc
- Create app framework specific interfaces for e.g. AppView, SubAppView
- SubAppView interface is still missing
- stop method in subapp
Maybes
- remove vaadin dependencies from magnolia-ui-framework
- Move info.magnolia.ui.framework.view.View into vaadin-integration
Additional Information
Documentation
...
Here's the key types and our thoughts about them:
App
Currently the AppFrameView is created and managed by the AppContext. We are using abstract classes where not really necessary. So we end up creating App classes extending AbstractApp, only because the class is abstract.
Inject AppView (interface of AppFrameView) into BaseApp. make start return AppView.
add tab etc to the app, delegate to appframeview from there. get rif of frameview dependency from appcontroller and appcontext.
do not make appContext a listener of appFrameView. app is listening to events and delegates to appContext. get rif of magnoliaTab dependency in the AppFrameView.Listener
...
Overview
Type | Location | Status Quo | Proposed Action |
---|---|---|---|
AbstractApp
| info.magnolia.ui.framework.app | abstract but many subclasses (e.g. PagesApp, MessagesApp) don't add additional functionality | convert to non-abstract type & rename to BaseApp. Get rid of most subclasses. Inject the AppContext and App(Frame)View directly into the AbstractApp instead of passing it from the AppClass. |
we can simplify the AppContext and remove the dependency on AppFrameView.
Rename AbstractApp to BaseApp.
AppController
The AppController is in general in a good shape. Interface is well defined and usages are legit.
AbstractContentApp | info.magnolia.ui.admincentral.app.content | see AbstractApp Used for opening the ChooseDialog. A relict from the time we had the workbench definition bound to the App. | Remove class and create an interface for ChooseDialog The idea of this class was serving the workbench configuration, as this has moved to the subApp there is no real usage for this class. The logic in there for serving a ChooseDialog hould be moved to an interface, so that the actual implementation of opening the Dialog is up to the App and not bound to the framework. |
AbstractSubApp | info.magnolia.ui.framework.app | see AbstractApp | convert to non-abstract - e.g. PageMainSubApp could go |
AbstractItemSubApp | info.magnolia.ui.admincentral.app.content | see AbstractApp | convert to non-abstract- e.g. ContactsItemSubApp could completely go then |
AppController |
...
The App controller that manages the lifecycle of running apps and raises callbacks to the app.
|
...
|
...
Open Issues
...
|
...
|
...
|
...
|
...
|
...
|
AppContext |
...
Abstract
The AppContext serves multiple different purposes:
|
...
| The general problem: used heavily by the appController and also for the app itself to get contextual information: serving multiple needs. see
Should not be depending of any vaadin dependencies.
|
...
AppContextImpl |
| ||
SubApp | All SubApp's are considered to be equal. We can flag one (or even more) to be the default - that's the one that will be opened first and that won't be closable. |
| |
SubbAppContext |
...
Basically in good shape - just offers a little too much. |
Abstract
The SubAppContext serves multiple different purposes:
Open Issues
Eliminate methods only relevant for the implementing types - not for someone writing an app. Basically we should question all setters on this interface.
|
...
AppDescriptor |
Basically in good shape
Abstract
SubAppDescriptor |
simply used for |
...
config |
Open Issues
| |||
AppFrameView | info.magnolia.ui.admincentral.app.simple | Used to give Apps a consistent view. Holds a MagnoliaTabSheet and a Listener interface which makes the AppContext dependant on MagnoliaTabs. |
|
Thoughts from first review
- we should try to extract locationManagement
3) AppContextImpl
-> find better name, it's more than an Impl of an AppContext
-> one option (Tobias' propsal): rename AppController -> AppManager & AppContextImpl -> AppController
4) AppLauncherLayoutManager
- only the AppLauncher should use it
5) structuring of modules: admin-central & framework: check whether AppContextImpl can to framework
-> frist streamline the interfaces
6) Should Main Subapp be an explicit type - we don't want to be able to overwrite.
7) Security App: this is the most exceptional one - will it be split into several apps or not? If yes, we could App Framework could be simplified even more
Next Steps:
Espen & me will do some further investigations, prepare better concept with clear decision points and contact u again for review - we won't do any coding for before then.
Tasks
Jira | ||||
---|---|---|---|---|
|