Chapter 9. Ratpack and Spring Boot
Earlier in the book, we discussed Ratpack’s concept of registries and how registries are used to store and retrieve components that are used throughout the framework and your application. As you well know by now, registries are the mechanism that allow you to build Ratpack applications with no dependency injection (DI) with Guice and Guice modules. It is also through the Registry
paradigm that we can accommodate an application architecture that employs multiple DI frameworks to allow for the most flexibility and use of best-in-breed tooling.
All of this is to say, a unique an important feature of Ratpack’s is its ability to interoperate with one or more DI providers in isolation, allowing you to leverage the strengths of whatever component providing framework you choose, without the risk of those frameworks overlapping one another. From an application development perspective, if you continue to use the Registry
as your mechanism for retrieving components, the underlying backing of that registry will not drastically change how your code looks, and will allow you to choose to bootstrap components in your application as is best suited to your requirements.
This is important to application development because there are many libraries available that ship with integrations specifically for Guice or Spring. With other web frameworks that do not provide you an abstraction on DI, your application needs to be structured around the DI provider that is already ...
Get Learning Ratpack now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.