Skip to content

Context

Dima Enns edited this page Feb 13, 2021 · 3 revisions

In the rest of the wiki you can read all about the internals of BFF.DataVirtualizingCollection. This will be about the context the package is set in.

Context

The context can be roughly divided into two relationships. Firstly, the virtualized collection is bound to a UI control. On the other hand, it needs a way for the virtualized collection to load pages when necessary and to determine the number of virtualized elements.

UI control

I personally develop BFF.DataVirtualizingCollection for WPF. Technically it should work with all UI frameworks that use IList, INotifyCollectionChanged and INotifyPropertyChanged. So to my knowledge it should also work with UWP for example. In UI frameworks which use binding thanks to the three mentioned interfaces and loose coupling of the bindings neither the controls have to know that they are working with BFF.DataVirtualizingCollection nor the other way around.

Nevertheless, this package is primarily developed for WPF. I will not go to great lengths to support exotic UI frameworks or controls.

On the other hand I heard that UWP offers much better support for data virtualization thanks to the IItemsRangeInfo and ISelectionInfo interfaces. Unfortunately there was no opportunity to play around with UWP and these interfaces yet.

Backend

For BFF.DataVirtualizingCollection a backend can be everything that can provide a page and count fetcher. For example, this can be a database that provides the page and count fetcher through an OR mapper.But the backend could also be all months of DateTime or other virtual data sets. That means a backend can be anything from which you can determine the amount of data and request arbitrary data chunks.

The fetchers are handed over as functors. This means that BFF.DataVirtualizingCollection can call the backend directly without the backend having to implement certain interfaces or know about BFF.DataVirtualizingCollection in any other form.

Clone this wiki locally