💬 Week 4 – Discussion Questions
These questions are designed to encourage deeper thinking about design patterns and clean architecture.
Discuss them in class, mentorship sessions, or peer groups.
🧠 Design Pattern Reflection
1️⃣ When should you NOT use a design pattern?
Can using too many patterns make code worse?
2️⃣ Why is Singleton sometimes called an anti-pattern?
What problems can it cause in large applications?
3️⃣ How does Factory reduce tight coupling?
What would happen if we directly used new everywhere?
4️⃣ When is Builder unnecessary?
Can constructors sometimes be simpler?
5️⃣ How does Strategy improve flexibility compared to if-else chains?
What happens when we need to add a new discount type?
🏗 Architecture Thinking
6️⃣ Why should Controller not directly access Repository?
What problems can this create?
7️⃣ What is the benefit of separating Service and Repository layers?
How does this help in testing?
8️⃣ What is “Separation of Concerns”?
Can you identify concerns in your project?
🔍 Code Review Reflection
9️⃣ Look at your refactored project:
- Is any class doing too much?
- Are responsibilities clearly separated?
- Are class names meaningful?
🔟 If you had to scale your project to 10,000 users, what would you change?
🚀 Advanced Thinking (Optional)
These are optional but important for future growth:
- How would Spring Boot automatically manage layers?
- How does Dependency Injection relate to Strategy?
- Where would you use interfaces in large-scale systems?
- What is the difference between architecture and design pattern?
🎯 Final Reflection
Write a short paragraph answering:
- What did you learn this week that changed how you think about coding?
- Do you now see the difference between “working code” and “well-designed code”?