carp-dk / carp-dk/carp_study_app

Architectural Review of app

Open
#479 1 comment 1 reaction 1 assignee Claimed by @bardram View on GitHub
Dominant language
Dart
Stars
10
Forks
5
Avg merge
1d 5h
Merged PRs (30d)
13

Description

Right now the app is a mixture of a BloC and MVVM architecture - and its getting increasingly complex in terms of business logic. Hence, we should revise the architecture.

These articles are good inspiration:

* [Migrating to MVVM from BLoC in Flutter: A step-by-step guide](https://medium.com/gitconnected/migrating-to-mvvm-from-bloc-in-flutter-a-step-by-step-guide-1e987f45d2c1)
* Flutter's [Guide to app architecture](https://docs.flutter.dev/app-architecture/guide)

We should follow the [recommendation](https://docs.flutter.dev/app-architecture/recommendations) on how to structure a Flutter app and use this as a checklist.

In particular, we should improve the following:

* Get rid of the BLoC pattern and use a strict MVVM structure
* Use the [provider](https://pub.dev/documentation/provider/latest/) package incl. [`ChangeNotifier`](https://docs.flutter.dev/data-and-backend/state-mgmt/simple#changenotifier) and the `context.watch()` constructs
* ... but be careful to keep the stream-based builders
* Reorganize the data layer into repositories and services
* Consider a business logic layer (where the logic from the BLoC goes)
* Use the [command pattern](https://en.wikipedia.org/wiki/Command_pattern)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.