Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

3rd iteration of BI SP1

Honza Bittner edited this page Jun 1, 2018 · 8 revisions

What we have learned

Flutter architecture samples

For our application, we have used the BLoC architecture, where the view and controllers are separated and all comunication is done using streams and sinks.

For that to work, we had to used InheritedWidget in Flutter, so we don't have to use some antipatterns like singletons or static properties. But using only InheritedWidget wasn't enought, becouse our controllers wants to preserve some data, which can be removed while hot reload. To keep our data, we have used the inherited witget patter from https://github.com/brianegan/flutter_architecture_samples, and now, we are storing a new stateful widget which keeps all the data and controllers inside the InheritedWidget, so the data are not lost while hot reload.

Fixing this issue was critical for our developement, because otherwise whole app crushed, because the retreived data were just null.

Google Play release

Releasing the app on Google Play might sound as an easy task. But it wasn't, at least with no previous experiences. For releasing even the basic app in beta mode, you have to provide a lot of data, pictures etc., which might be kinda anoying, if the only task you have is to simply be able to test the app from the Google Play.

After filling all the data, the first issue have born. The Flutter release app version didn't work on any device, the test have shown 10/10 fails. It turns out, that the release process was broken for some reason, so I have created an issue on Flutter's GitHub and it was nice to see how quickly the Flutter developers reacts to their issues. After a quick investigation, they found out that some wrong code was pushed to the master channel, so they reverted it and everything went back to normal.

Firebase

It turns out, that Firestore might not be the right tool for us. NoSQL databases are for sure fancy, but the lack of advanced search and querying was something we really missed. In the next chapter of the development, we might either learn how to work better with it or use some SQL database. Both of the ways has benefits for sure, we just have to determine first what is best for us.

Deployment

The project has been written in Dart with AngularDart and Flutter frameworks. This makes project deployment very simple because we don't have to do much changes to build configuration.

Make sure you have Dart 2 installed (dev channel).

To set up AngularDart project, you have to move into angular/ directory and run pub get command to download all dependencies. Then, for building the application, run pub run build_runner serve --config=release.

$ pub get
$ pub run build_runner serve --config=release

This will generate .js, .html and .css files + assets that you can use to deploy to the web server.

To build release version of the application for Flutter, first clean all generated files using flutter clean. Then you can download packages using flutter packages get, or simply run the build command which makes sure the packages are up to date using flutter build apk for Android.

$ flutter clean
$ flutter build apk

This will create the .apk file which is a binary file for Android.

BI-SP2

The project continued as a part of a software team project 2 at the Faculty of Information Technology, CTU in Prague.

For the purpose of this course, we have to produce some content for each iteration.

BI-SP1

The project started as a part of a software team project at the Faculty of Information Technology, CTU in Prague.

For the purpose of this course, we have to produce some content for each iteration.

Clone this wiki locally