
Master SOLID principles through visuals, analogies, and live coding in Java for any object-oriented language. Analyze single responsibility and open-closed principles, then redesign code to build robust software.
Explore the single responsibility principle (srp) as the first rule of the solid principles, showing that each software component should have one responsibility, illustrated by a Swiss army knife analogy.
Illustrate the single responsibility principle by boosting cohesion by grouping area and perimeter with the square class, rendering with SquareUI, and reducing coupling via a Repository for database operations.
Explain how the single responsibility principle, one of the solid principles, evolves into one reason to change, using a student class and a repository to separate database concerns.
Refactor the single employee class into a repository class and a tax calculator class to enforce the single responsibility principle, illustrating changes and practical Java implementation.
Reinforce the single responsibility principle, emphasizing one responsibility per component, and how high cohesion and loose coupling support SRP while reducing maintenance costs, demonstrated with live coding.
Explore the open-closed principle of SOLID and how software components are closed for modification but open for extension, illustrated by a Nintendo Wii accessory analogy.
Explore the open closed principle with a real-world insurance example and a reusable customer profile interface to enable future extensions without editing existing code.
Apply the open-closed principle to ease feature expansion and reduce testing effort, lowering costs through better decoupling. See how SOLID principles interlink and avoid blind application.
In this live coding session, we refactor the calculator to use a common CustomerProfile interface. Health, vehicle, and home insurance profiles implement isLoyalCustomer, demonstrating the Open Closed Principle and extensibility.
Apply the open-closed principle to keep software closed for modification while open for extension. See how it aligns with the single responsibility principle to improve design and reduce long-term costs.
Explore the Liskov Substitution Principle, ensuring objects are replaceable by subtypes without breaking correctness. See how is-a inheritance and ostrich versus bird expose design flaws and the wrong abstraction.
Explore the Liskov Substitution Principle by breaking the inheritance hierarchy and creating a Vehicle base class, enabling Car and RacingCar to provide interior width via cockpit or cabin width.
Demonstrates applying the Liskov Substitution Principle and the tell, don't ask pattern by refactoring discount logic: override getDiscount in InHouseProduct and remove type checks to ensure correct, polymorphic pricing.
Demonstrate the Liskov substitution principle in a Java pricing example using product and in-house product, by overriding getDiscount and removing type checks to apply tell, don't ask.
Apply the Liksov substitution principle by ensuring objects remain correct when substituting subtypes, avoid Is-A thinking, and learn patterns like breaking the hierarchy and tell, don't ask.
Explore the interface segregation principle, ISP, and why no client should be forced to depend on unused methods, design; see examples with multi-function devices and need to avoid blank implementations.
Split the large interface into three focused interfaces—IPrint, IScan, and IFax—and assign implementations to Xerox WorkCentre, HP, and Canon to enforce the interface segregation principle.
Identify violations of the interface segregation principle, including fat interfaces, low cohesion, and empty implementations, and see how proper segregation supports single responsibility and Liskov substitution within solid design.
Refactor a multi function device by applying the interface segregation principle in a live coding session, splitting a large interface into IPrint, IScan, and IFax, and aligning classes accordingly.
Summarize the interface segregation principle: no client should be forced to depend on methods it does not use, with fat interfaces, low cohesion, and blank implementations via a printer analogy.
Explore the dependency inversion principle (dip) in SOLID design, showing how high level and low level modules depend on abstractions, not details.
Explore dependency injection by passing a ProductRepository into ProductCatalog, freeing the catalog from instantiation and promoting loose coupling with the SQLProductRepository.
Demonstrate a live coding session to fix dependency inversion by introducing a ProductRepository interface, implementing it with SQLProductRepository, and updating ProductCatalog to use ProductFactory.create() as a factory.
Explore inversion of control, where a framework like Spring injects dependencies and instantiates objects, moving dependency management out of the main control flow into its own context.
Examine the dependency inversion principle with high and low level modules, abstractions, and how details depend on abstractions, via an eCommerce example, dependency injection, and inversion of control.
Explore and apply the SOLID design principles—single responsibility principle, open closed principle, Liskov substitution principle, interface segregation principle, and dependency inversion principle—through real-world analogies and live coding. Practice these fundamentals to become a better coder and designer, and replay videos when you need guidance.
Anyone can code. But what differentiates a professional software engineer from a hobbyist coder is how well-designed and well-coded the final product is. Code quality is hard to come by. Unfortunately, most coders start straight without understanding basic concepts of software design. This course will help a budding coder, as well as an established programmer who wants to learn better design and write quality code.
It is really important that you grasp the core concepts of SOLID thoroughly. Once you get the fundamentals right, writing quality code will come naturally to you.There are tons of free YouTube videos on SOLID, but they try to teach you in bits and pieces, and don't pick the right analogies and code snippets. What you need is a holistic picture, which is what this course aims to provide. I have spent considerable time and effort to come up with the content for this course. Each and every concept, each and every analogy, each and every code example has been meticulously picked in such a way the design principles stick to your mind. I have used graphical illustrations and real world analogies wherever possible to drive home the point.
Something else that is special about this course - The subtitles are hand-scripted and accurate. I have even checked the timings to guarantee accuracy. Most courses come with subtitles that are auto-generated using a Speech-To-Text Engine, the accuracy of which is fairly low. But not mine! I have taken pains to script my course to perfection and include the subtitles too. So if you are at work, and you want to put me on mute, please feel free, although I would like you to hear my voice narration. If you want to put me on mute, just enable the subtitles in Udemy and play!