
Explore design patterns in Kotlin, learn why they solve common, scalable problems, and apply Gang of Four patterns to Kotlin Android development with best practices.
Explore creational, structural, and behavioral design patterns in Kotlin, and note that concurrency patterns are not covered in this course.
Discusses the Udemy review system and competition, explains how reviews affect course visibility, and invites constructive feedback to improve the complete Kotlin design patterns masterclass.
Set up a Kotlin project in IntelliJ IDEA with Gradle and Kotlin JVM, add JUnit Jupiter and AssertJ, and create a calculator test to verify a sum function. Run tests.
Explore the singleton pattern, and see how Kotlin uses object to create a single instance, contrasting it with the Java way and applying it to a network driver example.
Explore how Kotlin factory method separates currency creation from country logic using a currency factory, enabling euro, United States dollar, and Canadian dollar while improving testability and reducing bug introduction.
Explore abstract factory, a higher-level pattern that decouples data display from data sources and uses a data source factory to supply database or network data.
Explains the builder pattern for Kotlin on the JVM, showing how to configure optional parameters and build a component like an alert dialog via a builder and a build method.
Explore lazy initialization as a memory-friendly pattern in Kotlin, using val with lazy and var with lateinit to instantiate large resources only when needed.
Explore prototype design pattern, a creational approach for copying objects via a cloneable interface and abstract shape class. Cache circle, square, and rectangle prototypes and clone them for client use.
Explore the adapter design pattern in Kotlin and Android, converting a third-party interface into a client-friendly form and adapting data formats for seamless integration.
Explore the bridge design pattern by splitting orthogonal traits into two inheritance trees and connecting them with a bridge, using devices and remotes such as tv and radio.
Describe how the facade pattern provides a simple interface to complex functionality, hiding behind-the-scenes details (such as a network library) and simplifying client code so you focus on the result.
Master the decorator pattern by wrapping an existing object to add new behavior without changing its code. Extend and override functionality with a coffee machine example.
Apply the composite design pattern to build a tree of components, where each equipment contributes to a total price and can be manipulated as a single unit.
Learn the observer pattern, a one-to-many subscription system where an event manager notifies subscribers like a logger and email service when a file is opened or saved.
Explore the chain of responsibility design pattern by building a chain of handlers that process a request, can pass it along to the next handler, or stop when handled.
Explore the command design pattern by wrapping requests in command objects with an execute method, queuing them for a dispatcher or processor in an online ordering example.
Learn how the strategy pattern lets a context swap algorithms at runtime with interchangeable strategy objects, demonstrated in Kotlin via a printer using lowercase or uppercase formatters.
Explore the state design pattern as a finite state machine, where an object changes behavior by moving between states like unauthorized and authorized, driven by login and logout.
Explore the visitor design pattern by separating algorithms from elements in a project management context, using visitable elements and visitor contracts to compute monthly and yearly costs.
Explore the mediator design pattern, a central mediator that coordinates communication between objects like a chat system, reducing dependencies by routing messages through a central hub.
Apply the memento design pattern to save and restore an object's state, using originator to create mementos and caretaker to save and restore states.
Apply this knowledge in everyday programming and recognize how design patterns reveal code structure and architecture, as the instructor thanks you and invites you to explore more courses.
Kotlin is the main development language for the Android system.
Knowing how to build well structured programs and apps, that are scalable and robust is essential for every developer.
That's why I've created this course on Design Patterns for Kotlin.
Here you will learn how to apply popular patterns to your code, such as Builder, Adapter, Abstract Factory, as well as lesser known but very useful patterns, such as Composite, Decorator, Strategy etc.
This course will teach you how to structure your code so that it is more maintainable as it grows, and that it's easier to debug and test. When building a new project, you are not trying to reinvent the wheel, but instead to implement the correct solutions to the problems that you encounter.
It will also teach you the terminology that you need when you communicate with top level developers. When they say they implemented a factory for a piece of code, or the added a builder pattern for the creation of a certain object, you will immediately know what they mean.
This course covers 3 types of design patterns
Creational
Structural
Behavioural
We will also include code samples at each step of the way, so that you already know how to implement these patterns in practice.
Sign up today, and let's learn how to use Design Patterns in Kotlin.