Loïc Faugeron is back again with another of his "Ultimate Developer Guide" tutorials in his series. In his latest he looks at the Bundle component and the functionality it introduces as it relates to some of the components already discussed (like HttpKernel).
In this guide we've explored the main standalone libraries (also known as "Components") provided by Symfony to help us build applications: HTTP Kernel and HTTP Foundation, Event Dispatcher, Routing and YAML, Dependency Injection and Console. In this article, we're going to have a closer look at how HttpKernel enables reusable code.
He starts by comparing the HttpKernel and Kernel components, laying them out so that their use makes sense later. From there he then gets into the actual Bundle component. He introduces the component, provides a code example showing its interface and talks about situations where bundles could be useful. To help make it a bit more "real world" he then shows how to create a "NanoFrameworkBundle" complete with
Compiler, configuration and bundle definition examples.