REQUEST A DEMO

FubuMVC Wisdom: Bottles and StructureMap Registries

FubuMVC Bottles are pretty great. You can mix code, web endpoints and views in a “Bottle” assembly. Package them up as Nugets and you can re-use application functionality between your web applications just by adding a reference to a Bottle assembly.

Auto Import Referenced Bottle Registries

It is a really common pattern when you are using an IoC container like StructureMap in your Bottle that you want a registry imported when your bottle is loaded. Add the following code to the StructureMap Registry which you use when spinning up your FubuMVC application and your Bottle registries will be imported.

More On Bottles If you Like

Josh Arnold has a
post
or two about Bottles.

Also Jeremy Miller did a nice presentation on Bottles at Monkey Square.