SOLID C++

Learn and practice C++ with SOLID object-oriented design principles

4.32 (280 reviews)
Udemy
platform
English
language
Other
category
instructor
20,969
students
9.5 hours
content
Jan 2021
last update
$64.99
regular price

What you will learn

Discover how to design and write robust and maintainable object-oriented code

Develop an intuitive understanding of SOLID principles

Learn how to follow SOLID principles using appropriate abstractions and programming patterns

Learn how to follow SOLID principles using different C++ language features and idioms

Know how to structure C++ projects, test and refactor object-oriented code

Practice SOLID principles and C++ in assignments and final programming project (C++17)

Learn how to use CMake and Boost libraries in C++ projects

Learn how to use Google Test for unit testing

Get acquainted with UML (class and sequence diagrams)

Description

Learning syntax of a programming language is not enough to become professional and build high quality software. One must also learn how to make good design and implement it properly so that software is robust, maintainable, flexible and testable. That’s why we need object-oriented design principles like SOLID:

  • Single responsibility

  • Open-closed

  • Liskov substitution

  • Interface segregation

  • Dependency inversion

This is probably the most complete SOLID principles course on Udemy. But it’s also special in that it focuses on C++ programming language, which we use for examples and assignments. And this course covers both theory and practice.


By the end of this course you should

  • Develop an intuitive understanding of all SOLID principles

  • Understand when SOLID principles are needed and when not

  • Learn how to follow SOLID principles in general, regardless of a programming language, using appropriate abstractions and programming patterns

  • Learn how to follow SOLID principles using different C++ language features and idioms

  • Know how to structure C++ projects, test and refactor

However, there should be no illusions about this or any other course. One cannot become a true master of object-oriented design and programming only by completing one or few courses – it takes years of practice. But this course is a good starting point and provides the needed foundations.


So what exactly is covered in the course?

  • Presentations (theory and concepts about the­ principles)

  • Visual analogies from real world (to better understand and remember the principles)

  • UML diagrams (mainly class diagrams with examples about the principles)

  • Plenty of stand-alone code examples (at least a few for each principle)

  • Almost a real-world project (server application that receives over TCP connection and processes tax reports in JSON or XML formats) with unit and high-level tests

  • Explanations how to install the project’s dependencies, compile it and run tests (uses C++17, CMake, Boost libraries (asio, program options, etc.), Google test)

  • Quizzes and final test (some have additional code examples)

  • Programming assignments (work on the project, etc.)


This course is for you if you

  • Are a beginner or intermediate C++ programmer (but not complete beginner)

  • Have a basic understanding of OOP (classes, polymorphism, inheritance, encapsulation, etc.)

  • Want to learn more and become a better software engineer

Ideally, before this course you should have already worked on a few small hobby projects or have some commercial software development experience.

You should be able to pick up the rest of the materials and technologies during the course. At the same time, some applied technologies and examples are more advanced but optional to the main subject of this course.

And even if you don’t primarily program in C++, you will still find that most of the code examples, as well as the principles, apply to many other programming languages.


What is expected from you?

