Monday, April 9, 2012

Bottles

Jeremy Miller, shown in glowing light in the upper right of the photo above, is the primary author of Bottles which may currently be used in FubuMVC projects and which will eventually be included as a feature of MassTransit. The tool is being used live, but it is not yet in version 1.0. Bottles is a package management strategy of sorts. It is somewhat based on the JAR files of Java in concept. In a bottle-aware framework, such as Fubu, one may create a folder within one's bin folder (called "Fubu Packages" in a Fubu implementation) into which one may put bottles. Bottles are .zip files. The addition to the bin folder will make the application restart and reconsider what is in the bin folder. The functionality within the .zip file may be considered by the bottle-aware app without the app having to be recompiled and without the bottle-aware app being configured manually to reference to new content! This is the magic! How does the magic work? One needs an IoC container (for example: Jeremy Miller's StructureMap) and the IoC container needs to be capable of scanning assemblies. With StructureMap, if one has a default rule in which x references y, one may "overpower" by following the rule with another in which x references z. The Fubu framework will define the default set of IoC rules, crawl the bottles, and then suggest some better rules based on what it finds. This was my loose understanding of how the magic happened. NuGet may be used to get some of the bottles, but it cannot put them into the folder within the bin folder for you (I don't think). There is another tool called Milkman that will put bottles into the appropriate place. I learned about Bottles this evening in a presentation by Dru Sellers at ADNUG (Austin .NET User Group). Dru is pictured below in the blue shirt.

No comments:

Post a Comment