Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Practicing Design Patterns

Android/Kotlin learning repo for practicing design patterns through incremental branches.

This repository is intentionally organized as a step-by-step exercise. The master branch acts as the index, while each practice branch captures one stage of the implementation so readers can follow the evolution of the code over time.

Current Practice: Strategy Pattern

The first practice explores the Strategy pattern using a small Android duck simulation inspired by the classic "encapsulate what varies" example.

The goal is to show how behavior can move from concrete classes into interchangeable strategy objects, making the app easier to extend without changing every duck type.

Branch Walkthrough

Step Branch Focus
1 1-StrategyInit Initial setup for the Strategy pattern practice.
2 1-1-StrategyNewFeatureRequested Adds a new flying feature directly, exposing the need for a better design.
3 1-2-StrategyEncapsulateWhatVaries Encapsulates behaviors that vary behind interfaces.
4 1-3-StrategyIntegratingDuckBehaviors Integrates fly and quack behaviors into the duck types.
5 1-4-StrategySettingBehaviorDynamically Demonstrates changing duck behavior at runtime.

How To Read This Repo

Start from the earliest branch and move forward one branch at a time:

git checkout 1-StrategyInit
git checkout 1-1-StrategyNewFeatureRequested
git checkout 1-2-StrategyEncapsulateWhatVaries
git checkout 1-3-StrategyIntegratingDuckBehaviors
git checkout 1-4-StrategySettingBehaviorDynamically

The value of the repo is in the progression between branches, not only in the final state.

Portfolio Context

This is a public learning project. It is included as evidence of design-pattern practice, incremental refactoring, and the ability to explain architecture concepts through small Android examples.

About

Android/Kotlin design patterns practice organized as step-by-step branches

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors