November 2019
Beginner
804 pages
20h 1m
English
Decorators can be used to deal with cross-cutting concerns in your application—that is, concerns that are not directly related to application features but are instead present everywhere in the system and can't be isolated from the rest of the application.
Examples of cross-cutting concerns include logging, authorization, exception handling, transaction management, validation, caching, and more. All of these are secondary, but can't be taken out or isolated without loss.
Decorators help us to tackle such concerns cleanly. By annotating classes and their fields with decorators, and therefore adding metadata/behavior, you can add specific information/logic where needed, without necessarily cluttering your code.
Read now
Unlock full access