|
|
|
|
|
by pgwhalen
1613 days ago
|
|
> But how do you handle configuration then ? In the main method, then you can pass the configured values wherever you need to when new-ing classes. > At some point you want a user-facing UI where the available features (which are generally classes) are listed and the user can choose the feature, say which log backend is enabled, without having to change code - that's the whole point of it. (And the most tedious code to write by hand - a complete waste of time) I consider DI a valuable pattern, but I've never experienced anything close to this need. |
|
And you may say that you don’t need Aspect Oriented programming, but the usual handling of transactions in many other languages without some meta-programming is.. to not handle transactions. Putting a single annotation over a method is imo a very elegant way to handle this needed functionality.