Flutter without the Big Ball of Mud

Tiger asks … how do I build an app that remains maintainable?

Tiger Asks...
29 min readJul 20, 2024

This is part 7 in my “Flutter from a complete beginner” series. In this post, we will finally ditch the demo app, add a first meaningful service to our application and connect it to a fresh new UI.

This sounds simple, but because the goal is production-ready code and not some quick hack, there’s quite a few thoughts that have to go into this task.

At the end of this post, we should have a clean architecture for our flutter app and understand how providers stitch everything together.

Enforcing that architecture, is going to prove a bit problematic, as Dart / Flutter simply does not seem to have the tools necessary to do so.

We can however, enforce that all our packages only have acyclic dependencies. Although again there seems to be no tool at this point that does it across packages.

But first things first.

The Big Ball of Mud

What is a Big Ball of Mud?

First introduced in Foote and Yoder’s 1997 paper, they explain:

A Big Ball of Mud is a haphazardly structured, sprawling, sloppy, duct-tape-and-baling-wire, spaghetti-code jungle. [These systems] show unmistakable signs of unregulated growth, and repeated, expedient repair. Information is shared promiscuously among distant elements of the

--

--

Tiger Asks...

🇨🇭-based Software Engineer with a lot of questions and some answers.