Book Review: Clean Architecture By Robert Martin
🧔🏼

Book Review: Clean Architecture By Robert Martin

notion image
should you buy this book that's the
notion image
question that i want to answer today
notion image
and what is this book well this is clean
notion image
architecture it's by
notion image
uncle bob probably one of the most
notion image
famous programmers
notion image
in the world he wrote a whole bunch of
notion image
other books like clean code and clean
notion image
coder
notion image
and he kind of knows what he's talking
notion image
about now this book is kind of popular
notion image
on the internet it's all over the place
notion image
it's on a lot of programmer reading
notion image
lists
notion image
and currently it's ranked number 38 on
notion image
amazon's programming best sellers list
notion image
i don't know if that's good but that's
notion image
what number it is now i'm going to help
notion image
you decide whether or not you should buy
notion image
this book and in order to do that i'm
notion image
going to divide this into three
notion image
different sections
notion image
first i'm going to talk about what this
notion image
book is about just a little bit about
notion image
robert martin and generally what the
notion image
themes are in this book
notion image
then i'm going to talk to you about the
notion image
key takeaways that i took from this book
notion image
personally
notion image
and then finally i'm going to give you
notion image
my summary and whether or not i can
notion image
recommend it or not for you to read
notion image
so first of all who is this book even
notion image
for well it's for software developers
notion image
if you're a beginner software developer
notion image
especially even if you're
notion image
a more mid-career or veteran software
notion image
developer i think this
notion image
book is beneficial to all different
notion image
skill levels
notion image
talking about this personally i kind of
notion image
learned a lot of the concepts of
notion image
software development and software
notion image
architecture just by
notion image
kind of going into the trenches and
notion image
experiencing it and
notion image
seeing what it looked like in real life
notion image
and i can tell you that when i read this
notion image
book after the fact a lot of the
notion image
concepts and the principles that it
notion image
teaches you are very applicable to real
notion image
life a lot of these things
notion image
that it teaches you are in fact how it
notion image
works um so
notion image
looking at this in retrospect i wish i
notion image
knew about this stuff earlier i wish i
notion image
like to read more as i
notion image
as i like to read now but take that as
notion image
you will and the essence of the book is
notion image
that
notion image
often when we're working with a code
notion image
base you you know
notion image
if it's good or bad right like it's
notion image
either good and you know that because
notion image
it's easy to add features it's easy to
notion image
change things
notion image
documentation is always up to snuff
notion image
everything is just
notion image
gravy and when it's a bad code base you
notion image
know the complete opposite happens you
notion image
often just end up banging your head
notion image
against the wall trying to
notion image
sort out trivial problems or solve small
notion image
things that shouldn't take a long time
notion image
um and so the idea with this book is
notion image
teaching you the kind of pillars or the
notion image
principles
notion image
that you need to apply to your daily
notion image
life so that you can get your code
notion image
into the good state into the state that
notion image
we all want our code to be where it's
notion image
easy to maintain
notion image
easy to develop new features for etc etc
notion image
so in other words this book is about
notion image
keeping you on the path if you're on the
notion image
path and kind of course correcting you
notion image
or teaching you the principles to course
notion image
correct yourself
notion image
if you're working with a problematic
notion image
code base uh that being said it's also
notion image
great if you're just starting out
notion image
because this will teach you a lot of the
notion image
principles that you need to know about
notion image
in terms of how to set up your project
notion image
and kind of define the core entities
notion image
that in the end are going to end up
notion image
being the thing
notion image
that drive your architecture so that's
notion image
what this book is about now i want to
notion image
talk about the
notion image
kind of important bits from this book
notion image
and the key takeaways that i took from
notion image
it personally
notion image
and it starts out by talking about a lot
notion image
of the basic concepts that you learn in
notion image
any standard computer science program
notion image
so things like object oriented
notion image
programming things like functional
notion image
programming
notion image
procedural programming structural
notion image
programming all these different types of
notion image
programming
notion image
and it turns out there's some principles
notion image
that you can apply from the different
notion image
programming types
notion image
to your architecture so that's why he
notion image
spent some time talking about
notion image
now along that same line the book talks
notion image
about these solid principles
notion image
and there's five solid principles and
notion image
these are the kind of bible for software
notion image
developers in terms of
notion image
kind of principles that you apply to
notion image
your daily life when you're building
notion image
architecture and then kind of guide some
notion image
of the key decisions that you need to
notion image
make
notion image
so if you don't know what solid is i can
notion image
just kind of recap them for you so the s
notion image
in solid stands for the single
notion image
responsibility principle and this is the
notion image
idea that a class would be responsible
notion image
for one thing
notion image
one domain the o in solid is for the
notion image
open
notion image
close principle which is that a class
notion image
should be open for extension but
notion image
closed for modification the l is the
notion image
liskov substitution principle which
notion image
basically means you should use
notion image
polymorphism whenever it's possible
notion image
if you don't know what polymorphism is
notion image
i'd highly suggest you watch the video
notion image
and just look up a definition
notion image
it's a very useful concept in a lot of
notion image
these conversations
notion image
the i is for the interface segregation
notion image
principle which is that it's usually
notion image
better to have
notion image
multiple interfaces for different use
notion image
cases as opposed to one overloaded use
notion image
case
notion image
and then the d is for the dependency
notion image
inversion principle
notion image
and this means that you should only
notion image
depend on abstractions whenever possible
notion image
and your higher order component should
notion image
never depend on your lower order
notion image
components
notion image
so after he talks about that he talks
notion image
about a lot of how these principles
notion image
apply to some software architecture
notion image
concepts
notion image
so he brings in a lot of the talk about
notion image
service oriented architecture and if you
notion image
don't know what service oriented
notion image
architecture
notion image
is let me just give you the brief about
notion image
it so service oriented architecture is
notion image
the idea that you separate your
notion image
application out into different domains
notion image
different components
notion image
uh so say for instance if we're working
notion image
with a credit card application that's
notion image
responsible for processing customer
notion image
transactions
notion image
we may say okay maybe it makes sense to
notion image
have a service called the transaction
notion image
service
notion image
and this service is responsible for
notion image
being the ledger this is going to handle
notion image
kind of the commits to the database and
notion image
going to be your single source of truth
notion image
whenever transactions are accepted and
notion image
committed in your system
notion image
then in the middle maybe you have an
notion image
authorization service and the service
notion image
can be responsible for
notion image
simply authorizing whether or not a
notion image
transaction is possible
notion image
and then over on the side here you can
notion image
have a different service that's
notion image
responsible for fielding customer
notion image
requests
notion image
to authorize those requests and finally
notion image
commit those to the database whenever
notion image
they are authorized so that's kind of
notion image
how you can separate out a fairly basic
notion image
example into service oriented
notion image
architecture so he talks a lot about the
notion image
benefits of this you know decoupling
notion image
independent deployments
notion image
you can move a lot faster in service
notion image
oriented architecture now he also does
notion image
mention that a lot of companies don't
notion image
have the luxury or the
notion image
resources to build out service oriented
notion image
architecture so he suggests how to kind
notion image
of
notion image
organize and lay out your source code
notion image
dependencies and your package structures
notion image
in a way that lets you extend
notion image
those into service oriented architecture
notion image
friendly
notion image
format if you decide to go down that
notion image
path and i thought that was a very
notion image
interesting idea and one of the side
notion image
effects
notion image
of going through this exercise of
notion image
cutting up your service into different
notion image
roles and kind of assigning them
notion image
different responsibilities is that you
notion image
end up building
notion image
modules and that's another common theme
notion image
of this book it's the the promotion of
notion image
this idea of
notion image
modules or components that are
notion image
responsible for specific things
notion image
now the next major section that he talks
notion image
about is regarding
notion image
details and he makes this argument that
notion image
a lot of the things that we worry about
notion image
at the beginning of a project
notion image
don't actually matter that much until
notion image
you're further along in the process
notion image
so the idea is to delay these types of
notion image
decisions to the last possible moment
notion image
to give you the most flexibility and
notion image
i'll give you a perfect example on this
notion image
uh in the book he's talking about
notion image
building this
notion image
application with his son and he's
notion image
talking about how they didn't even have
notion image
a database for this application
notion image
up until like a couple months before
notion image
they were going to launch this thing
notion image
and the reason they need one is because
notion image
they built an interface that sits
notion image
in front of the database so now all the
notion image
calling code doesn't have to know about
notion image
the the implementation of the database
notion image
or even whether or not
notion image
you know it's a nosql database or a
notion image
mysql database
notion image
or a graph database or whatever it is it
notion image
doesn't matter
notion image
that decision can be delayed up until a
notion image
very later point
notion image
now for a lot of applications that's a
notion image
very wise thing to do because
notion image
us as developers we get obsessed with
notion image
certain types of technologies and we're
notion image
like hmm which one should we use here
notion image
which one's a better idea and really
notion image
that kind of stuff doesn't really matter
notion image
until a later point in time
notion image
uh he even mentions that in this kind of
notion image
example he was talking about they didn't
notion image
have a database they were writing to
notion image
flat
notion image
files for a very long period which i
notion image
thought was just fascinating
notion image
and another key part of this discussion
notion image
is like drawing boundaries that's what
notion image
service oriented architecture
notion image
kind of thinking allows you to do it
notion image
allows you to draw boundaries between
notion image
systems so that they're elegant they
notion image
have interfaces
notion image
and the ways in which these two
notion image
different systems or n number of systems
notion image
interact with each other
notion image
is formalized through an interface so
notion image
that's kind of a big kind of takeaway
notion image
that he kind of repeats throughout the
notion image
book
notion image
there's also this talk on entities and
notion image
policy
notion image
and your entities are kind of the core
notion image
domain object the core business object
notion image
that your kind of space
notion image
is working with and a lot of the
notion image
business rules are kind of encoded into
notion image
your domain objects
notion image
then he talks about different layers the
notion image
one above that is called the policy
notion image
layer and the policy is the thing that
notion image
basically in an application is usually
notion image
like the manager class where
notion image
a lot of the logic actually takes place
notion image
like what to do what and when
notion image
and so he talks a lot about the
notion image
different layers of an application how
notion image
you can build it out
notion image
but i guess the question at the end of
notion image
the day is should you even buy this book
notion image
and my recommendation is yes and here's
notion image
why first of all it's an easy read it's
notion image
not too
notion image
deep it's not too thorough it's
notion image
something you can read before bed and
notion image
still get it without having your brain
notion image
to be in like hyper overdrive mode
notion image
second of all it teaches you a lot about
notion image
the principles that i wish i knew before
notion image
i entered the software industry a lot of
notion image
this stuff is basic but seeing how he
notion image
applies it to real life examples is
notion image
invaluable
notion image
and like i said at the beginning of this
notion image
video a lot of the concepts that you
notion image
learn in this book i actually apply in
notion image
real life pretty regularly so that just
notion image
goes to show you how useful it is from a
notion image
professional perspective like this stuff
notion image
makes sense and it's useful
notion image
overall i would say just buy this book
notion image
it's good to have to learn some of the
notion image
basic concepts and even if you already
notion image
know some of these concepts it's good to
notion image
get a refresher from time to time
notion image
and this book puts it out in a very
notion image
convenient easy to digest way
notion image
and if you're a beginner this is going
notion image
to teach you a lot of the basic concepts
notion image
that
notion image
people like me wish they knew about
notion image
before you know they got into the
notion image
industry
notion image
so there it is i'll put a link to this
notion image
book down below on amazon if you want to
notion image
pick it up and as always if you enjoyed
notion image
this video please don't forget to like
notion image
it subscribe it really helps me with the
notion image
channel
notion image
thanks so much and i'll see you next time