Changes between Version 6 and Version 7 of DependencyInjection
- Timestamp:
- 07/07/12 22:32:57 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DependencyInjection
v6 v7 53 53 * In addition dependency injection makes it much easier to perform unit tests, for example a mock !DataManager and Database Resource could be injected and a particular component or service could be tested with out requiring the full system to be running. 54 54 * Spring already has the concept of "overrides" through inheritance and overriding beans thus making the need for a custom solution nearly obsolete 55 * Spring provides some advanced features such as Aspect Oriented Programming. Some uses for this feature would be to inject an operation before and after any method in the system. For example one could add an operation each time a metadata is changed without needing to change the code of the core geonetwork at all. Another example would be to replace keep the implementation of DataManager but override a single method withinDataManager.55 * Spring provides some advanced features such as Aspect Oriented Programming. Some uses for this feature would be to inject an operation before and after any method in the system. For example one could add an operation each time a metadata is changed without needing to change the code of the core geonetwork at all. Another example would be to replace keep the implementation of !DataManager but override a single method within !DataManager. 56 56 * Spring Security combined with dependency injection would allow access control on a per-method basis. For example one could designate specific methods that only Admin is permitted to execute and this can be done through configuration instead of code changes in the system. 57 57 * With the addition of spring security into the system Geonetwork already has dependencies and even uses spring. Thus it makes sense to use more of its functionality.