Versions Compared

Key

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

...

Reasons to botherWhat changes

Vaadin 8 brings in new concepts to the data binding

  • no more Item abstraction → no more JcrNodeAdapter
  • no more Container → no more JcrContainer

DataProvider

  • Container concept replacement: interface for querying the data from a datasource
  • Works with domain objects (e.g. JCR Nodes) instead of Items
  • Stateless by design (one can implement caching manually though)

PropertySet

  • Item concept replacement
  • Unlike Item is more or less stateless component itself - only describes how to interact with the domain object to access [and modify] its properties via funtional primitives (lambdas), e.g. via bean getter/setter method references.

Benefits

  • Simpler and slimmer way to connect to the datasources
  • Less memory consumption (no additional abstractions over the domain objects)
  • Easier to implement various providers (REST, ORM...)
  • Supposedly better implementation hierarchical data providers

Concerns

  • (warning) DataProvider still requires item indexing API
  • (warning) Size query API still needs to be implemented (bummer for JCR list views)
  • (question) Observation of the DataProvider changes is still to be drafted!

Complex fields

...

value transformers

...

Content change events

Reasons to botherWhat changesOutcome

Quirky way of communicating the data source changes

  • Requires manual actions of both sending the events and handling them. I.e. if I change smth in JCR and forget to send CCE, no one will ever know.
  • Apps that are not related to the changed data source still have to handle its CCE and see if they should react (hence ContentConnector#canHandleItem).

We should try to expose the data source observation utilities and subscribe to them where needed.

  • e.g. we have already the JCR observation mechanism that Vaadin's DataProvider can subscribe to in this or that way and just push the change notification to the UI automatically.
  • Whenever we change smth in the data source the UI is notified eventually.
  • For the data sources that do not have real time observation, we could easily provide a timer-based implementation that merely refreshes the UI periodically.

Benefits

  • Clear and re-usable data source observation mechanism.
  • Less boilerplate for the app developers

Questions

  • (question) Need to provide un-registration strategy. For some cases a mere weak-hashmap solution might work (question). We though should also make sure that once the view is dead, no observation left-overs are still hanging around

...

I18N support in

...

dialogs

Column definitions

Complex fields

...