51 | | * Using the Spring dependency injection framework it is simple to replace one implementation of an object with another. Many objects are already configurable like Resource providers and services but many are not. For example suppose you wanted to use a subclass of DataManager instead of the standard implementation. Currently that requires rebuilding Geonetwork. With spring that is a configuration detail. |
52 | | * The dependency injection also provides a simple plugin system. Currently Jeeves and sometimes other subsystems have plugins (like services and schedulers) and the code for parsing the xml, instantiating the classes injecting dependencies is all handled in the Geonetwork/Jeeves code. Spring takes care of this and provides a much more flexible and powerful plugin system than Jeeves. |
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. |
| 51 | * Using the Spring dependency injection framework it is simple to replace one implementation of an object with another. Many objects are already configurable like Resource providers and services but many are not. For example suppose you wanted to use a subclass of !DataManager instead of the standard implementation. Currently that requires rebuilding Geonetwork. With spring that is a configuration detail. |
| 52 | * The dependency injection also provides a simple plugin system. Currently Jeeves and sometimes other subsystems have plugins (like services and schedulers) and the code for parsing the xml, instantiating the classes injecting dependencies is all handled in the !Geonetwork/Jeeves code. Spring takes care of this and provides a much more flexible and powerful plugin system than Jeeves. |
| 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. |
65 | | * Currently GetRecords only supports a few output formats, suppose you want to add more output formats. If the GetRecords, GetCapabilities, etc.. were injected it would be easy to intercept requests going to those services and handle extra formats or (in the case of GetCapabilties) modify the output of the service. |
66 | | * Currently if one want to have object available throughout the system (like DataManager or SearchManager) they have to be added to the Geonet object (or ServiceContext). However suppose one wants a set of services to be able to communicate together or share an object like a SearchManager then that requires substantial changes to the system. With Dependency injection it is again just a configuration detail (and of course implementation of the services and the object) and can be added to a release Geonetwork instance. |
| 65 | * Currently !GetRecords only supports a few output formats, suppose you want to add more output formats. If the !GetRecords, !GetCapabilities, etc.. were injected it would be easy to intercept requests going to those services and handle extra formats or (in the case of !GetCapabilties) modify the output of the service. |
| 66 | * Currently if one want to have object available throughout the system (like !DataManager or !SearchManager) they have to be added to the Geonet object (or !ServiceContext). However suppose one wants a set of services to be able to communicate together or share an object like a !SearchManager then that requires substantial changes to the system. With Dependency injection it is again just a configuration detail (and of course implementation of the services and the object) and can be added to a release Geonetwork instance. |
80 | | * There are still two main layers. Jeeves and Geonetwork. The Jeeves module still has the primary concepts like Service, ResourceManager, ServiceManager, etc… and Geonetwork is still the application. |
81 | | * Geonetwork will no longer be responsible for creating classes like the DataManager, SchemaManager, SearchManager etc… Spring will create all of those classes and wire them together. |
| 80 | * There are still two main layers. Jeeves and Geonetwork. The Jeeves module still has the primary concepts like Service, !ResourceManager, !ServiceManager, etc… and Geonetwork is still the application. |
| 81 | * Geonetwork will no longer be responsible for creating classes like the !DataManager, !SchemaManager, !SearchManager etc… Spring will create all of those classes and wire them together. |