Member-only story

Why You Should Use DDD App Architecture To Learn Flutter

Fred Grott
4 min readJun 21, 2022

--

It might seem that Domain Driven Design and Clean Architecture are the same, as they both center focus on a domain layer. But they are not the same. In clean architecture, we have to implement an observable in use cases to communicate with the business logic layers. In DDD, we have no such need to do that observable boilerplate.

You do not see yet, in other words, it’s easier before we touch RxDart to use Domain Driven Design to learn Flutter since we then never have to create a use case class and worry how to implement an observable for that use case class!

How To Begin Learning Flutter By Using DDD

Okay, since DDD does not have a use case with the need to implement an observable to implement a command pattern, we can have a simpler approach for beginning flutter app designers with lower class cycle complexity. But lets’ make it even easier by breaking it up into packages.

Due to being able to specify a string package name in font and asset declarations, we can separate both domain and presentation into their own packages. A typical pubspec of package has two additional lines at the top:

--

--

Fred Grott
Fred Grott

No responses yet