File-based (XML) versus code-based configuration

The benefit of XML-based configuration is that you can alter dependencies without recompiling, building, and deploying the application code. This sounds useful in a situation where you need to swap the dependencies of the same type. But again, is this really what you are looking for? In other words, if you do not have the requirements for changing the implementation of dependencies on the fly at runtime, then file-based configuration is not that useful.

On the downside, file-based configuration is generally more difficult to read and analyze, especially when it becomes large and clumsy. XML-based configuration does not warn you about any errors at compile time. Such errors can only be picked up at runtime, and they are quite tricky and time-consuming to fix. On the other hand, code-based configuration supports compile-time error checking. This means that if the build is successful, you are done and will not get any surprises at runtime.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.119.106