[Home](../) › [Metalama](../metalama) › When to Use Metalama

# When to Use Metalama

> This web section lists different use cases of Metalama.

Canonical: https://postsharp.net/metalama/applications/

Metalama is not for every project. Consider using Metalama if one of the following situations applies to your project:

* **Large projects.** Your project contains dozens of entities and hundreds of properties or methods requiring the same behaviors.
* **Large teams.** There is a large team of developers, and it is challenging to align everyone on consistent patterns and practices.
* **Long lifecycle.** You must maintain the project for several years, so an investment in long-term quality makes sense.

## When _not_ to use Metalama

Conversely, *avoid* using Metalama if:

* **Small and simple projects.** If your project is trivial, the added complexity might outweigh the benefits. As a rule of thumb, each aspect should be applied at least 20 times to justify its use.
* **Inexperienced team.** Don't embark on a Metalama journey if you lack senior developers or architects on your team. Like any sharp tool, Metalama requires maturity and wisdom in selecting use cases; misuse can introduce unnecessary complexity.

## Which factors are almost irrelevant

* **Code-generation overhead.** Metalama expands aspects into plain C# at compile time (there is no run-time engine), so the generated code runs exactly like the same logic written by hand, and sometimes faster: idiomatic hand-written C# favors compact, readable patterns, while a generator can emit an uglier but faster one. The functionality an aspect adds still costs what it would cost either way; Metalama itself adds no run-time overhead.
* **Compilation time.** Metalama typically adds 25% to your `dotnet build` time, which is probably not a big difference for most projects. If it does seem important, it might mean Metalama's benefits won't outweigh the added complexity.

## What are the principal use cases?

| Category | Description |
|----------|----------|
| [Principles At Work](https://postsharp.net/metalama/applications/principles) | See how Metalama can help implement fundamental software development principles like Clean Code, SOLID, DRY, Aspect-Oriented Programming, Architecture Verification, or Refactoring.|
| [Classics](https://postsharp.net/metalama/applications/classics) | See typical and concrete use cases of Metalama in software application development. |
| [DevOps](https://postsharp.net/metalama/applications/devops) | Learn how Metalama can help move from a prototype to a production-ready application with technical features like logging, metrics, caching, exception handling, and resilience. |
| [Alternatives](https://postsharp.net/metalama/alternatives) | See alternatives of Metalama in different areas of application. |

---

## Site navigation

- Previous: [Features](features.md)
- Next: [Marketplace](marketplace)
- Index of the whole site: [llms.txt](../llms.txt)

