svthalia / Reaxit

The latest ThaliApp built on Flutter.
GNU General Public License v3.0
11 stars 3 forks source link

Switch to concrexit api v2 #41

Closed DeD1rk closed 3 years ago

DeD1rk commented 3 years ago

Self-explanatory. For most api's this is only a minor change.

DeD1rk commented 3 years ago

I was just thinking that since api v2 will probably have pagination everywhere, and will allow for many new features such as committee pages, we may want to consider introducing BLoC (or maybe some other framework, but BLoC is very common and well-supported for flutter, and similar to how we work now) to separate our api stuff a bit more. For instance instead of a single MembersProvider it makes more sense to have a separate MemberList BLoC and Member BLoC. This could have quite large advantages if we expend the app with new pages (e.g. more fine-grained control about when stuff loads or widgets rebuild, giving better performance), and although we would have to get used to a the pattern, I think it would probably also increase maintainability. The switch to api v2 would be a good time to do this, as we would probably want to rewrite quite some stuff for the pagination (we'll need to switch all of the Future<List> and similar things to use streams anyway. This would not need to be done before the first release, as I don't think we really need to use pagination yet. However we could do it already if we don't mind pushing the release forward a bit (imo it would be fine to do so as long as we release before the covid stuff ends, so hopefully in the summer).

This would be a rather large change, and I can imagine that using BLoC may not be very tempting, so I think we should discuss this idea some time.