Alex, a software engineer, is architecting an application composed of two C# projects: a data layer and a UI layer. His goal today is to choose tools and patterns that reduce boilerplate code and minimize human errors.
In the data layer, Alex utilizes the Metalama.Patterns.Caching
package which includes three aspects: [Cache]
for smart caching strategies, [InvalidateCache]
to purge cache entries, and [CacheKey]
for designating key properties. While these are applied to dozens of classes, Metalama's licensing counts on the number of the aspect types rather than
the number of times they have been used.
For the UI layer, Alex integrates [Observable]
and [Memoize]
aspects, adding just two aspect types to this C# project.
Alex also incorporates contract-based aspects such as [NotEmpty]
and [Range(0,100)]
, which, thanks to their inheritance from ContractAspect
, don't tally in the aspect type count.
Despite Alex's solution using five aspect types, each individual project remains within the three-type limit, fitting neatly within the Metalama [Free] tier.
As the project evolves and Metalama's virtues become more apparent, Alex is compelled to adopt additional aspects like [Log]
for logging, [Cloneable]
for cloning objects, and [Invariant]
for maintaining invariants, increasing the data layer's aspect type count to six.
To meet these expanded needs, Alex transitions to Metalama [Professional], which accommodates up to 10 aspect types and unlocks comprehensive features such as programmatic architecture validation and an advanced aspect testing framework.
Now fully embracing Metalama, Alex not only increases productivity, but also enhances the codebase quality.
All aspects integrate seamlessly, bringing his projects closer to the ideal of clean and maintainable code. With Metalama's advanced architectural validation at his disposal,
Alex confidently tackles complex refactoring challenges, and his application thrives.