Rashmi varma wrote:Hello Sir,
I am a Java developer and these days preparing for interview in FAANG companies. I would like to understand if this book helps me understand the the design aspects when we start to build an application. What needs to be considered before we actually start coding and using algorithms? The right and clean way to go about the complete solution to the problem.
Thanks in advance,
Rashmi
Hello & thank you for your question. This books certainly will help you with the software design aspects when you start building a Java application. We do not cover interview-style algorithmic questions though.
There are broadly four themes in our book:
Java Features
Structuring code with classes and interfaces is discussed in Chapter 2. We move onto exceptions and packages in Chapter 3. You will also get a short overview of lambda expressions in Chapter 3. Then local variable type inferences and switch expressions are explained in Chapter 5, and finally lambda expressions and method references are covered in detail in Chapter 7. Java language features are important because so many software projects are written in Java, so it’s useful language to know the workings of it. Many of these language features are useful in other programming languages as well, such as C#, C++, Ruby, or Python. Even though those languages have differences, understanding the how to use a class and core OOP concepts will be valuable across different languages.
Software Design and Architecture
Throughout the book a series of design patterns are introduced that help provide you with common solutions to common problems that developers encounter. These are important to know because even though it may seem like every software project is different and comes with its own set of problems, in practice many of these have been encountered before. Understanding common problems and solutions that have been solved by developers keeps you from reinventing the wheel in a new software project and enables you to deliver software faster and more reliably.
The higher-level concepts of coupling and cohesion are introduced early on the book in Chapter 2. The Notification pattern is introduced in Chapter 3. How to design a user-friendly Fluent API and the Builder pattern are introduced in Chapter 5. We look at the big-picture concepts of event-driven and hexagonal architectures in Chapter 6 and the Repository pattern in Chapter 7. Finally, you’re also introduced to functional programming in Chapter 7.
SOLID
We cover all the SOLID principles throughout various chapters. These are a set of principles designed to help make software easier to maintain. While we like to think of writing software as the fun part, if the software that you write is successful it will need to evolve, grow, and be maintained. Trying to make the software as easy to maintain as possible helps this evolution, maintenance, and long-term addition of features. The SOLID principles and the chapters where we will discuss them are:
- Single Responsibility Principle (SRP), discussed in Chapter 2
- Open/Closed Principle (OCP), discussed in Chapter 3
- Liskov Substitution Principle (LSP), discussed in Chapter 4
- Interface Segregation Principle (ISP), discussed in Chapter 5
- Dependency Inversion Principle (DIP), discussed in Chapter 7
Testing
Writing reliable code that can be easily evolved over time is really important. Automated tests are key to this. As the software that you write scales in size it becomes increasingly hard to manually test different possible cases. You need to automate your testing processes to avoid the days of human effort it would take to test your software without it.
You learn about the basics of writing tests in Chapters 2 and 4. This is extended to test-driven development, or TDD, in Chapter 5. In Chapter 6 we cover the use of test doubles, including mocks and stubs.