<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Josh Arnold&#039;s Blog</title>
	<atom:link href="http://lostechies.com/josharnold/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/josharnold</link>
	<description>Startups, open source, and coffee.</description>
	<lastBuildDate>Fri, 09 Mar 2012 02:03:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Introducing the FubuMVC.Coffee transforms</title>
		<link>http://lostechies.com/josharnold/2012/03/04/introducing-the-fubumvc-coffee-transforms/</link>
		<comments>http://lostechies.com/josharnold/2012/03/04/introducing-the-fubumvc-coffee-transforms/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 06:01:34 +0000</pubDate>
		<dc:creator>Josh Arnold</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[assets]]></category>
		<category><![CDATA[bottles]]></category>
		<category><![CDATA[fubu]]></category>
		<category><![CDATA[fubumvc]]></category>

		<guid isPermaLink="false">http://lostechies.com/josharnold/?p=162</guid>
		<description><![CDATA[If you’re a fan of CoffeeScript and FubuMVC, then please take a moment and give a round of applause to Alex Henning Johannessen for his hard work on the CoffeeScript and Less transforms. In this post, I am going to&#160;&#8230; <a href="http://lostechies.com/josharnold/2012/03/04/introducing-the-fubumvc-coffee-transforms/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you’re a fan of CoffeeScript and FubuMVC, then please take a moment and give a round of applause to <a href="https://twitter.com/#!/ahjohannessen">Alex Henning Johannessen</a> for his hard work on the CoffeeScript and Less transforms.</p>
<p>In this post, I am going to provide an example of how to use the FubuMVC.Coffee NuGet in your FubuMVC application.</p>
<h2>Where’s the code?</h2>
<p>I’ve created a repository to show of example of all of this in action: <a href="https://github.com/jmarnold/FubuOnCoffee">https://github.com/jmarnold/FubuOnCoffee</a></p>
<h2>Getting Started</h2>
<p>A nice introductory post to FubuMVC’s Asset pipeline is well overdue. I’m going to touch on the simplest configuration and just promise that I’ll get to a more in-depth blog about it later.</p>
<p>First, we start by creating an asset config file (*.asset.config):</p>
<p><script src="https://gist.github.com/1970839.js?file=core.asset.config"></script></p>
<p>For more examples on the syntax, check out the <a href="https://github.com/DarthFubuMVC/fubumvc/blob/master/src/FubuMVC.Core/Assets/AssetDslReader.cs#L15">dsl reader</a>.</p>
<h2>Configuring the Transform</h2>
<p>Running your application with above asset configuration will “run”, but you’re going to get the raw contents of the coffeescript file. In order to enable the transformation, you can install the <a href="https://nuget.org/packages/FubuMVC.Coffee">FubuMVC.Coffee nuget</a>:</p>
<blockquote><p>Install-Package FubuMVC.Coffee</p></blockquote>
<p>This will install a zip file inside of a fubu-content directory at the root of your web application. <a href="http://lostechies.com/josharnold/2011/09/05/modularity-via-bottles/">Thanks to the beauty of Bottles</a>, this zip file will be exploded out and the CoffeeScript configuration will be invoked automatically.</p>
<p>Now running your application with above asset configuration will give you the transformed contents of example.coffee.</p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/josharnold/2012/03/04/introducing-the-fubumvc-coffee-transforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Jasmine in .NET</title>
		<link>http://lostechies.com/josharnold/2012/02/25/running-jasmine-specs-in-dotnet-with-serenity/</link>
		<comments>http://lostechies.com/josharnold/2012/02/25/running-jasmine-specs-in-dotnet-with-serenity/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 05:50:01 +0000</pubDate>
		<dc:creator>Josh Arnold</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[fubu]]></category>
		<category><![CDATA[jasmine]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[serenity]]></category>

		<guid isPermaLink="false">http://lostechies.com/josharnold/?p=159</guid>
		<description><![CDATA[I’m going to deviate from my usual style of “I’m going to tell you about something I think is cool without giving you any context” and write an informative post. I know. Brace yourselves. What is Jasmine? From the Jasmine&#160;&#8230; <a href="http://lostechies.com/josharnold/2012/02/25/running-jasmine-specs-in-dotnet-with-serenity/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’m going to deviate from my usual style of “I’m going to tell you about something I think is cool without giving you any context” and write an informative post. I know. Brace yourselves.</p>
<h2>What is Jasmine?</h2>
<p>From the Jasmine docs:</p>
<blockquote><p>Jasmine is a behavior-driven development framework for testing your JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.</p></blockquote>
<p>If you’ve done any work with Jasmine (even if it’s a simple “Hello, World!”), you know that the basic setup is the <a href="http://www.watchmecode.net/jasmine-standalone">Jasmine Standalone Runner</a>.</p>
<h2>What’s wrong with the Standalone runner?</h2>
<p>The standalone Jasmine runner requires some basic boilerplate content within html and javascript files to execute your specs. This works great for a very simple setup but as you try to use this in an actual project, you may find yourself feeling the following pains:</p>
<ul>
<li>Lack of build/rake/CI integration</li>
<li>Tedious/repetitive setup required to organize your specs</li>
</ul>
<p>Let me elaborate on that last one: the standalone runner works great for a single spec file. For each spec file that you want to test, you need an equivalent test runner html file.</p>
<p>My team needed a solution to alleviate this pain…so naturally, I waited for Jeremy to do something about it <img src='http://lostechies.com/josharnold/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<h2>Introducing Serenity</h2>
<p>The Jasmine Runner within Serenity leverages Bottles and the Fubu Kayak host to spin up a content-only Fubu application that sits on top of your file system. There are lot of technologies and concepts in play here so I will unpack that statement by way of a nice and detailed example.</p>
<blockquote><p>All of this is available via my <a href="https://github.com/jmarnold/jasmine-examples">jasmine-example</a> repo on github. You may wish to clone it locally and follow along.</p></blockquote>
<h3>Getting Started</h3>
<p>You can obtain the Serenity tools in a variety of ways. The easiest way is simply to install the Serenity package via NuGet. In this example, I began with a simple ASP.NET Empty Web Application and installed the Serenity NuGet package.</p>
<p>After installing the NuGet package, we begin by following the directory structure used by FubuMVC’s Asset Pipeline. All this means is that we have a folder named “content” in the root of our application. Within that content folder is a “scripts” folder. We then place all of our scripts within said folder.</p>
<p>You can view the sample structure <a href="https://github.com/jmarnold/jasmine-examples/tree/master/src/JasmineExample/content">here</a>.</p>
<blockquote><p><strong>Note:<br />
</strong>The example repo makes use of Fubu’s <a href="http://geek.ianbattersby.com/2011/12/01/ripple-tastic">ripple infrastructure</a> and rake. If you’re wondering where the NuGets are, simply run a default rake and ripple will pull them down.</p></blockquote>
<h3>Creating your first spec</h3>
<p>The Serenity Jasmine runner (from now on I’m just going to refer to it as “the runner”) takes care of pairing up your script and your spec file and it does so by the following convention:</p>
<ul>
<li>simple.js (the script)</li>
<li>specs/
<ul>
<li>simple.spec.js</li>
</ul>
</li>
</ul>
<p>Let me further explain that one…</p>
<p>Each folder underneath content/scripts is considered a SpecificationFolder. Any files that exist in each of these SpecificationFolders are automatically paired with files within the relative specs folder. The naming convention is simple: “x.js”, “x.spec.js”.</p>
<p>Ok, now that I’m confused you how about we start the runner and you can see it all come together?</p>
<h3>Running the spec</h3>
<p>There’s a little bit of rake-fu in the repo to make this nice and easy:</p>
<blockquote><p>rake open_jasmine</p></blockquote>
<p>This launches the runner in <em>interactive</em> mode (read “development” mode) and provides simple “auto-test” functionality. That is, any file modifications trigger an automatic refresh of the browser.</p>
<p><a href="http://lostechies.com/josharnold/files/2012/02/start.png"><img style="background-image: none; margin: 0px auto 24px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border: 0px;" title="start" src="http://lostechies.com/josharnold/files/2012/02/start_thumb.png" border="0" alt="start" width="644" height="250" /></a></p>
<p>As Figure 1 shows, the start page displays all of the available specifications and then lets you drill down to execute them (like R# groups projects in your solution).</p>
<h3>Is it that simple?</h3>
<p>In a perfect world, you could install a NuGet via the CLI and be able to just launch the runner immediately. But hey, we’re getting closer, right? I’ve wrapped up all the boiler plate stuff involved in getting started with the runner in this repo so that you don’t have to.</p>
<h3>What else can it do?</h3>
<p>Here a few highlights that I can dive into more in depth if you’re interested:</p>
<ul>
<li>A file named jasmine.helper.js within any specs folder is loaded for your specs. There is an example of this in the repo w/ complex.spec.js</li>
<li>The runner can also be simply ran as an exe and integrated into your build via exit codes. The default rake task in the repo is an example of how to do this</li>
</ul>
<h3>Any “gotchas”?</h3>
<p>There a few very specific things to note here:</p>
<ol>
<li>The runner needs a “serenity.txt” file relative to where your project lies. You can specify the location of the file (and the name) but the contents are used to configure the runner (e.g., “include:MyProject”)</li>
<li>The runner makes use of Fubu’s asset pipeline. It tries to be helpful by automatically requiring a script asset named “core”. If you don’t have a “core” (e.g., aliased file, set) then the runner will likely bomb. The example repo has a core.script.config that shows a workaround for this.</li>
</ol>
<h3>Are there any examples in the wild?</h3>
<p><a href="https://github.com/DarthFubuMVC/fubuvalidation">FubuValidation</a> recently merged in the fubuvalidation.js work and now leverages the Serenity Jasmine runner as part of its build.</p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/josharnold/2012/02/25/running-jasmine-specs-in-dotnet-with-serenity/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>jQuery.continuations In Action</title>
		<link>http://lostechies.com/josharnold/2012/02/18/jquery-continuations-in-action/</link>
		<comments>http://lostechies.com/josharnold/2012/02/18/jquery-continuations-in-action/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 06:20:02 +0000</pubDate>
		<dc:creator>Josh Arnold</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[conventions]]></category>
		<category><![CDATA[fubu]]></category>
		<category><![CDATA[jquery-continuations]]></category>

		<guid isPermaLink="false">http://lostechies.com/josharnold/?p=153</guid>
		<description><![CDATA[I’ve been getting quite a few questions about jQuery.continuations after my last round of posts and the lightning round I gave at ADNUG last month. I have this horrible habit of pretending that I’m a lot more articulate than I&#160;&#8230; <a href="http://lostechies.com/josharnold/2012/02/18/jquery-continuations-in-action/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’ve been getting quite a few questions about jQuery.continuations after my last round of posts and the lightning round I gave at ADNUG last month. I have this horrible habit of pretending that I’m a lot more articulate than I really am. Obviously my last few posts didn’t do this library any justice.</p>
<p>I think <a href="http://lostechies.com/jimmybogard/">Jimmy</a> put it the best when he said: “Yeah, I read your posts but there just wasn’t a whole lot of code”. So this time I’m going to write a post that’s mostly code and see if it helps.</p>
<h2>Show me something concrete</h2>
<p>Let’s start with an example and then I’ll explain what’s going on:</p>
<p><iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/jmarnold/KEKxr/56/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
<p>If you run this example, you’ll be shown a dialog. Clicking “Success” or “Failure” will demonstrate the behavior of a successful or failed http post (respectively).</p>
<blockquote><p>NOTE:<br />
I’ve noted this in the code several times but here it is again: don’t bother with the “Server” stuff. It’s just a helper to mock the ajax calls since we’re not using a server here.</p></blockquote>
<h3>Custom options</h3>
<p>We are making use of the correlatedSubmit method here (an extension to jquery.forms). Notice that we’re passing in the custom “closeDialog” property.</p>
<p>Passing in a hash to correlatedSubmit or as the “options” property of the hash to $.ajax provides a local set of custom options that are made available during the processing of the clientside continuation.</p>
<p>Great, what does that mean? Well, here’s how this works:</p>
<p><script src="https://gist.github.com/1857553.js?file=continuation.policies.js"></script></p>
<p>Whenever a continuation is received (via the success callback from $.ajax), this custom dialog policy will be inspected. Notice that we’re matching against “continuation.options.closeDialog”. The options property of the continuation contains the same options that you passed in so in this case, “closeDialog” would be true.</p>
<blockquote><p>Note:<br />
My first pass at this didn’t have these custom options and our conventions were ALWAYS global. You should ask <a href="https://twitter.com/#!/jeremydmiller">Jeremy</a> what he thought about that.</p></blockquote>
<p>In case you missed the point here, our policy conventionally closes a jquery ui dialog when the response was successful.</p>
<h3>Reusable conventions</h3>
<p>Conventions are only “conventions” when they’re reusable. Reusable pieces of code really strut their value when they’re reusable in more than one project.</p>
<p>The “Failure” button demonstrates a failed continuation response from the server. fubuvalidation-js has a built-in convention for detecting those errors and rendering them into the form that originated the request. So simply including fubuvalidation-js into this jsfiddle was enough to get that to work.</p>
<h3>From client to server</h3>
<p>The validation and “close dialog” policies are pretty useful. For us, they’re very useful because we use them throughout our app. These are just two simple examples of what can be done here. Let’s brainstorm a few more to make sure I’m articulating the power of this correctly:</p>
<ul>
<li>Refresh the page (force a full refresh on certain conditions)</li>
<li>Redirect to a new url</li>
<li>Display errors (“something went terribly wrong”)</li>
<li>Keep track of pending ajax requests</li>
</ul>
<p>The list goes on and on but let’s talk about this “redirect to a new url” idea.</p>
<h3>APIs and Continuations</h3>
<p>A common technique found in HTTP-based APIs is to provide a set of information regarding a resource when it is created. For example, “POST /users/create” may return things like:</p>
<ul>
<li>The ID of the User</li>
<li>Some urls (e.g., “go here to view the details”, “go here to edit the user”</li>
</ul>
<p>If you design your endpoints to follow a similar technique, you can plugin policies that use the response and orchestrate the behavior of your system from a central block of code. Of course, in small applications this doesn’t pay off but in large and complex systems the value starts to shine.</p>
<h2>Wrapping it up</h2>
<p>Hopefully the code speaks for itself and this sparks a few ideas.</p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/josharnold/2012/02/18/jquery-continuations-in-action/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Our Ajax Conventions&#8211;Validation</title>
		<link>http://lostechies.com/josharnold/2012/01/08/our-ajax-conventionsvalidation/</link>
		<comments>http://lostechies.com/josharnold/2012/01/08/our-ajax-conventionsvalidation/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 08:32:53 +0000</pubDate>
		<dc:creator>Josh Arnold</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[conventions]]></category>
		<category><![CDATA[fubumvc]]></category>
		<category><![CDATA[jquery-continuations]]></category>

		<guid isPermaLink="false">http://lostechies.com/josharnold/?p=148</guid>
		<description><![CDATA[As I mentioned in my previous posts, I’m doing a write up of our AJAX conventions and how they’re paying off for us. In this series of posts, I’m going to cover a few topics: The AjaxContinuation Clientside Continuations Request&#160;&#8230; <a href="http://lostechies.com/josharnold/2012/01/08/our-ajax-conventionsvalidation/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in <a href="http://lostechies.com/josharnold/tag/jquery-continuations/">my previous posts</a>, I’m doing a write up of our AJAX conventions and how they’re paying off for us.</p>
<p>In this series of posts, I’m going to cover a few topics:</p>
<ol>
<li><a href="http://lostechies.com/josharnold/2012/01/06/our-ajax-conventions-the-ajaxcontinuation/">The AjaxContinuation</a></li>
<li><a href="http://lostechies.com/josharnold/2012/01/06/our-ajax-conventionsclientside-continuations/">Clientside Continuations</a></li>
<li><a href="http://lostechies.com/josharnold/2012/01/07/our-ajax-conventionsrequest-correlation/">Request Correlation</a></li>
<li>Validation (this post)</li>
</ol>
<h2>Correlation by form</h2>
<p>Last time I discussed how to correlate your requests with jquery.continuations. One of the gems that ships with continuations is the $.fn.correlatedSubmit method for forms. This method uses the id of the form (a quick unique check is performed) as the correlation id.</p>
<h2>fubuvalidation.js</h2>
<blockquote><p><strong>Note:</strong><br />
This isn’t an exhaustive explanation of the new fubuvalidation.js bits. I’ll flush this out in the docs.</p></blockquote>
<h3>Not another one…</h3>
<p>First off: no, it’s not “another js validation library”. <a href="https://github.com/DarthFubuMVC/fubuvalidation-js">fubuvalidation</a> makes use of the continuation contract but makes no effort to perform client-side validation. Instead, it aims to bridge that gap between client-side and server-side validation.</p>
<h3>The handler</h3>
<p>I’m only explaining this because I know I’ll get asked about it. fubuvalidation.js ships with a <a href="https://github.com/DarthFubuMVC/fubuvalidation-js/blob/master/fubuvalidation.js#L15">default handler</a>. This handler renders a nice validation summary, highlights fields, and provides a little bit of interactivity. And of course, the handler is exposed through $.fubuvalidation.defaultHandler so you can override any of the functions that you don’t like. And like the rest of the Fubu projects, you can completely <a href="https://github.com/DarthFubuMVC/fubuvalidation-js/blob/master/fubuvalidation.js#L105">override our defaults if you don’t like them</a>.</p>
<h2>Back to my point…</h2>
<p>fubuvalidation.js relies on the continuation that is returned by any of your ajax calls via jquery.continuations. Here’s how we plug into the pipeline:</p>
<p><script src="https://gist.github.com/1577709.js?file=validationPolicy.js"></script></p>
<p>Just another example of what you can do once you get your conventions defined.</p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/josharnold/2012/01/08/our-ajax-conventionsvalidation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Our Ajax Conventions&#8211;Request Correlation</title>
		<link>http://lostechies.com/josharnold/2012/01/07/our-ajax-conventionsrequest-correlation/</link>
		<comments>http://lostechies.com/josharnold/2012/01/07/our-ajax-conventionsrequest-correlation/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 04:23:41 +0000</pubDate>
		<dc:creator>Josh Arnold</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[conventions]]></category>
		<category><![CDATA[fubumvc]]></category>
		<category><![CDATA[jquery-continuations]]></category>

		<guid isPermaLink="false">http://lostechies.com/josharnold/?p=143</guid>
		<description><![CDATA[As I mentioned in my previous posts, I’m doing a write up of our AJAX conventions and how they’re paying off for us. In this series of posts, I’m going to cover a few topics: The AjaxContinuation Clientside Continuations Request&#160;&#8230; <a href="http://lostechies.com/josharnold/2012/01/07/our-ajax-conventionsrequest-correlation/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in <a href="http://lostechies.com/josharnold/2012/01/06/our-ajax-conventions-the-ajaxcontinuation/">my previous posts</a>, I’m doing a write up of our AJAX conventions and how they’re paying off for us.</p>
<p>In this series of posts, I’m going to cover a few topics:</p>
<ol>
<li><a href="http://lostechies.com/josharnold/2012/01/06/our-ajax-conventions-the-ajaxcontinuation/">The AjaxContinuation</a></li>
<li><a href="http://lostechies.com/josharnold/2012/01/06/our-ajax-conventionsclientside-continuations/">Clientside Continuations</a></li>
<li>Request Correlation (this post)</li>
<li><a href="http://lostechies.com/josharnold/2012/01/08/our-ajax-conventionsvalidation/">Validation</a></li>
</ol>
<h2>Correlating your requests</h2>
<p>This isn’t a new thing. If you’ve ever dealt with messaging, then you’ve most certainly dealt with the concept. It’s nothing different with the web. But first, let me just answer…</p>
<h3>Why?</h3>
<p>Why would you want to be able to identify the response for a given request? Here are two that stood out for me:</p>
<p>1. Keeping track of outstanding requests</p>
<p>There’s this fun thing that you run into when you’re doing automated UI testing and it’s called “waiting”. You wait for elements to be shown – sometimes intelligently or blindly (Thread.Sleep – gah). If you’re able to track your pending requests, you can be a little smarter about waiting for operations to complete.</p>
<p>2. Knowing which form made a request</p>
<p>This is an interesting one. When I know which form was a responsible for a given request, I can handle validation much easier and have more fun with conventions (like closing a dialog).</p>
<h3>How it works</h3>
<p>When a request is initiated, jquery.continuations appends a custom header: X-Correlation-Id. This value originates from one of two sources: 1) randomly assigned for a request 2) the id of the form responsible for the request.</p>
<p>It’s up to your web framework to handle shoving the header back into the response. Here’s an example of doing it in FubuMVC:</p>
<p><script src="https://gist.github.com/1573762.js?file=RequestCorrelation.cs"></script><script src="https://gist.github.com/1573762.js?file=SetCorrelationHeaders.cs"></script></p>
<p>Assuming that you are sending the header back down through your response, jquery.continuations handles it from there by doing two things:</p>
<p>1) The AjaxCompleted topic</p>
<p>This topic is published through the jquery.continuations event aggregator façade (we use amplify). The message that is published contains a correlationId property with the appropriate value.</p>
<p>2) The continuation processing pipeline</p>
<p>Before the continuation is processed, the correlationId property is set.</p>
<h2>Simple usage</h2>
<p>I always understand best by seeing some code. Here’s an example of how to keep track of pending requests:</p>
<p><script src="https://gist.github.com/1573762.js?file=trackingRequests.js"></script></p>
<p>Until next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/josharnold/2012/01/07/our-ajax-conventionsrequest-correlation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Our Ajax Conventions&#8211;Clientside Continuations</title>
		<link>http://lostechies.com/josharnold/2012/01/06/our-ajax-conventionsclientside-continuations/</link>
		<comments>http://lostechies.com/josharnold/2012/01/06/our-ajax-conventionsclientside-continuations/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 14:00:26 +0000</pubDate>
		<dc:creator>Josh Arnold</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[conventions]]></category>
		<category><![CDATA[fubumvc]]></category>
		<category><![CDATA[jquery-continuations]]></category>

		<guid isPermaLink="false">http://lostechies.com/josharnold/?p=136</guid>
		<description><![CDATA[As I mentioned in my previous post, I’m doing a write up of our AJAX conventions and how they’re paying off for us. In this series of posts, I’m going to cover a few topics: The AjaxContinuation Clientside Continuations (this&#160;&#8230; <a href="http://lostechies.com/josharnold/2012/01/06/our-ajax-conventionsclientside-continuations/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in <a href="http://lostechies.com/josharnold/2012/01/06/our-ajax-conventions-the-ajaxcontinuation/">my previous post</a>, I’m doing a write up of our AJAX conventions and how they’re paying off for us.</p>
<p>In this series of posts, I’m going to cover a few topics:</p>
<ol>
<li><a href="http://lostechies.com/josharnold/2012/01/06/our-ajax-conventions-the-ajaxcontinuation/">The AjaxContinuation</a></li>
<li>Clientside Continuations (this post)</li>
<li><a href="http://lostechies.com/josharnold/2012/01/07/our-ajax-conventionsrequest-correlation/">Request Correlation</a></li>
<li><a href="http://lostechies.com/josharnold/2012/01/08/our-ajax-conventionsvalidation/">Validation</a></li>
</ol>
<h2>$.continuations</h2>
<p>I have not had time to make this code public yet, but I promise I’ll get around to it. In the meantime, I’ll explain the concepts and just gist the highlights.</p>
<blockquote><p>Update:<br />
I&#8217;ve released an initial v0.1 version of this called <a href="https://github.com/DarthFubuMVC/jquery-continuations">jQuery.continuations</a>.</p></blockquote>
<h3>The Setup</h3>
<p>We start by hooking into jQuery’s global $.ajaxSetup call:</p>
<p><script src="https://gist.github.com/1569467.js?file=ajaxSetup.js"></script><script src="https://gist.github.com/1569467.js?file=onSuccess.js"></script></p>
<blockquote><p>This is happening within a module block so the “self” is something I’ve declared above this piece of code.</p></blockquote>
<p>Our convention is that unless you explicitly provide a success callback to any $.ajax call, you’re going to get this one for free.</p>
<h3>Processing Continuations</h3>
<p>I’ve talked about <a href="http://lostechies.com/josharnold/2011/07/09/patterns-of-compositional-architecture-policies/">policies</a> before and that’s exactly what we’re using to process the continuations. We have two functions: 1) matches(continuation) and 2) execute(continuation). Policies are registered via: $.continuations.applyPolicy() and we have several defaults.</p>
<p><strong>refreshPolicy<br />
</strong><em>Matches when refresh is true.</em><br />
Simply refreshes the page.</p>
<p><strong>navigatePolicy<br />
</strong><em>Matches when url is not empty</em><br />
Navigate the window to the specified url.</p>
<p><strong>errorPolicy<br />
</strong><em>Matches when success is false and there are errors</em><br />
Publishes the ‘ContinuationError’ topic through amplifyjs</p>
<p><strong>payloadPolicy<br />
</strong><em>Matches when the following properties exist: payload, topic</em><br />
Publishes the specified topic and payload through amplifyjs</p>
<blockquote><p>We have a couple more but I’ll save those for the next post.</p></blockquote>
<p><strong>Fun Fact</strong></p>
<p>The payloadPolicy is an interesting one. We knew that we were going to be working w/ websockets but we didn’t start with them. Instead, we used this infrastructure and simply shoved topics/payloads into our continuations. When a response was received, the information was published through amplify and we had structured our code to work against those topics.</p>
<p>When it came time to turn on websockets, we simply started publishing websocket messages through amplify and everything kept working like a charm.</p>
<p>Until next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/josharnold/2012/01/06/our-ajax-conventionsclientside-continuations/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Our AJAX Conventions &#8211; The AjaxContinuation</title>
		<link>http://lostechies.com/josharnold/2012/01/06/our-ajax-conventions-the-ajaxcontinuation/</link>
		<comments>http://lostechies.com/josharnold/2012/01/06/our-ajax-conventions-the-ajaxcontinuation/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 08:03:29 +0000</pubDate>
		<dc:creator>Josh Arnold</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[conventions]]></category>
		<category><![CDATA[fubumvc]]></category>
		<category><![CDATA[jquery-continuations]]></category>

		<guid isPermaLink="false">http://lostechies.com/josharnold/?p=133</guid>
		<description><![CDATA[My team is coming out of the “infrastructure buildup” phase enough for me to take the time to blog. So, I’m going to do a write up of how we’re handling anything and everything AJAX and how it’s paying off&#160;&#8230; <a href="http://lostechies.com/josharnold/2012/01/06/our-ajax-conventions-the-ajaxcontinuation/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My team is coming out of the “infrastructure buildup” phase enough for me to take the time to blog. So, I’m going to do a write up of how we’re handling anything and everything AJAX and how it’s paying off really fast.</p>
<blockquote><p><strong>Note:<br />
</strong>I want to make note of one thing here. As usual, I will be using FubuMVC as an example implementation of these concepts. However, these concepts are applicable in any web framework.</p></blockquote>
<p>In this series of posts, I’m going to cover a few topics:</p>
<ol>
<li>The AjaxContinuation (this post)</li>
<li><a href="http://lostechies.com/josharnold/2012/01/06/our-ajax-conventionsclientside-continuations/">Clientside Continuations</a></li>
<li><a href="http://lostechies.com/josharnold/2012/01/07/our-ajax-conventionsrequest-correlation/">Request Correlation</a></li>
<li><a href="http://lostechies.com/josharnold/2012/01/08/our-ajax-conventionsvalidation/">Validation</a></li>
</ol>
<h2>The Ajax Continuation</h2>
<p>Like every “convention”, you have to start with some commonality and standardize a few things. For our usage, we chose to use the standard <a href="https://github.com/DarthFubuMVC/fubumvc/blob/master/src/FubuMVC.Core/Ajax/AjaxContinuation.cs">AjaxContinuation</a> in FubuMVC. Here’s a JSON representation:</p>
<p><script src="https://gist.github.com/1569467.js?file=AjaxContinuation.json"></script></p>
<blockquote><p>
Nothing too fancy here but this is just the baseline. The point is that while there may be additional properties specified on a particular instance, the properties above will always be there.
</p></blockquote>
<p>Let’s run through each of the properties:</p>
<p><strong>success</strong><br />
 <em>Type: bool</em><br />
 Flag indicating whether the request was successful.</p>
<p><strong>refresh</strong><br />
 <em>Type: bool</em><br />
 Flag indicating whether the page should be refreshed.</p>
<p><strong>message</strong><br />
 <em>Type: string</em><br />
 Server generated message describing the result of the request (or anything else you want to use it for)</p>
<p><strong>errors</strong><br />
 <em>Type: Array</em><br />
 An array of <a href="https://github.com/DarthFubuMVC/fubumvc/blob/master/src/FubuMVC.Core/Ajax/AjaxError.cs">AjaxError</a> objects ( { category: ‘’, field: ‘’, message: ‘’ })</p>
<h2>AjaxContinuation and FubuMVC</h2>
<p>As I said before, this is a first-class citizen in FubuMVC. There are default conventions provided for you. All you need to do is return an AjaxContinuation from one of your actions and we take care of the rest.</p>
<p>But just for sake of clarity, here’s an example:</p>
<p><script src="https://gist.github.com/1569467.js?file=SampleAction.cs"></script></p>
<p>Don’t worry, I give a lot more information in the next few posts.<br />
Until next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/josharnold/2012/01/06/our-ajax-conventions-the-ajaxcontinuation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fubu new project</title>
		<link>http://lostechies.com/josharnold/2011/12/17/fubu-new-project/</link>
		<comments>http://lostechies.com/josharnold/2011/12/17/fubu-new-project/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 06:09:43 +0000</pubDate>
		<dc:creator>Josh Arnold</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[fubu]]></category>
		<category><![CDATA[fubumvc]]></category>
		<category><![CDATA[tooling]]></category>

		<guid isPermaLink="false">http://lostechies.com/josharnold/?p=131</guid>
		<description><![CDATA[Overview fubu new is a command that is available via the Fubu Command Line tool. So, think “rails new” for fubu. Sort of. If you’re waiting on pins and needles for how to just start using it, skip ahead to&#160;&#8230; <a href="http://lostechies.com/josharnold/2011/12/17/fubu-new-project/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Overview</h2>
<p><strong>fubu new</strong> is a command that is available via the Fubu Command Line tool. So, think “rails new” for fubu. Sort of.</p>
<blockquote><p>If you’re waiting on pins and needles for how to just start using it, <a href="#tldr">skip ahead to the end</a>.</p></blockquote>
<h2>Templates</h2>
<p>First let’s talk templates. Why? Because that’s what powers this fun little command and they come into two shapes: 1) zip files and 2) git repositories. Yep, I just said git repositories. But first…</p>
<h3>What’s in a template?</h3>
<p>A template is a folder structure that you want copied over after a set of replacements has occurred. The replacements are pretty simple:</p>
<ul>
<li>FUBUPROJECTNAME – The projectName argument specified (fubu new projectName)</li>
<li>FUBUPROJECTSHORTNAME – The last value of projectName split on “.” (e.g., FubuMVC.Plugin =&gt; Plugin)</li>
<li>GUIDx (where x is a valid number) – A generated and cached guid (more on this)</li>
</ul>
<h3>What all gets replaced?</h3>
<p>File contents, file names, and directory names.</p>
<h3>I don’t get the “GUIDx” thing</h3>
<p>Let’s say you have a template with two projects: 1) A standard class library and 2) a class library used as a testing project for the first.</p>
<h4>Problem:</h4>
<p>You want a new GUID for both projects but need a way to correlate them so that your second project can reference the first and provide metadata.</p>
<h4>Solution:</h4>
<p>The first project uses “GUID1” as its ID. The second project uses “GUID2” as its ID. The second project then uses “GUID1” when <a href="https://github.com/DarthFubuMVC/bottle-template/blob/master/FUBUPROJECTNAME.Tests/FUBUPROJECTNAME.Tests.csproj#L90">referring to the first project</a>.</p>
<h3>How do I specify a template?</h3>
<p>As I mentioned before, there are two ways:</p>
<h4>Zip Files</h4>
<p>You can specify a zip file using the –z flag.</p>
<blockquote><p>fubu new MyProject –z my-template.zip</p></blockquote>
<h4>Git Repositories</h4>
<p>You can specify a git repository using the –g flag.</p>
<blockquote><p>fubu new MyProject –g git://my-repo.git</p></blockquote>
<h4>What if I don’t want to type/remember the git url?</h4>
<p>I’m glad you asked. You can place a <a href="https://gist.github.com/1489386">.fubunew-alias file</a> right alongside the fubu.exe executable. The aliases specified in that file can then be used for the –g flag.</p>
<p>We also ship with two default aliases (regardless of the existence of the file):</p>
<ul>
<li>fubusln = <a title="git://github.com/DarthFubuMVC/rippletemplate.git" href="git://github.com/DarthFubuMVC/rippletemplate.git">git://github.com/DarthFubuMVC/rippletemplate.git</a></li>
<li>fububottle = <a title="git://github.com/DarthFubuMVC/bottle-template.git" href="git://github.com/DarthFubuMVC/bottle-template.git">git://github.com/DarthFubuMVC/bottle-template.git</a></li>
</ul>
<h2>New vs. Existing Solutions</h2>
<p>The examples above show fubu new working for brand new solutions. That’s great but we’ve found that adding a new project/test project/integration project (etc.) can be a royal pain. No, it’s not hard but it is time consuming.</p>
<h3>Appending to an existing solution</h3>
<p>Specifying the –s flag and providing the location of a solution file will do a few things for you.</p>
<p>First, we explode the contents and move them into the solution directory (if you have weird folder structures, you can override the output location with the –o flag). Then we loop through the new projects we just created and append them to the solution file that you specified with the –s flag.</p>
<h2>What about custom one-off scenarios?</h2>
<p>The whole “one-off” scenario first occurred during testing. Then we realized that any useful template will almost ALWAYS have some custom one-off scenario. So we added a nifty little idea:</p>
<h3>rake callback script</h3>
<p>You can specify a rake file to execute after the templating is finished using the –r flag. You can do whatever you’re capable of doing with rake here. Check out our <a href="https://github.com/DarthFubuMVC/bottle-template">bottle template</a> for a simple example.</p>
<h3>But I always want to execute the script</h3>
<p>If you don’t want to have to remember to specify the –r flag, simply name your rake file “.fuburake” and it will automatically get run.</p>
<h2>What if I want to exclude certain files in the templating?</h2>
<p>Some files exist in your template just for executing (e.g., rake callbacks, a placeholder file to read a value). Simply create a .fubuignore file in your template (the syntax is the same as .gitignore). Any files will be excluded in the copy.</p>
<p>For an example of everything in action, take a look at our <a href="https://github.com/DarthFubuMVC/rippletemplate">ripple-ized solution template</a>.</p>
<p><a name="tldr"></a></p>
<h2>How do I start using it?</h2>
<p>Well, a couple of things to note…</p>
<h3>Is it available right now?</h3>
<p>Yes and No…the new FubuMVC.References nuget will be published on 12/19. At which point, all of the information I just provided will be valid. As of right now, fubu new doesn’t do very much. Sorry, but I wanted to write this blog while I had the chance.</p>
<p>If you want to play with it today, simply clone FubuMVC and build the solution. The exe will be located in src/Fubu/bin/Debug.</p>
<h3>When it is available through NuGet, how do I use it?</h3>
<p>Add a reference to FubuMVC.References and fubu.exe will be in the tools directory of that package.</p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/josharnold/2011/12/17/fubu-new-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FubuMVC&#8211;Action discovery</title>
		<link>http://lostechies.com/josharnold/2011/10/16/fubumvc-action-discovery/</link>
		<comments>http://lostechies.com/josharnold/2011/10/16/fubumvc-action-discovery/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 03:37:53 +0000</pubDate>
		<dc:creator>Josh Arnold</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[fubumvc]]></category>

		<guid isPermaLink="false">http://lostechies.com/josharnold/?p=128</guid>
		<description><![CDATA[Overview One of the questions I hear the most is: “What’s the Fubu folder structure? Where do I put controllers?” I admit, I stumble through my answer as I say unhelpful and ambiguous things like “you can do whatever you&#160;&#8230; <a href="http://lostechies.com/josharnold/2011/10/16/fubumvc-action-discovery/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Overview</h2>
<p>One of the questions I hear the most is:</p>
<blockquote><p>“What’s the Fubu folder structure? Where do I put controllers?”</p></blockquote>
<p>I admit, I stumble through my answer as I say unhelpful and ambiguous things like “you can do whatever you want”. So, for those of you who have asked me and haven’t received help, consider this as me cashing in my “I owe you”.</p>
<h2>ActionCalls</h2>
<p>If you haven’t learned about these yet, then you may want to get a little bit of background. I try my best to introduce the subject in my F101 video and Mike Murray gives an overview as he walks you through building your first Fubu application: <a href="http://mvc.fubu-project.org/videos">http://mvc.fubu-project.org/videos</a></p>
<h2>Discovery</h2>
<p>The magic of the discovery happens through one very simple interface:</p>
<p><script src="https://gist.github.com/1290451.js?file=IActionSource.cs"></script></p>
<p>Like most things used in our semantic model construction, we use this interface internally and expose a DSL for convenience. In this case, we do so via the Actions property on the FubuRegistry.</p>
<p>I was going to spend the time to write up about this piece, but <a href="http://lostechies.com/chadmyers/">Chad Myers</a> already did: <a href="http://lostechies.com/chadmyers/2011/10/07/cool-stuff-in-fubumvc-no-2-action-conventions/">Cool stuff in FubuMVC No. 2: Action Conventions</a></p>
<p>The only thing I want to add is that you can register your own IActionSource implementations via the FindWith method (e.g., Actions.FindWith&lt;MyActionSource&gt;()).</p>
<blockquote><p>
Note:<br />
 Dependency injection is not around for the DSL pieces for FubuRegistry. However as a workaround (if you MUST),  the bootstrapping mechanism works in a way that you’ll have access to ObjectFactory inside of your action sources. It’s not ideal, but it’s there just in case you need it.
</p></blockquote>
<h2>Piecing it together</h2>
<p>Underneath the hood, we use the <a href="https://github.com/DarthFubuMVC/fubumvc/blob/master/src/FubuMVC.Core/Registration/BehaviorAggregator.cs">BehaviorAggregator</a> class to operate on all IActionSource implementations and register a behavior chain for each call that is found.</p>
<h2>Why do I care?</h2>
<p>Scanning is great and it covers you for probably 80% of all use cases (yes, I just made up that statistic). Here’s an example of when it won’t:</p>
<p><script src="https://gist.github.com/1290451.js?file=CreateEntityAction.cs"></script></p>
<p>Maybe we want to scan our system for all of our known entity types and close on this open generic. Your best bet is to register your own action source that will do exactly that:</p>
<p><script src="https://gist.github.com/1290451.js?file=CreateEntityActionSource.cs"></script></p>
<p>And that’s it. It’s simple but powerful.</p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/josharnold/2011/10/16/fubumvc-action-discovery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Modularity via Bottles &#8211; Continued</title>
		<link>http://lostechies.com/josharnold/2011/10/11/modularity-via-bottles-continued/</link>
		<comments>http://lostechies.com/josharnold/2011/10/11/modularity-via-bottles-continued/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 05:12:22 +0000</pubDate>
		<dc:creator>Josh Arnold</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[bottles]]></category>
		<category><![CDATA[fubu]]></category>

		<guid isPermaLink="false">http://lostechies.com/josharnold/?p=123</guid>
		<description><![CDATA[Overview We’ve had even more questions arising about “what are Bottles” since my last post and our sessions at Pablos Fiesta. I think my favorite question after our explanations is: “WTF is a Bottle?” Forgive me, you’ll find me mixing&#160;&#8230; <a href="http://lostechies.com/josharnold/2011/10/11/modularity-via-bottles-continued/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Overview</h2>
<p>We’ve had even more questions arising about “what are Bottles” since my last post and our sessions at Pablos Fiesta. I think my favorite question after our explanations is: “WTF is a Bottle?”</p>
<p>Forgive me, you’ll find me mixing “Bottles” and “packages” often. I won’t promise that I’m not going to do this, but I will promise that I’ll be consistent: Bottles (capitalized) means the framework. “bottles” (not capitalized) and “packages” mean the actual files.</p>
<h3>WTF is a bottle?</h3>
<p>I like this question. Let’s take away all the glamour and expose the interface that changes everything:</p>
<p><script src="https://gist.github.com/1277290.js?file=IPackageInfo.cs"></script></p>
<p>This is a cornerstone of the Bottles framework as it represents the smallest unit of data that we’re concerned with. This unit is comprised of a few things. Let me draw your attention to two of them: 1) assemblies and 2) data.</p>
<p>They come in all shapes and sizes. Our most commonly used implementations are: 1) AssemblyPackageInfo and 2) PackageInfo (just a file/directory – typically a zip file).</p>
<h3>Playing with your AppDomain</h3>
<p>I mentioned that Bottles provides assemblies. That’s great and all, but if you’ve ever spent time loading those into your AppDomain and making every thing play nice, then you understand the pains that are involved. If Bottles does nothing else right as a framework, I’d call it a success because it makes dealing with this a breeze.</p>
<p>Don’t worry, I’ll dive into details but at a high-level Bottles gives you the ability to conventionally load assemblies into your AppDomain and give you a uniform way of responding to them.</p>
<h2>So how does it all work?</h2>
<h3>Execution Flow</h3>
<p>The execution of all of Bottles occurs through the static LoadPackages method in the PackageRegistry class. This little gem gives you a DSL for hooking into the loading mechanism while Bottles does it magic.</p>
<h3>IPackageFacility</h3>
<p>This is the abstraction that allows various frameworks to plugin and make use of the Bottles infrastructure (e.g., FubuMVC, Topshelf). You can specify custom IPackageLoader implementations here and let Bottles know about how you want to find your bottles.</p>
<h3>IPackageLoader</h3>
<p>These tell Bottles how you want to find your bottles. FubuMVC ships with a few (ZipFilePackageLoader being an important one) and Bottles has its own internal ones.</p>
<p>In fact, Bottles ships with a very important one: LinkedFolderPackageLoader. This allows a “.links” file to be included in your projects so that you can dynamically load other projects in your solution as bottles (rather than installing/uninstalling or dealing with DLL references).</p>
<h3>IBootstrapper</h3>
<p>So you’ve loaded up your bottles…now what? When you’re configuring Bottles, you can specify custom IBootstrapper implementations which tells Bottles about the all important IActivator interface. This interface is here so that you can find these IActivator implementations however you like (e.g., scan the assembly for implementations with a default constructor, pull them from your IoC container).</p>
<h3>IActivator</h3>
<p>This little gem allows for “start up” operations within Bottles. FubuMVC actually leverages this internally for some of the Bottles interoperability. For example, we have a Bottles-friendly virtual path provider that gets registered through an IActivator.</p>
<p>This interface has full access to anything in your AppDomain so that options are pretty limitless. On top of that, you are given information about the available packages – which gives access to any files that are part of said package. FubuMVC uses this to register content files (scripts, images, styles, etc.) into its asset pipeline.</p>
<p>The most common custom uses of IActivator that I come across are IoC container-related (e.g., register additional implementations, replace a service).</p>
<h2>How does this fit into the NuGet world?</h2>
<p>This is a very common question. Here’s my typical answer:</p>
<blockquote><p>Bottles starts where NuGet leaves off. We’re not in the business of defining the shipping process, just what to do with the contents after they’ve been shipped. In fact, we often use NuGet as our shipping provider for reusable packages.</p></blockquote>
<h2>Why Bottles?</h2>
<p>Hopefully my short explanation has already answered this question but I’ll try one more time.</p>
<p>Bottles grew out of a need for dynamic content/assembly loading in FubuMVC. Since it was all sparked during a conversation between Jeremy Miller and Dru Sellers, Bottles was abstracted out into what it is today with the intention of making it consumable through TopShelf.</p>
<p>Assembly loading and all the other tedious crap that comes with this need is not something you want to repeat if you can avoid it. Thus, dev cycles were used to make sure that we never have to do this ever again.</p>
<h2>What else can Bottles do?</h2>
<p>It’s not ready for prime time yet but there is currently a deployment story in the works for Bottles. This can be everything from “deploy this bottle to topshelf” to “deploy this FubuMVC package to IIS/nginx”.</p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/josharnold/2011/10/11/modularity-via-bottles-continued/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

