Replies: 1 comment
-
|
Hey! Thanks for the feedback. I guess we couldn't easily let go of them managers... Also, when we started flutter we couldn't decide what state management tool to use so we resorted to singleton managers. After some time, we started using Bloc for the UI layer of the app only and high-level services, like managers and repositories, for the domain layer. Our goal was to keep frameworks and external state management tools out of the domain layer because of the complexity that comes with it - library updates, maintenance, learning curve, features from the framework that we don't need, etc. We just didn't need a state management tool for that. This may be a strong personal opinion of mine, but I find it cleaner this way. As for the singleton pattern, we agree, it's a bad practice that we cling onto. However, our code pattern is not very different from the example you provided. We also have Repositories, but they don't provide change listeners so we wrap them in Mangers that provide listeners and also some features/use-cases that would go in a bloc. So, Bloc is great, but I guess we just didn't want to embed a framework in our app's core. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
guys nice project but after I review the code its seems like its not fully bloc.
for example usermanager.. the programming community past the period of "managers" and also use it as a global listener and singleton its not good idea.
here is dummy example for authentication
https://github.com/TaeBbong/bloc_login
Beta Was this translation helpful? Give feedback.
All reactions