JSFDays 2009: Unterschied zwischen den Versionen
(yFSwVmgm) |
(EgywnDdEFFNfDZO) |
||
Zeile 1: | Zeile 1: | ||
− | + | everything smart I could have said (or not) about IOC. So I will only shortly debircse my recent experience with using Spring IOC in an industrial project: I used it primarily to configure services that different components of our application are using.The main gain was certainly the separation of concerns between main applications, components and services (I started from a version of the service configurator where everything was more or less hard-wired: it was quite a testing and maintenance nightmare). Components and services got more loosely coupled which, beyond making the code more maintainable, make them also far easier to unit test.I certainly had my share of problems with misspellings in XML configuration files and interpreting Spring error messages (which are quite detailled and accurate yet not always as helpful as you would wish), but all in all I think it was worth the effort. The Java code I would have had to write to offer a similar functionality, would either have been very specific to our application or would have been something like a new IOC implementation so using a framework like Spring was from my point of view a gain in reusability and maintainability.To sum it up from my experience: IOC is certainly not a silver bullet (who's dreaming of one will always end up being terribly disappointed) but it's a technique you should be aware of and able to use knowing when it makes sense. |
Version vom 16. Dezember 2012, 06:25 Uhr
everything smart I could have said (or not) about IOC. So I will only shortly debircse my recent experience with using Spring IOC in an industrial project: I used it primarily to configure services that different components of our application are using.The main gain was certainly the separation of concerns between main applications, components and services (I started from a version of the service configurator where everything was more or less hard-wired: it was quite a testing and maintenance nightmare). Components and services got more loosely coupled which, beyond making the code more maintainable, make them also far easier to unit test.I certainly had my share of problems with misspellings in XML configuration files and interpreting Spring error messages (which are quite detailled and accurate yet not always as helpful as you would wish), but all in all I think it was worth the effort. The Java code I would have had to write to offer a similar functionality, would either have been very specific to our application or would have been something like a new IOC implementation so using a framework like Spring was from my point of view a gain in reusability and maintainability.To sum it up from my experience: IOC is certainly not a silver bullet (who's dreaming of one will always end up being terribly disappointed) but it's a technique you should be aware of and able to use knowing when it makes sense.