At the core of writing better Java code is a thorough knowledge using interfaces and abstraction. In this course, Java Interfaces and Abstraction, you'll learn how to improve the maintainability and extensibility of Java code over time. First, you'll delve into how to define interfaces and abstract classes. Next, you'll explore what an abstraction is, and how to design good abstractions. Finally, you'll discover what and when to avoid when designing abstractions. When you're finished with this course, you'll have a foundational knowledge of interfaces and abstraction in Java that will help you on your path towards becoming a Java expert. Software required: Java SE 8.
Course Overview Hi everyone. My name is Richard Warburton, and welcome to my course, Java Interfaces and Abstraction. I'm a freelance software developer, author, and trainer. I'm a contributor to open source projects such as honest profiler and Aeron. In additional to several Pluralsight courses, I've also authored the book, Java 8 Lambdas. This course isn't about a specific technology; it's here to help you write more maintainable and readable Java code. In this course, you'll learn how to use interfaces and abstract classes in Java, how to design strong abstractions that will help your software application, how to avoid letting the details of implementation leak through your abstraction, the key dos and don'ts when using interfaces and designing abstractions, and where to apply the concepts of abstraction in order to avoid the proliferation of false abstractions. By the end of this course, you'll be an expert on using Java interfaces and designing abstractions in Java. Before beginning the course, you should be familiar with the basics of how to write Java code such as declaring a class or writing a for loop. Now I hope you'll join me on this journey to learn how to write better code with the Java Interfaces and Abstraction course at Pluralsight.
Understanding the Need for Abstractions In this module, we'll talk a little bit more about what abstraction entails, different types of abstraction we have on offer, about why we need it, and what kind of problems that it solves. Abstractions are really a way to organize the code in our application. Instead of just writing code that tries to implement every detail of a program, we write code that breaks down the big steps and decomposes those big steps into little steps. It enables us to suppress the details within different abstractions, for example, whether we're storing our values inside a list or a map. It doesn't really matter, as long as the class implements the public methods that it exposes to other classes. This helps us to simplify interactions between classes. When you're relying on the operations, they're important to our business, other than depending on the implementation of different components. It also helps us maintain software more easily because it allows us to change a component within the system without changing everything that depends upon the implementation detail that we are changing. It promotes decoupling, in other words.
Conclusion Welcome to the final module of this course. If you've made it far, well done. You already know an awful lot about interfaces and abstraction. What else, you must be thinking, is there left to learn? First, we'll kick off by tying interfaces to some wider topics in terms of software development and design. You get to see how interfaces are used in design patterns and can be used to help test your code. Then we'll help recap the key syntactic features of interfaces in the Java programming language. This ties back to module 1 and ensures that you're completely comfortable with the core ideas. Finally, we'll recap the principles and tradeoffs that we've learned around abstraction. That's to say why we might want to use abstraction to begin with and when we want to avoid using it as well.