Flutter & Dart: SOLID Principles and Top Design Patterns
- Descrição
- Currículo
- FAQ
- Revisões
We all want to become better software developers and be able to call ourselves “Software Engineers” or “Software Architects”, but to do that you first have to master a number of design patterns.
This course will put you on a track to that destination.
We will teach you how to recognize when to use specific design patterns to build complex systems in a divide-and-conquer manner so that complexity is reduced and abstracted.
But rather than learning all the design patterns out there, we have curated the most important, the top fundamental GoF Design Patterns for you.
All of that in the context of the Flutter Framework using Dart.
We start with full understanding of the S.O.L.I.D Design Principles and how they in turn relate to those design patterns. We eplain everything in the context of real-wprld problems as well as specific code examples.
At the end of the course you will get to Architect a solution by coding John Conway’s Game of Life simulation which will run on your mobile device.
Complex software systems are plagued with three major issues:
-
Timelines are stretched as requirements change.
-
Multiple developers have a hard time coordinating their efforts.
-
Code redundancy.
This in turn creates issues with maintenance and overall flexibility for adding new features. In general this means poorly designed systems that are hard to maintain and are not adaptable.
One answer to all the above problems is having a proper design and architecture. Think of a skyscraper being built. There is always a high-level blueprint. This blueprint is used to show everybody involved (from architects to supply chain to construction workers to machinery scheduling etc…) what is being worked on.
Everybody understands and follows the same vision.
A blueprint has a number of commonly understood elements which repeat themselves across many projects. For example all buildings need electrical wiring and plumbing, they might need elevators, and cooling systems, and underground parking lots, and of course stairs. They also usually are connected to the electrical grid and water supply as well as… roads.
All these common elements follow certain standards that have been improved over many many years and across many many projects. They are well understood and can be used almost like recipes.
In Software Engineering we also have a set of elements that repeat themselves across many projects. For example all software applications need to create objects, they need to communicate state change across those objects, they need to be able traverse over collections of those objects. In other words, if you want to be a better developer then you need to become proficient in those elements that have been time-tested. In the Software Engineering world these elements are known as “Design Patterns”
This course will teach students how to recognize when to use specific design patterns to build complex systems in a divide-and-conquer manner so that complexity is reduced and abstracted.
This will help you to design projects in an Architectural manner before any major development happens and can be used to shorten development time and reduce maintenance costs.
Design patterns are important because they are time-tested recipes or solutions to well-known software engineering problems. When creating software applications certain problems recur in a pretty predictable fashion so rather than ‘reinvent’ the wheel we will have an assortment of, if you will, wheels to choose from.
We will teach you this in a slightly different manner than you probably have been taught before. We will take a practical approach (i.e. specific examples) but the power of Design Patterns comes from their ‘concept’ and we will teach you the concept of those design patterns so that you are fully able to change them and modify them to your needs. In addition we will look at how to combine all those patterns into something greater: an architecture.
A well designed Architecture is this magical thing where the whole is greater than the sum of its parts.
This is what we will strive to teach you.
-
1What are Design Patterns and why do we need them?Vídeo Aula
In this lecture you will learn as to WHAT design patterns are, and why we would need them. Design patterns are a crucial tool in the toolkit of a Software Engineer and we explore here why you need to become familiar with them.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
2The Design Patterns Covered in This course.Vídeo Aula
In this lecture we will present to you the specific design patterns that we will cover in this course. These are in our mind the most important and fundamental of all design patterns and we will go over them in depth in subsequent lectures.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
3Quick Quiz about design pattern familiesQuestionário
We will test here your understanding of general aspects of design patterns
-
4The WHY Of Software Architecture.Vídeo Aula
Who needs Software Architecture? Why do we care about well designed and maintainable software? And how do we achieve SOLID Architecture? This lecture will show you why.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
5Why use UML?Vídeo Aula
In this lecture we will show you why UML is very useful when working with design patterns and Software Architectures in general.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
6Organized vs. Unorganized code.Vídeo Aula
Final piece of the coding-well puzzle will be explored. We will appeal to you in a visual way as to why having good and organized code matters.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
7*OPTIONAL*: UML Refresher.Vídeo Aula
This is an optional lecture that you can skip if you are very comfortable with UML diagrams. In case you want a quick and gentle refresher then by all means dive in! We will do a quick overview of Class and Sequence diagrams.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content.
-
8Hallmarks of Good Architecture.Vídeo Aula
How can you tell what a good Architecture is? What are the main features of a great Architecture? In this lesson we will explore the hallmarks of a great architecture are and how to spot them.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
9S.O.L.I.D Design Principles.Vídeo Aula
This is a very important topic. The S.O.L.I.D design principles form the backbone of what a great architecture should have at its base approach. In this lecture we explore these principles in preparation for when we go over the design patterns of this course.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
10SOLID *Practice Session* - Single Responsibility Principle(SRP)Vídeo Aula
This is a quick hands-on practice session where you will get a chance to exercise your SOLID knowledge by refactoring a bad solution into a good solution as per SOLID principles.
In this session we go over Single Responsibility Principle(SRP)
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
11SOLID *Practice Session* - Open/Closed Principle (OCP)Vídeo Aula
This is a quick hands-on practice session where you will get a chance to exercise your SOLID knowledge by refactoring a bad solution into a good solution as per SOLID principles.
In this session we go over Open/Closed Principle(OCP)
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
12SOLID *Practice Session* - Liskov Substitution Principle (LSP)Vídeo Aula
This is a quick hands-on practice session where you will get a chance to exercise your SOLID knowledge by refactoring a bad solution into a good solution as per SOLID principles.
In this session we go over Liskov Substitution Principle(LSP)
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
13SOLID *Practice Session* - Interface Segregation Principle (ISP)Vídeo Aula
This is a quick hands-on practice session where you will get a chance to exercise your SOLID knowledge by refactoring a bad solution into a good solution as per SOLID principles.
In this session we go over Interface Segregation Principle(ISP)
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
14SOLID *Practice Session* - Dependency Inversion Principle (DIP)Vídeo Aula
This is a quick hands-on practice session where you will get a chance to exercise your SOLID knowledge by refactoring a bad solution into a good solution as per SOLID principles.
In this session we go over Dependency Inversion Principle (DIP)
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content.
NOTE #2: we have also provided a PDF document with some *EXTRA* exercises for you to do. -
15SOLID Principles QuizQuestionário
In this quiz we will test your knowledge of the SOLID Principles
-
16Understanding the Singleton PatternVídeo Aula
We introduce the Singleton Design Pattern and discuss its importance and relevance in Software Engineering. In this lesson you will learn what it is and why we need it. It is a creational design pattern that helps us with ensuring that we have only a single copy of a given class in the whole project scope. You will find out why that is relevant.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
17Architectural Considerations for Singleton PatternVídeo Aula
We further explore the Singleton Pattern and look into the architectural nature of this software recipe through the UML lens.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
18Coding the Singleton Pattern in DartVídeo Aula
Let's code something using the Singleton Pattern. In this lesson we will explore how to code this pattern in Dart. We look at how to create a Singleton Logger wrapper in Dart/Flutter.
NOTE: attached you will find the zipped source code for this lecture. -
19Singleton QuizQuestionário
A few questions to solidify your understanding of the Singleton Pattern and its implementation.
-
20Singleton Pattern Coding ExercisesVídeo Aula
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use a Singleton Pattern in.
NOTE: A PDF Version of this exercise is provided here in case you would like to take hardcopy notes of the content. -
21Coding Exercise #1 SolutionVídeo Aula
We go over a solution to Exercise #1 for the Singleton Design pattern.
NOTE: The code for this solution has been attached to this lecture. -
22Coding Exercise #2 SolutionVídeo Aula
We go over a solution to Exercise #2 for the Singleton Design pattern.
NOTE: The code for this solution has been attached to this lecture.
-
23Understanding Factory Method PatternVídeo Aula
We introduce the Factory Method Design Pattern and discuss its importance and relevance in Software Engineering. In this lesson you will learn what it is and why we need it. It is a creational design pattern that makes the process of object creation more maintainable.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
24Architectural Considerations for Factory Method PatternVídeo Aula
We further explore the Factory Method Pattern and look into the architectural nature of this software recipe through the UML lens.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content.
-
25Coding the Factory Method Pattern in DartVídeo Aula
Let's code something using the Factory Method Pattern. In this lesson we will explore how to code this pattern in Dart. We have a fun little application which draws random shapes on the screen by utilizing the Factory Method Pattern and a custom Flutter Painter.
NOTE: attached you will find the zipped source code for this lecture. -
26Factory Method Pattern QuizQuestionário
This will test some of your knowledge about the Factory Method Pattern concept.
-
27Factory Method Pattern Coding ExercisesVídeo Aula
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use a Factory Method Design Pattern in.
NOTE: A PDF Version of this exercise is provided here in case you would like to take hardcopy notes of the content.
-
28Understanding Builder Design PatternVídeo Aula
We introduce the Builder Design Pattern and discuss its importance and relevance in Software Engineering. In this lesson you will learn what it is and why we need it. It is a creational design pattern that makes the process of complex object creation more maintainable and decoupled from the client.
-
29Architectural Considerations for Builder Design PatternVídeo Aula
We further explore the Builder Pattern and look into the architectural nature of this software recipe through the UML lens.
-
30Coding the Builder Pattern in DartVídeo Aula
Let's code something using the Builder Pattern. It's time for some Pizza! In this lesson we will explore how to code this pattern in Dart. We are going to create a Builder abstraction that will be responsible for creating different types of Pizza.
NOTE: attached you will find the zipped source code for this lecture. -
31Builder Pattern QuizQuestionário
This will test some of your knowledge about the Build Design Pattern concept.
-
32Builder Design Pattern Coding ExercisesVídeo Aula
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use a Builder Design Pattern in.
-
33Understanding the Adapter Design PatternVídeo Aula
We introduce the Adapter Design Pattern and discuss its importance and relevance in Software Engineering. In this lesson you will learn what it is and why we need it. It is a structural design pattern that allows two different processes to talk to each other even though their view of data is not compatible.
-
34Architectural Considerations for the Adapter PatternVídeo Aula
We further explore the Adapter Pattern and look into the architectural nature of this software recipe through the UML lens.
-
35Coding the Adapter Pattern In DartVídeo Aula
Let's code something using the Adapter Pattern. In this lesson we will explore how to code this pattern in Dart. We are going to create an Adapter for some XML and JSON data conversion!
As part of your Adapter pattern Exercise you will add a CSV Adapter to the featured code.
NOTE: attached you will find the zipped source code for this lecture. -
36Adapter Pattern QuizQuestionário
This will test some of your knowledge about the Adapter Design Pattern concept.
-
37Adapter Design Pattern Coding ExercisesVídeo Aula
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use a Adapter Design Pattern in.
-
38Understanding the Strategy Design PatternVídeo Aula
In this section will will introduce this incredibly simple yet powerful design pattern. This is probably the most popular and useful of all the design patterns in the whole of GoF collection.
-
39Architectural Consideration for the Strategy Design PatternVídeo Aula
We further explore the Strategy Pattern and look into the architectural nature of this software recipe through the UML lens.
-
40Coding the Strategy Design PatternVídeo Aula
Let's code something using the Strategy Pattern. In this lesson we will explore how to code this pattern in Dart. We are going to look at how to create different handlers for rendering to the screen.
NOTE: The source code for this lecture is attached with this video. -
41Strategy Pattern QuizQuestionário
This will test some of your knowledge about the Strategy Design Pattern concepts.
-
42Strategy Design Pattern Coding ExerciseVídeo Aula
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use a Strategy Design Pattern in.
It is recommended that you perhaps draw a UML sketch of the code (provided below) so that you can visually refactor it first.
NOTE: the code for Exercise #1 is attached below: shipping.dart
-
43Understanding the Observer Design PatternVídeo Aula
In this section we will explore the Observer Design Pattern with its very important role in inter-object communications.
Such aspects as notifications about specific events, and in general signalling about action workflows is what this pattern excels at. -
44Architectural Consideration for the Observer Design PatternVídeo Aula
Here we will look at more detail about the Architectural make up of this pattern. We will look at UML as well as general workflow of what makes this pattern great.
-
45Coding with Observer Design Pattern Part 1 - setState()Vídeo Aula
Let's learn something about the Observer Design Pattern in Flutter and Dart. In this lesson we will explore how this pattern is used in the setState(){ } block when we refresh widget tree contents.
NOTE: The source code for this lecture is attached with this video.
-
46Coding with Observer Design pattern Part 2 - StreamsVídeo Aula
Let's learn something about the Observer Design Pattern in Flutter and Dart. In this lesson we will explore how this pattern is used in Flutter streams when we refresh widget tree contents with the ability to refresh specific branches of the widget tree.
NOTE: The source code for this lecture is attached with this video.
-
47Observer Pattern QuizQuestionário
A few quick questions to solidify your understanding of the Observer Pattern
-
48Observer Design Pattern Coding ExerciseVídeo Aula
This is a set of exercises for the student to do. It is important to practice and try things out. This will go over the code that we have looked at in the Observer Pattern Coding (lectures #31 and #32)
You will use that code as your starting point for those exercises.
You will draw a UML Sequence Diagram for the Flutter Streams that we have covered as well as use those streams in conjunction with the Observer Pattern to modify the Grid View Code to individually target each grid tile as a subscriber to data changes.
-
49Understanding the State Design PatternVídeo Aula
We will go over the concept of what a State and a State Machine is. We will understand how to break down states and associated data into a set of discrete steps that make up a State Machine.
-
50Architectural Consideration for the State Design PatternVídeo Aula
We further explore the State Pattern and look into the architectural nature of this software recipe through the UML lens and get a better understanding of h ow to design a State Machine.
-
51Coding the State Design PatternVídeo Aula
Let's code something using the State Design Pattern. In this lesson we will explore how to code this pattern in Dart. We are going to look at how to create controller process for good old traffic lights. We will design and code the state machine for a traffic light.
NOTE: The source code for this lecture is attached with this video. -
52State Design Pattern Coding ExercisesVídeo Aula
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use a State Design Pattern in.
It is recommended that you perhaps draw a UML sketch of the starter code (provided below) so that you can visually refactor it first.
NOTE:
Starter code for Exercise #1 is attached below: state_design_pattern_exercise_001_starter_code.dartStarter code for Exercise #2 is attached below: state_design_pattern_exercise_002_starter_code.dart
-
53About John Conway's Game Of Life SimulationVídeo Aula
In this lecture we will look into the course assignment.
You will see what 'Game of Life' is all about. This is a famous and classic life simulation that is a staple of colleges and universities in their Computer Science programs for its curious 'emergent' behaviour.You will design, architect and code this application for your mobile device. All of it using the design patterns you have learned in this course.
I have provided you with a working starter code which has all the logic for the game of life but is not architected well. Your task will be to take the code and refactor it so that it is well architected and follows all the SOLID principles as well as uses some of the Design Patterns we learned in the course.NOTE: The source starter code for this lecture is attached with this video.
-
54A Word about the "Game of Life" ArchitectureVídeo Aula
A helping hand with the architecture and general 'design' approach for your assignment.