Besides watching lectures and/or reading presentations, it’s expected that you

  • Compile, read and understand code examples and the project source code (ability to read and work with somebody else's code is very important and often underestimated)

  • Refactor some of the provided code examples while doing assignments

  • Work on the project source code in the final assignment, extend its functionality and add tests


The images in visual examples are from website pixabay and the audio in videos is from website bensound.

Content

Introduction

What is SOLID
Why focus on C++
Repository, presentations, source code, tests, CI
Project description with sequence diagram
Project source code overview before SOLID
Project source code overview after SOLID
Additional remarks about project
Test introduction

Installing, building and testing

Windows: download and open project
Windows: install MinGW distro (gcc, g++, boost libraries, etc.)
Windows: install CMake
Windows: install gtest and gmock
Windows: compile project and run unit tests
Windows: run high-level tests (optional, using Python3)
Linux: dowload and open project
Linux: install dependencies
Linux: compile project and run unit tests
Linux: run high-level tests (optional, using Python3)

UML basics

UML introduction
Class diagrams
Creating class diagrams with Umbrello
Test UML basics

Single Responsibility Principle (SRP)

Introduction
How to follow
Visual analogy
UML class diagrams
Text editor example violating SRP
Plant care example violating SRP
Plant care example refactored
Project source code before applying SRP
Project source code after applying SRP and refactoring
Test SRP

Open-Closed Principle (OCP)

Introduction
How to follow
Additional remarks
Visual analogy
UML class diagrams
Dynamic polymorphism and inheritance
Static polymorphism and templates
Template specialization
Constraints and concepts (C++20)
Decorator pattern (dynamic)
Decorator pattern (static)
Template method pattern
Composition over inheritance
Run-time concept idiom (advanced)
Project source code before applying OCP
Project source code after applying OCP and refactoring
Test OCP

Liskov Substitution Principle (LSP)

LSP introduction
LSP underlying terminology and concepts
LSP implications
How to follow: IS-A relashionship and behavioural subtyping
How to follow: design by contract (invariants, preconditions, postconditions)
How to follow: language features to state and verify contracts
Visual analogy
UML class diagram
Classic example
Animal example
Covariance example
Queryset example
Collection example
Project source code changes (OCP + LSP)
Test LSP

Interface segregation principle (ISP)

Introduction
Implications
How to follow
Visual analogy
UML diagrams
UML diagrams continued
Classic door example (violating ISP + LSP)
Classic door example continued (delegation, adapter, multiple inhertance)
Printer class example (multiple inheritance)
Multiple inheritance caveats
Plant care example (ISP + LSP)
Plant care example continued (follow ISP + LSP, multiple inheritance, threads)
Project source code changes (new functionality + ISP)
Test ISP

Dependency Inversion Principle (DIP)

Introduction
Introduction continued
Implications
How to follow
Visual analogy
UML class diagrams
Classic lamp example
Observer pattern example
Observer pattern example continued
Plant care example
Project source code
Test DIP

Final test and assignment

Final test
Test

Screenshots

SOLID C++ - Screenshot_01SOLID C++ - Screenshot_02SOLID C++ - Screenshot_03SOLID C++ - Screenshot_04

Reviews

Jelena
June 6, 2023
I cannot give more details at the moment since the course just started, but so far everything seems OK.
Humberto
January 23, 2023
The course had great content, but the instructor speaks too slowly and stutters a lot, sometimes it's complex to follow the logic with so many interruptions.
Torsten
January 17, 2023
I think the content is very comprehensive. I like that there is one evolving example. I see improvement in the presentation. Just reading the the code in your own word is not enough. I would benefit from answering the why and when we should do it.
Francesco
September 19, 2022
This course is very interesting and securely it helped me to understand some principles that I've ignored as for far.
Sumon
June 6, 2022
Awsome example to show the analogy between the LSP and a real world objects. This will help me to remember the LSP for ever now. Thanks a lot.
Denis
January 14, 2022
Unfortunately, sometimes I did not understand what the lecturer meant. Some explanations wasn't so easy to understanding for beginning level of cpp programming skills.
Rostyslav
June 29, 2021
One thing should be considered upfront: this is NOT a complete beginner course. One needs to be familiar with C++ syntax and basic facilities already and, what is even more important, be able to seach for and understand additional information. That said, the course is a very good introduction to SOLID design principles. They are amply illustrated on several different levels: from elementary explanations using visual analogies to basic examples to more advanced examples and assignments to, finally, an example of a more complicated project. So I think everyone can take something from the course corresponding to their level of previous training and experience. What I also found really useful about this course is that it encourages to start working or at least get acquainted with real-life tools and techniques, not just with programming-language patterns (CMake, gtest/gmock, Boost etc.) This does pose some challenge, but the instructor is very responsive to questions and provides informative and authoritative answers promptly. To sum up: this course is for you if you are ready to invest active effort in your learning and not just consume the lectures passively.
Ashish
May 29, 2021
It was quite fast course, in a good way though. The assignment concerning the setting up of the Tax application seem like a huge task. The examples were great and helped in the understanding of SOLID principle.
Sebastian
May 16, 2021
Really cool stuff that I didn't know. I liked the C++20 examples because I haven't seen C++20 recently.
Marvin
March 2, 2021
It presented an introduction, analogy, UML diagram and actual code implementation to support the SOLID principles. I would have preferred a UML diagram that also discuss the impact of applying solid principle in the project source code instead of just diving into the modifications.

Coupons

DateDiscountStatus
2/4/2021100% OFF
expired
3/11/2021100% OFF
expired

Charts

Price

SOLID C++ - Price chart

Rating

SOLID C++ - Ratings chart

Enrollment distribution

SOLID C++ - Distribution chart
2784114
udemy ID
1/28/2020
course created date
2/4/2021
course indexed date
mohamedxxx
course submited by