<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Architecture on BoochTek, LLC</title><link>https://blog.boochtek.com/categories/architecture/</link><description>Recent content in Architecture on BoochTek, LLC</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 22 Jun 2015 23:55:17 +0000</lastBuildDate><atom:link href="https://blog.boochtek.com/categories/architecture/index.xml" rel="self" type="application/rss+xml"/><item><title>Not Quite Callbacks</title><link>https://blog.boochtek.com/posts/not-quite-callbacks/</link><pubDate>Mon, 22 Jun 2015 23:55:17 +0000</pubDate><guid>https://blog.boochtek.com/posts/not-quite-callbacks/</guid><description>&lt;p&gt;I&amp;rsquo;ve been working on application architectures based on &lt;a href="http://confreaks.tv/videos/rubymidwest2011-keynote-architecture-the-lost-years"&gt;Uncle Bob&amp;rsquo;s Ruby Midwest talk&lt;/a&gt;, following the &lt;a href="http://alistair.cockburn.us/Hexagonal+architecture"&gt;hexagonal architectural pattern&lt;/a&gt;. I posted &lt;a href="https://blog.boochtek.com/posts/2015/02/23/hexagonal-rails-controllers"&gt;an article a couple months ago showing a way that works fairly well in Rails&lt;/a&gt;, and some &lt;a href="https://github.com/boochtek/hexagonal-rails"&gt;accompanying Rails example code&lt;/a&gt;. But there was one thing I wasn&amp;rsquo;t quite happy with.&lt;/p&gt;
&lt;p&gt;The problem is that we used callbacks (actually, a publish/subscribe mechanism) in a situation where they don&amp;rsquo;t seem to quite fit:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; def show
interactor.on(:display) { |order| render order }
interactor.on(:not_found) { |order_id| render status: 404 }
interactor.get(params[:id])
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What we really want is to respond in different ways, depending on the result of the call to &lt;code&gt;interactor.get()&lt;/code&gt;. There&amp;rsquo;s no good reason to define the responses before the call. It makes a lot more sense to define the responses after the call, because they&amp;rsquo;ll &lt;strong&gt;happen&lt;/strong&gt; after the call. I&amp;rsquo;d much prefer that the code be written in the order that it will be run.&lt;/p&gt;</description></item><item><title>Architectural Thoughts</title><link>https://blog.boochtek.com/posts/architectural-thoughts/</link><pubDate>Mon, 01 Jun 2015 23:51:59 +0000</pubDate><guid>https://blog.boochtek.com/posts/architectural-thoughts/</guid><description>&lt;p&gt;I&amp;rsquo;ve started working on my own framework in Ruby in the past couple days. It&amp;rsquo;s built upon my recent work at understanding &lt;a href="http://confreaks.tv/videos/rubymidwest2011-keynote-architecture-the-lost-years"&gt;Uncle Bob&amp;rsquo;s Ruby Midwest 2011 talk&lt;/a&gt;, and his article on &lt;a href="http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html"&gt;Clean Architecture&lt;/a&gt;, and the resulting hexagonal architecture (AKA ports and adapters).&lt;/p&gt;
&lt;p&gt;Somehow my research in that vein led me to &lt;a href="https://www.destroyallsoftware.com/talks/boundaries"&gt;Gary Bernhardt&amp;rsquo;s Boundaries talk&lt;/a&gt;. I&amp;rsquo;ve read a lot about the talk, and knew about the idea of &amp;ldquo;functional core / imperative shell&amp;rdquo;. And I&amp;rsquo;ve worked with a lot of similar ideas lately. But I believe this is the first time that I actually watched the whole video.&lt;/p&gt;</description></item></channel></rss>