Getting started with design patterns in Java with Eunjong
You can learn design patterns to implement flexible and scalable object-oriented programming. Learn various patterns that can be used in the real world and apply them to your projects and code refactoring.
Kakao internal developer training course! Learn only carefully selected design patterns 🤓
Design patterns learned through real-life examples ✨
Why are many systems being developed in object-oriented programming languages? It is to make it more efficient to expand functions, change requirements, and maintain systems or solutions after they are developed. In order for these changes to be easy, proper object-oriented design must be done from the design stage. Learning design patterns will help you understand and apply various solutions for design.
Why should you study design patterns? 🤔
If the same solution can be applied to a problem that occurs repeatedly, this design is called a pattern. Design patterns are a field in which the first four scholars, GoF, analyzed several existing systems and software and organized the direction of the most reasonable solution for each problem . Therefore, design patterns are not rules or grammar. Also, they are not limited to languages and can be applied to any object-oriented language.
Developers also use frameworks and good methodologies to develop flexible and maintainable programs. Design patterns are already applied to many frameworks . Learning about the patterns themselves is meaningful, but if you design an efficient solution to solve a problem, you can create your own patterns.
This lecture is used as a video for training internal developers at Kakao . It was created to help those who know Java grammar but have difficulty with object-oriented design using classes learn through design patterns. There are 23 patterns introduced by GoF, but in this lecture, we will introduce only 16 patterns that are actually used a lot in the field and useful in practice . Please study only the patterns that are widely used and applied in other frameworks and libraries! Studying this will also help you understand the framework later.
Learn with easy and fun examples ✨
Each pattern can be easily understood through examples.
We provide sample code and apply design patterns to refactor the code for extensibility. You can learn by observing the code changing through pattern application.
We will teach you design methods that can be applied in the field.
I recommend this to these people 🙋♀️
For those who don't know how to do object-oriented programming
Developer job seekers or new or junior developers
Anyone who wants to experience OOP development using Java
For those who want to understand design principles before studying the framework
Learn things like this 🤓
-Learning example of Strategy pattern
1. What is the problem?
First, let's explain what the problematic situation is that led to this pattern and what this pattern is designed to do and intended to improve.
2. Understanding patterns through class diagrams
Learn how patterns are applied through class diagrams and realistic, easy-to-follow examples.
3. Applying patterns and refactoring through realistic examples
📢 Please check before taking the class!
The GitLab address and the source GitHub address used in the lecture can be found in the lecture notes at the bottom of the Factory Method lecture in Section 1.
Preview of course reviews 📜
*This is feedback on external mentoring that the knowledge sharer went through in the same process.
"I was able to learn effective patterns that are mainly used, from the singleton pattern to the adapter pattern. By understanding the characteristics of each pattern and the cooperative relationship between objects, I was able to better understand the Spring Framework that I will learn later."
Innovation Academy - Kang*su
"Before I started studying, I had a hard time understanding the patterns even when I read the book description and looked at the UML. As I was studying, after about 2-3 weeks, I mainly thought that design patterns were a methodology to use abstraction and interfaces well. However, as I continued studying, I began to understand why these patterns had to come out, and I was able to proceed with the study. After the study, I was surprised at how well I understood each pattern."
Innovation Academy - Lee*
"I applied for the study group after learning Java for the first time. The study group was conducted by refactoring code and solving assignments using various design patterns such as the bridge pattern, factory method pattern, and observer pattern every week. I was able to understand the parts that were difficult when studying design patterns on my own through assignments and study groups in a fun way."
Innovation Academy - Kim*Yeon
"This design pattern study was more fun than the last Java study! In particular, I remember the factory pattern, strategy pattern, and observer pattern well. I think I was able to experience, even if just a little, the tremendous power of ease of maintenance through design patterns. I am currently working on a project using Spring, and I hope to be able to write slightly better code by applying what I learned through this study."
Innovation Academy - Jo*jin
What you'll learn 📚
1. What is a design pattern? What is refactoring?
2. Patterns for creating objects
Factory Method - Object creation and refactoring using factories
Abstract Factory - Create a set of instances by selecting a factory.
Singleton - Create only one instance
3. Make it more flexible by separating the algorithm skeleton or function and implementation.
Strategy - Separate policies or algorithms and allow for additional replacement as needed.
Bridge - Separates the part where the function is declared from the various implementations and connects them through a bridge.
Template Method - Fixed flow is defined as a template, and methods that can be implemented in various ways within it are implemented in subclasses.
4. Identify
Decorator - Add various functions flexibly (Identify Object and Decorator)
Composite - Identifies a simple object with a composite object that contains it.
5. Make it flexible by expressing the state as a class
State - When class-wide functionality is determined based on multiple values of the state.
Observer - When you need to notify changes to multiple objects (Observers) that depend on one object (Subject).
6. Make the complex simple
Facade - Provide a single interface for clients to use easily.
Mediator - Prevents multiple objects from communicating with each other and only communicates with one central object.
7. Patterns that move around the structure
Iterator - Provide a uniform interface for how to iterate over an object.
Visitor - Visits an object and performs a function.
8. How to control access
Proxy - A delegate for a real object
9. Compatibility
Adapter - Change the interface to what the client wants.
10. Command as an object
Command - Encapsulates and processes tasks that need to be performed in a variety of ways into a consistent interface.
11. Smart life with design patterns
Expected Questions Q&A 💬
Q. Can I get started without knowing Java? Or do I need to be a beginner?
Even if you don't know Java, you can take the course if you know other OOP languages. However, if you have no basic knowledge at all, there is a free introductory Java course on Inflearn. I recommend you take that course first.
Q. I studied other object-oriented languages(C++, C#). Can I still take the course?
Most OOP languages are designed with similar concepts. Therefore, if you have already learned an object-oriented language, taking this course will allow you to learn Java and object-oriented design at the same time, killing two birds with one stone.
Q. What are the benefits of learning design patterns?
Design patterns are neither grammar nor rules. However, they identify problems and provide the best design method for the problem. By learning this process along with code, you can implement various applications and extensions when designing a new program. By learning well-made patterns, you can implement better designs.
Q. Can this be applied in practice?
Many of the frameworks and programs we use in practice already have design patterns applied to various parts. Therefore, learning design patterns will be very helpful in understanding existing code. It will also be helpful in many ways in helping students write more efficient code in the future.
Introducing the knowledge sharer ✒️
I majored in computer engineering at Dongguk University and received a master's degree in computer engineering from Seoul National University. While working at the company, I worked on numerous development projects in languages such as Java, C, and C++, and gave lectures on Java, web, data structures and algorithms, mobile, and design patterns at Bit Computer and T Academy.
I taught programming classes for non-majors at Kookmin University and Kyunghee University, and taught Java programming and programming practice classes as a part-time professor at NHN NEXT. I worked as a developer for 10 years, so I know what's needed in the field, and I also taught for another 10 years, so I understand the minds of beginners.
My current main interest is to help people from all walks of life, from elementary school students to adults, to become interested in and study the wonderful world of programming. I am currently a mentor at Innovation Academy (42 Seoul).
History
Innovation Academy (42 SEOUL) Mentor
Author of 'Do It Java Programming Introduction' (Easy Publishing)
Fast Campus, creator of Inflearn's popular Java programming course
NHN NEXT part-time professor, Beat Education Center, TAcademy instructor
Spectra Development Team Leader
Modern Information Technology
Master's degree in Computer Science from Seoul National University
Bachelor of Computer Engineering, Dongguk University
People who want to learn object-oriented programming in another language and also learn the Java language
Those who have experience in Java projects
Those who want to learn object-oriented programming with design patterns
Need to know before starting?
java
Object-oriented programming language
Hello This is
1,601
Learners
64
Reviews
83
Answers
4.8
Rating
3
Courses
지식공유자 소개 ✒️
동국대학교에서 컴퓨터 공학을 전공하고 서울대학교 대학원에서 컴퓨터 공학 석사 학위를 받았습니다. 회사를 다닐 때는 자바, C, C++ 등 언어로 다수의 개발 프로젝트를 진행하였고, 비트 컴퓨터, T 아카데미에서 자바, 웹, 자료구조와 알고리즘, 모바일, 디자인 패턴 분야 등의 강의를 진행하였습니다.
국민대와 경희대에서 비전공자를 대상으로 하는 프로그래밍 강의를 하였으며, NHN NEXT에서 겸직 교수로 자바 프로그래밍과 프로그래밍 연습 강의를 진행했습니다. 10년은 개발자로 일했기에 실무에서 필요한 내용을 잘 알고, 또 다른 10년은 강의를 하며 초보자의 마음까지 잘 알게 되었습니다.
요즘 최대 관심사는 초등학생부터 어른까지 각계각층의 사람들이 멋진 프로그래밍 세계에 관심을 가지고 공부할 수 있도록 도와주는 것입니다. 현재는 이노베이션 아카데미(42서울)의 멘토로 있답니다.
I watched DoIt Java lecture first and was waiting for Eun Jong's other lecture. I had to study design patterns at that time, and Eun Jong was giving a design pattern lecture?! This was fate. I paid without hesitation for even a second. Explanation👍 Example👍
Thank you for your good review. I am so glad that you took the introductory course and also learned about design patterns. The first 2 people to write a review will receive the book "Do it Java Programming Introduction" on Monday. Please send your address and contact information to eunjong.park@gmail.com and I will send it on Monday. I hope you grow into a good developer.
Thank you for your good review. I will send you the book as soon as I receive the contact information of the other person who wrote the review. I am also proud of the lecture because you said it was easy to approach~
There are lecture materials at the gitlab address in the lecture notes at the bottom of the Fatory Method lecture. I announced it in the lecture introduction. Thank you^^
I was able to understand design patterns well in a short lecture of about 6 hours :)
However, if there are any regrettable parts,
1. The volume is low 2. The image quality was a bit disappointing.
Thank you for understanding. Even though we filmed it in a studio and edited it in Kakao, there were still some shortcomings. We will pay more attention next time.