Claude
Skills
Sign in
โ† Back

java-design-principles

Included with Lifetime
$97 forever

A comprehensive guide providing essential design principles and best practices for Java development

Design

What this skill does


# Java Design Principles

A comprehensive guide providing essential design principles and best practices for Java development. Structured for step-by-step learning from beginners to advanced developers.

## When to Use This Skill

Use this skill in the following situations:

- ๐Ÿ—๏ธ **When designing new Java projects** - Apply correct principles when making architectural decisions
- ๐Ÿ”ง **When refactoring existing code** - Check guidelines for code quality improvement
- ๐Ÿ‘€ **When performing code reviews** - Systematically review for design principle violations
- ๐ŸŽฏ **When making class design decisions** - Inheritance vs composition, interface segregation, etc.
- ๐Ÿงฉ **When managing dependencies between modules** - Methods to reduce coupling and increase cohesion
- ๐Ÿ“š **When training junior developers** - Systematically convey core design principles
- ๐Ÿ› **When resolving technical debt** - Identify which principles have been violated and improve

## ๐Ÿ“š Learning Path

### ๐ŸŒฑ Beginner - Starting with Simplicity

An introductory course for those learning design principles for the first time.

1. **[Simplicity Principles](./core-concepts/simplicity-principles.md)**
   - KISS (Keep It Simple, Stupid)
   - YAGNI (You Aren't Gonna Need It)
   - Do The Simplest Thing That Could Possibly Work

   ๐Ÿ’ก *Why learn this first?* Before learning complex principles, developing the habit of writing simple code is most important.

### ๐Ÿš€ Intermediate - Core Design Principles

Learn the core principles of object-oriented design.

2. **[SOLID Principles](./core-concepts/solid-principles.md)**
   - Single Responsibility Principle
   - Open/Closed Principle
   - Liskov Substitution Principle
   - Interface Segregation Principle
   - Dependency Inversion Principle

   ๐Ÿ’ก *Why is this important?* SOLID is an essential principle for writing maintainable and extensible code.

3. **[Coupling and Cohesion](./core-concepts/coupling-cohesion.md)**
   - DRY (Don't Repeat Yourself)
   - Separation of Concerns
   - Minimize Coupling / Maximize Cohesion
   - Law of Demeter
   - Composition Over Inheritance

   ๐Ÿ’ก *Practical Application:* Learn how to properly design relationships between modules.

### ๐ŸŽฏ Advanced - In-depth Principles and Patterns

Learn more in-depth design principles and practical patterns.

4. **[Encapsulation](./core-concepts/encapsulation.md)**
   - Encapsulation & Information Hiding
   - Encapsulate What Changes

5. **[Advanced Principles](./core-concepts/advanced-principles.md)**
   - Code For The Maintainer
   - Boy-Scout Rule
   - Avoid Premature Optimization
   - Inversion of Control
   - Command Query Separation
   - Robustness Principle (Postel's Law)

6. **[Practical Patterns](./patterns/common-patterns.md)**
   - Good vs Bad examples of 5 core patterns
   - Single Responsibility
   - Open/Closed
   - Law of Demeter
   - Composition Over Inheritance
   - DRY

## ๐Ÿ“– Additional Resources

- **[Best Practices & Common Pitfalls](./best-practices.md)**
  - Checklists for design/coding/maintenance
  - 8 common mistakes to avoid

- **[Resources](./resources.md)**
  - Essential books
  - Online resources
  - Practice materials

## ๐ŸŽ“ Learning Tips

### Recommended Order for Beginners

1. **Week 1**: Read and practice simplicity principles
2. **Week 2-3**: Learn SOLID principles one by one (one per day)
3. **Week 4**: Understand coupling/cohesion concepts
4. **Week 5**: Practice with practical patterns
5. **Week 6+**: Code review with Best Practices checklist

### For Those with Experience

- Learn selectively starting with principles of interest
- Read Common Pitfalls first and apply to your current code
- Use this guide as reference documentation during team code reviews

## ๐Ÿ“‚ Project Structure

```
java-design-principles/
โ”œโ”€โ”€ SKILL.md (this file)
โ”œโ”€โ”€ core-concepts/
โ”‚   โ”œโ”€โ”€ simplicity-principles.md
โ”‚   โ”œโ”€โ”€ solid-principles.md
โ”‚   โ”œโ”€โ”€ coupling-cohesion.md
โ”‚   โ”œโ”€โ”€ encapsulation.md
โ”‚   โ””โ”€โ”€ advanced-principles.md
โ”œโ”€โ”€ patterns/
โ”‚   โ””โ”€โ”€ common-patterns.md
โ”œโ”€โ”€ best-practices.md
โ””โ”€โ”€ resources.md
```

## ๐Ÿค Contributing

If you want to contribute to this guide:
- Open an issue if you find typos or improvements
- Send a Pull Request if you have better examples
- Share practical use cases

---

**License**: MIT
**Last Updated**: November 2025

Happy Coding! ๐Ÿš€

Related in Design