
Explore the solid principles for object-oriented design, a five-principle framework introduced by Uncle Bob, with guidelines and coding examples to improve clean code and agile development.
Build a banking app using solid principles, starting with the single responsibility principle, and implement a banking service, bank account model, and deposit money with balance handling, guided by tests.
Learn to withdraw money in a banking app using a setup method for tests, update account balance, and print passbook data.
Demonstrate test-driven development of a banking app feature that returns loan interest by loan type using a switch case. Write tests for home, car, and personal loans.
Implement a banking service that sends OTP to a mobile number and returns a confirmation message like 'message sent to this number.' Expand with tests and basic banking features.
Learn the single responsibility principle, which says a class should have only one reason to change. Avoid god classes by splitting code into small, focused classes and modules.
Apply the single responsibility principle by refactoring a bloated banking service into dedicated print, loan, and notification services, improving maintainability through modular design.
Refactor to apply the single responsibility principle by moving balance management to the account class, delegating add and withdraw money to account, and using a notification service for alerts.
Apply the open–closed principle by keeping existing code closed for modification and open for extension, using a vehicle base class with car, bike, and future truck subclasses.
Drive the open and closed principle by updating the notification service to send an otp with personalized greetings and a disclaimer, guided by tests.
Explore applying the open-closed principle by refactoring a notification service to support email and SMS without modifying existing code, using abstract methods and inheritance to pass tests.
learn about the Liskov substitution principle, which requires that derived classes be substitutable for base classes without altering program behavior, illustrated by a rectangle and square inheritance example.
Apply the Liskov substitution principle to banking accounts, ensuring fixed deposit behavior remains substitutable for the general account without breaking tests.
Apply Liskov substitution principle by introducing a withdrawal service and saving account, refactoring the banking service to support withdraw money, align tests, and clarify responsibilities.
Explore the interface segregation principle of SOLID, which splits large interfaces into small, client-specific ones so classes implement only the methods they need, illustrated with a conversion interface example.
Implement a Google Pay UPI payment using an initial UPI payments interface, applying the interface segregation principle to improve design, with tests guiding pay money, scratch card, and cashback behaviors.
Apply the interface segregation principle to split a large payments interface into separate interfaces for scratch cards and cashback, enabling in-house payments, Paytm, and Google Pay while updating tests.
Explain the dependency inversion principle, where high level modules depend on abstractions rather than concrete classes, enabling decoupled design via interfaces implemented by low level components like keyboard and monitor.
Apply dependency injection to design a bank atm service that withdraws money from an atm using a debit card (and supports credit card) with test-driven validation.
Applies dependency inversion by introducing a bank card interface, injecting debit and credit card implementations into the bank ATM service, and handling transaction charges.
In this course, you will learn how to build robust and maintainable software by applying SOLID principles in a test-driven way. SOLID principles are a set of guidelines for designing object-oriented software that is easy to maintain and extend over time. By combining SOLID principles with test-driven development (TDD), you can create code that is not only correct but also flexible and easy to change.
The course will begin with an introduction to the SOLID principles and how they can help you build better software. You will learn about each of the SOLID principles - Single Responsibility Principle, Open/Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, and Dependency Inversion Principle - and how they relate to each other.
With a solid understanding of both SOLID principles and using TDD, you will start building a sample application using Java and the JUnit testing framework. You will begin by writing tests that describe the behavior of the application, and then fix the test & implement the requirements by applying SOLID principles one by one.
Throughout the course, you will learn how to apply SOLID principles in a practical way, using real-world examples and exercises. By the end of the course, you will have a deep understanding of SOLID principles and familiarity with TDD, and the skills to build robust and maintainable software using these techniques.