Skip to main content
← Blog
Desarrollo

Design Patterns: The Great Unknowns

3 min read
Design Patterns: The Great Unknowns

Design patterns were a mystery to me for a long time. I’d heard the term thrown around but didn’t really understand what the fuss was about — until I started using them.

What are design patterns?

When you’re stuck on a problem, there’s a good chance someone else has faced it before. That’s why we search Stack Overflow. If the class structure you need to solve a problem can be extracted, reused, and applied regardless of the specific application, you’re looking at a design pattern.

The concept isn’t new. It goes back to the 1970s and was popularized in the ’90s by the famous Gang of Four book — Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. They documented 23 patterns that have been a reference ever since.

Why do they matter?

They save time. If you always start a new app with the same structure — business logic in a specific package, UI separated from data — you stop reinventing the wheel every project. You spend that time on things that actually matter for that specific app.

They give you confidence in your code. When you build something new, it’s easy to wonder if you’re doing it right. Design patterns are battle-tested solutions used by millions of developers. If you choose the right pattern for the problem, you’re not just saving time — you’re applying one of the best-known solutions to that class of problem.

They create shared vocabulary. This is the most underrated benefit, especially in teams. When everyone follows the same structural conventions, explaining the codebase to someone new takes minutes instead of hours. Everyone moves in the same direction, faster.

Which pattern for which problem?

Here’s the real question — and there’s no universal answer. Different platforms have different defaults:

Android doesn’t enforce a specific pattern, but MVP (Model-View-Presenter) has become the standard. It separates the display logic from the business logic cleanly.

iOS has MVC (Model-View-Controller) baked into its architecture and Apple’s own guidelines push you toward it by default.

Xamarin.Forms cross-platform apps commonly use MVVM (Model-View-ViewModel), which maps well to Xamarin’s data binding system.

I started caring about design patterns when my apps grew to the point where I could feel the cost of not having a clear structure. The moment you have to explain code to a colleague — or come back to your own code after three months — you’ll understand why patterns matter.

Which patterns do you use in your apps? Do you find them worth the overhead?


More in Desarrollo