Recently, I received a task to build a shopping app prototype using Dart + Flutter. The main requirements were to use the real-world e-commerce API of free choice, implement lazy products’ loading and caching, build products and their details page. All the other implementation details were left up to me, hence I had to decide on the app architecture, state management solution, third-party packages, etc. So in this article, I will reflect on my choices, challenges and other details while implementing a production-quality prototype.
In the last article, I have analysed a behavioural design pattern which enables loose coupling between the sender of a request and its receiver — Chain of Responsibility. In this article, I would like to analyse and implement another behavioural design pattern that lets you separate algorithms from the objects on which they operate — it is Visitor.
Previously in the series, I have analysed a structural design pattern that introduced a concept of a “shared object” which could be used in multiple contexts simultaneously, hence reducing the memory usage of your code — Flyweight. This time I would like to represent a behavioural design pattern, which enables loose coupling between the sender of a request and its receiver, also adding a possibility for the same request to be handled by multiple handlers — it is the Chain of Responsibility.
In the last article, I have analysed a creational design pattern which divides the construction of a complex object into several separate steps — Builder. In this article, I would like to analyse and implement a structural design pattern that helps using a huge number of objects in your code which could barely fit into available RAM — it is Flyweight.
When I started my journey in the Flutter world, I have learned the basic UI concepts just enough to build a simple application. State management, code structure, architecture, appliance of OOP design patterns — these topics are more interesting to me, so I have dived deeper into them. However, the majority of developers choose Flutter for its UI capabilities.
There are lots and lots of tutorials, articles out there on how to make custom UIs, applications using Dart + Flutter, but the majority of them covers only the HOW part (how to implement a specific component, animation, etc.), but usually the WHY part (why is it implemented in a certain way) is left somewhere else. This article covers the whole thought process on how to convert the design into code: explains HOW to do it and WHY it is done like this. …
Previously in the series, I have analysed a relatively complex, but very practical and useful structural design pattern — Bridge. This time I would like to represent a design pattern, which divides the construction of a complex object into several separate steps. It is a creational design pattern called Builder.
In the last article, I have analysed a structural design pattern which provides a way of changing the skin of an object without changing its guts — Decorator. In this article, I would like to analyse and implement another structural design pattern that tends to be relatively difficult to understand compared to the other design patterns, but at the same time is practical and useful — it is Bridge.
Previously in the series, I have analysed a relatively simple, but very practical design pattern — Proxy. This time I would like to represent a design pattern, which, unlike the Strategy design pattern, extends the functionality of an object instead of exchanging it. It is a structural design pattern called Decorator.
In the last article, I have analysed a relatively simple design pattern comparing to the other patterns in the series — Prototype. In this article, I would like to analyse and implement a structural design pattern which is very practical and could be used in a lot of cases when developing applications with Dart and Flutter — it is Proxy.
Previously in the series, I have analyzed one of the behavioural design patterns — Memento. This time I would like to represent a relatively simple design pattern comparing to the other patterns in the series which belongs to the category of creational design patterns — the Prototype.
About