Closed weijyewang closed 8 years ago
Commangular does not keep a history, but you could use Interception to implement this yourself, relatively easily. http://commangular.org/docs/#command-aspects
It's my opinion that the authorization feature you refer to should not be rolled into the framework, and can also be easily created using Interception. The author may or may not share this opinion with me, but I'd prefer Commangular to stay small and focused.
@tjdownes totally agree with you regarding the history. As for the authorization feature, I think it should be pre-configure during the config phase of angular life cycle, which suppose to happen before commangular.aspect().
Hi, I'm the author of commangular and I'm totally agree with @tjdownes. The framework should be smallest as posible and focused. The idea is to manage commands and execution flows. The history feature is easy to implement using event and command aspects and I think it is the way to go. The same for the authorization feature. You can develop a @Before interceptor controlling what commands can be executed based on your conditions. You can build this features on top of commangular, but I think they are outside from the commangular scope.
@yukatan thanks for the idea. I will try to implement it
Does commangular keep history for a list of commands that have been executed?
Bonus question: Any plans to implement authorization feature in the future? Example: Register a list of users that is authorized to be able to perform a set of commands based on namespace in .mapTo().