reactiveui / rfcs

RFCs for changes to ReactiveUI
https://reactiveui.net/rfcs
5 stars 5 forks source link

RFC: Make ReactiveList obselete and promote DynamicData #10

Closed glennawatson closed 5 years ago

glennawatson commented 5 years ago

This relates to https://github.com/reactiveui/ReactiveUI/issues/1372

Summary: Move the ReactiveList based series of classes to the Legacy namespace and mark them obsolete and direct them to the DynamicData (DD) github page.

Reason: The ReactiveList classes are getting a bit clumsy and the DD framework is much more powerful. It has a API more inline with the Rx style of doing things. Roland Pheasant is also very active on the project. By making ReactiveList redundant it will allow the core developers and contributors to focus on the more critical functionality.

Side effects: The potential side effect is projects relying on the ReactiveList. Although the ReactiveList will still be available it's not immediately straight forward how to do the conversion. Also can be a impact on @RolandPheasant with a increased user base.

glennawatson commented 5 years ago

This change is happening in the next few days.

RLittlesII commented 5 years ago

@glennawatson @RolandPheasant Is there any current documentation on how to get users from ReactiveList to Dynamic Data? If so, lets make sure it's visible and readily accessible. If not, is there any way we can draft something that we can provide to consumers on the differences? I know Dynamic Data has documentation, but to Glenn's point, conversion shouldn't be a labored effort where our users are stuck for hours scratching their heads.

xplatsolutions commented 5 years ago

Documentation was my caveat when I tried to convert current project where ReactiveList behave strangely with DynamicData. It would be great to create a sample project to demonstrate usage.

glennawatson commented 5 years ago

https://github.com/RolandPheasant/DynamicData/wiki/Introduction-for-ReactiveUI-users is some documentation that Roland prepared a while back.

GitHub
RolandPheasant/DynamicData
DynamicData - Reactive collections based on Rx.Net
cabauman commented 5 years ago

We should definitely make sure users see that article.

sushihangover commented 5 years ago

Documentation was my caveat when I tried to convert current project where ReactiveList behave strangely with DynamicData. It would be great to create a sample project to demonstrate usage.

I'm looking at upgrading an "old" Xamarin.Android-based ReactiveUI and due to the obsolete nature of ReactiveList and that there is no "legacy" version of ReactiveRecyclerViewAdapter/ReactiveList (have to use IObservable<IChangeSet> now), I'm really confused on how to re-structure this app to use DynamicData, so:

Are there any sample projects using Xamarin.Android ReactiveUI/DynamicData? TIA...

glennawatson commented 5 years ago

Jump on slack https://reactiveui.net/slack and join the #ReactiveUI channel. Someone can help you adapt your project there.

You can still use ReactiveList with theReactiveRecyclerViewAdapter

There is a second generic class with the signature ReactiveRecyclerViewAdapter<TViewModel, TCollection>

so you can derive off ReactiveRecyclerViewAdapter<MyViewModel, ReactiveList<MyViewModel>>

That will call the DynamicData overload ToObservableChangeSet<TCollection, TViewModel>() -- this will essentially convert existing collections into a IObservable<IChangeSet<T>>

Create Account | Slack
glennawatson commented 5 years ago

That overload class can handle any collection derived from ICollection<T> and INotifyCollectionChanged btw, so if you're doing single threaded collection changes you can use a ObservableCollectionExtended<T> when ReactiveList goes away.