<?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>Pivotal Labs &#187; David Varvel</title>
	<atom:link href="http://pivotallabs.com/author/dvarvel/feed/" rel="self" type="application/rss+xml" />
	<link>http://pivotallabs.com</link>
	<description>Agility Developed</description>
	<lastBuildDate>Wed, 22 May 2013 22:49:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Responsive web design with GroundworkCSS: Column stacking</title>
		<link>http://pivotallabs.com/responsive-web-design-with-groundworkcss-column-stacking/</link>
		<comments>http://pivotallabs.com/responsive-web-design-with-groundworkcss-column-stacking/#comments</comments>
		<pubDate>Mon, 06 May 2013 06:31:30 +0000</pubDate>
		<dc:creator>David Varvel</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/?p=18794</guid>
		<description><![CDATA[<p>Recently, I&#8217;ve started using GroundworkCSS to implement responsive design on a personal project.  Simply put, it&#8217;s been an absolute pleasure to use.  Not only is Groundwork highly flexible, but it also feels remarkably lightweight in comparison to something like Bootstrap. There&#8217;s a few challenges, however.  The Groundwork website has quite a few live demos, but there&#8217;s very little text to explain exactly what&#8217;s going on.  There&#8217;s also not much of a community to glean knowledge from.  While teaching myself how to use the framework, I&#8217;ve had to spend a lot of time in the Chrome web inspector reverse-engineering the live examples and then experimenting. As an example, one of the more difficult pieces when initially working with Groundwork is figuring out how things will stack on top of each other when your layout shrinks. The default behavior is simple, and reasonably intuitive. Elements will be stacked top-to-bottom in the order&#8230;</p><p>The post <a href="http://pivotallabs.com/responsive-web-design-with-groundworkcss-column-stacking/">Responsive web design with GroundworkCSS: Column stacking</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Recently, I&#8217;ve started using <a title="GroundworkCSS" href="http://groundwork.sidereel.com/" target="_blank">GroundworkCSS </a>to implement responsive design on a personal project.  Simply put, it&#8217;s been an absolute pleasure to use.  Not only is Groundwork highly flexible, but it also feels remarkably lightweight in comparison to something like Bootstrap.</p>
<p>There&#8217;s a few challenges, however.  The Groundwork website has quite a few live demos, but there&#8217;s very little text to explain exactly what&#8217;s going on.  There&#8217;s also not much of a community to glean knowledge from.  While teaching myself how to use the framework, I&#8217;ve had to spend a lot of time in the Chrome web inspector reverse-engineering the live examples and then experimenting.</p>
<p>As an example, one of the more difficult pieces when initially working with Groundwork is figuring out how things will stack on top of each other when your layout shrinks. The default behavior is simple, and reasonably intuitive. Elements will be stacked top-to-bottom in the order that they&#8217;re declared in markup.  Here&#8217;s an example:</p>
<pre>&lt;div class='row'&gt;
  &lt;div id="left_thing" class="three fifths"&gt;&lt;/div&gt;
  &lt;div id="right_thing" class="two fifths"&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<p>When rendered in desktop mode, the &#8216;left_thing&#8217; will show up on the left and take up three fifths of the viewport, while the &#8216;right_thing&#8217; takes up the rest.  When the viewport shrinks for mobile, then the left_thing gets stacked on top.  Simple enough.</p>
<p>However, what if you want the right_thing to render to the right in desktop mode but stack on <em>top</em> of the left_thing on mobile devices?  That&#8217;s when it starts to get tricky.</p>
<p>In order to get the &#8220;right_thing&#8221; to stack on top, it has to be declared first in the markup, like so:</p>
<pre>&lt;div class='row'&gt;
  &lt;div id="right_thing" class="two fifths"&gt;&lt;/div&gt;
  &lt;div id="left_thing" class="three fifths"&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<p>However, this screws up the ordering in desktop mode!  Fortunately, there&#8217;s a fix.</p>
<p>It turns out that Groundwork will allow you to shift around the relative ordering of your declared elements.  So, if you want to swap the &#8220;right_thing&#8217; and &#8220;left_thing&#8221; into their proper places for desktop browsers, we&#8217;ll need to add some more classes.</p>
<pre>&lt;div class='row'&gt;
  &lt;div id="right_thing" class="two fifths right-three&gt;&lt;/div&gt;
  &lt;div id="left_thing" class="three fifths left-two"&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<p>Note that the &#8220;right_thing&#8221; needed to be nudged over for the number of columns that &#8220;left_thing&#8221; was taking up, and we had to do a similar dance for &#8220;left_thing&#8221;.   It turns out that Groundwork behaves quite differently from the standard CSS box model, and shifting an element using the &#8220;right-xxx&#8221; or &#8220;left-xxx&#8221; directives does NOT cause anything else to automatically move.  Much like CSS relative positioning, you&#8217;ll have to shift the other elements yourself to get the effect you want.  Be careful, or you&#8217;ll get overlapping elements or breaks that you don&#8217;t want.</p>
<p>You can also omit columns or skip columns to create negative space.  For example, here&#8217;s two equal sized columns with 20% margins on the sides.</p>
<pre>&lt;div class='row'&gt;
  &lt;div id="right_thing" class="one fourth skip-one"&gt;&lt;/div&gt;
  &lt;div id="left_thing" class="one fourth"&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<p>Note that we didn&#8217;t account for the fourth (and rightmost) column in the markup.  Since we declared &#8220;fourth&#8221; in one of the row elements, Groundwork will automagically create four columns, no matter how few we provide elements for.</p>
<p>There&#8217;s some other tricky bits, but figuring out the nuances of column stacking has been by far my biggest hurdle.  After getting that sorted, it&#8217;s been pretty smooth sailing. Overall, I&#8217;m impressed by the power and simplicity of Groundwork, and would strongly recommend anyone who&#8217;s interested in a responsive grid system to give it a shot.</p>
<p>The post <a href="http://pivotallabs.com/responsive-web-design-with-groundworkcss-column-stacking/">Responsive web design with GroundworkCSS: Column stacking</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/responsive-web-design-with-groundworkcss-column-stacking/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Backbone vs Rails: Some things to consider</title>
		<link>http://pivotallabs.com/choosing-backbone-vs-rails/</link>
		<comments>http://pivotallabs.com/choosing-backbone-vs-rails/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 06:31:57 +0000</pubDate>
		<dc:creator>David Varvel</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/?p=18645</guid>
		<description><![CDATA[<p>(Note: For most of this article, feel free to mentally substitute Ember, Angular, or your JS framework of choice for Backbone. Backbone&#8217;s just the popular one right now.) At Pivotal Labs we do a lot of web-based projects.  Usually, it&#8217;s a pretty easy choice to use Rails for the back-end.  Not only is it a battle-tested framework, but we&#8217;ve developed a lot of expertise over the years.  However, many times there&#8217;s a question when we start building the front-end: &#8220;Backbone or standard Rails?&#8221; I&#8217;ll say right now that there&#8217;s no &#8220;right&#8221; answer here.  However, here&#8217;s a few things to consider that might help you make a decision. 1. Do you need SEO? If your project needs any kind of SEO, or for content to be crawlable/scrapable, do NOT start with a single-page Javascript app.  While Google supposedly crawls using JS, it&#8217;s certainly not perfect.  Every other crawler or scraper out there will fail hard.  To overcome this, I&#8217;ve heard rumors&#8230;</p><p>The post <a href="http://pivotallabs.com/choosing-backbone-vs-rails/">Backbone vs Rails: Some things to consider</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>(Note: For most of this article, feel free to mentally substitute Ember, Angular, or your JS framework of choice for Backbone. Backbone&#8217;s just the popular one right now.)</p>
<p>At Pivotal Labs we do a <em>lot</em> of web-based projects.  Usually, it&#8217;s a pretty easy choice to use Rails for the back-end.  Not only is it a battle-tested framework, but we&#8217;ve developed a lot of expertise over the years.  However, many times there&#8217;s a question when we start building the front-end:</p>
<p>&#8220;Backbone or standard Rails?&#8221;</p>
<p>I&#8217;ll say right now that there&#8217;s no &#8220;right&#8221; answer here.  However, here&#8217;s a few things to consider that might help you make a decision.</p>
<p>1. Do you need SEO?</p>
<p>If your project needs any kind of SEO, or for content to be crawlable/scrapable, do NOT start with a single-page Javascript app.  While Google supposedly crawls using JS, it&#8217;s certainly not perfect.  Every other crawler or scraper out there will fail hard.  To overcome this, I&#8217;ve heard rumors of people rendering the JavaScript server-side, but that seems like an extraordinary effort for questionable gains.</p>
<p>2. Is your project really an API?</p>
<p>On the flip side, one nice thing about using a single page app for your front end is that it forces you to develop a robust API.  Even more importantly, it practically guarantees a clean separation between your front-end and back-end.  If you know you&#8217;ll eventually need to build a number of different native clients, or if offering a public API is part of the core product, then starting with a Backbone app makes a lot of sense.</p>
<p>3. Do you control the back end?</p>
<p>Sometimes, we don&#8217;t have the benefit of controlling the whole stack. Either there&#8217;s a legacy back-end, or you&#8217;re consuming somebody else&#8217;s API.  Sometimes you could build a Rails app that makes API calls on the backend, but usually it&#8217;s much cleaner to just go with Backbone and let the browser consume the APIs directly.</p>
<p>4.  How comfortable is your team with rolling your own technology?</p>
<p>Rails is fairly mature, and has huge amounts of community support.  For most problems that you&#8217;ll encounter, there&#8217;s an abundance of gems, sample code, blog posts, Stack Overflow answers, etc.  Much of the time, building a Rails app is mostly a matter of translating business needs into a pastiche of pre-established patterns and tools.</p>
<p>On the other side, Backbone provides a very thin layer of structure and a limited toolkit.  Every Backbone project ends up &#8220;rolling their own framework&#8221;, and building up their own patterns for view lifecycles, session management, authentication and authorization, and a hundred other things.  While this gives you a lot of fine grained-control, it means there&#8217;s a lot more decisions to make (and probably more code to write).  A team that&#8217;s not comfortable with that might want to think twice.</p>
<p>Some larger frameworks like Ember and Angular help with this somewhat.  However, there isn&#8217;t anything in the JS landscape that&#8217;s even close to the maturity and breadth of Rails.</p>
<p>While this isn&#8217;t a comprehensive list by any stretch, it&#8217;s a few of the top things that I&#8217;ve had to consider in the past.  There&#8217;s also an interesting list of non-factors, but that&#8217;s a topic for another blog post.</p>
<p>The post <a href="http://pivotallabs.com/choosing-backbone-vs-rails/">Backbone vs Rails: Some things to consider</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/choosing-backbone-vs-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10/19/12: Super Happy Blogging Friday</title>
		<link>http://pivotallabs.com/10-19-12-super-happy-blogging-friday/</link>
		<comments>http://pivotallabs.com/10-19-12-super-happy-blogging-friday/#comments</comments>
		<pubDate>Fri, 19 Oct 2012 15:14:00 +0000</pubDate>
		<dc:creator>David Varvel</dc:creator>
				<category><![CDATA[Standup]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/10-19-12-super-happy-blogging-friday/</guid>
		<description><![CDATA[<p><h2>Interestings</h2>

<ul>
<li>accepts_nested_attributes and validates_presense_of on association id fails without inverse_of</li>
</ul>

<p>Having a validation that the association id is present when trying to use nested attributes fails because the child object is validated before the parent object in memory has an id.</p>

<p>However, if you decorate the association with :inverse_of, it tells Rails to look in memory first which both saves memory and allows Rails to build the graph of objects correctly with validation!</p>

<p>Yay inverse_of!</p>

<h2>Events</h2>

<ul>
<li>Super Happy Dev House in SF tomorrow</li>
</ul>

<p>Mother of all hack days. They're usually down in the valley! http://shdh52.eventbrite.com/</p> <a href="http://pivotallabs.com/10-19-12-super-happy-blogging-friday/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/10-19-12-super-happy-blogging-friday/">10/19/12: Super Happy Blogging Friday</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interestings</h2>
<ul>
<li>accepts_nested_attributes and validates_presense_of on association id fails without inverse_of</li>
</ul>
<p>Having a validation that the association id is present when trying to use nested attributes fails because the child object is validated before the parent object in memory has an id.</p>
<p>However, if you decorate the association with :inverse_of, it tells Rails to look in memory first which both saves memory and allows Rails to build the graph of objects correctly with validation!</p>
<p>Yay inverse_of!</p>
<h2>Events</h2>
<ul>
<li>Super Happy Dev House in SF tomorrow</li>
</ul>
<p>Mother of all hack days. They&#8217;re usually down in the valley! http://shdh52.eventbrite.com/</p>
<p>The post <a href="http://pivotallabs.com/10-19-12-super-happy-blogging-friday/">10/19/12: Super Happy Blogging Friday</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/10-19-12-super-happy-blogging-friday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using apc
Database Caching using apc
Object Caching 548/582 objects using apc

 Served from: pivotallabs.com @ 2013-05-22 22:41:43 by W3 Total Cache -->