<?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>Seán Hayes &#187; frameworks</title>
	<atom:link href="http://seanhayes.name/tag/frameworks/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanhayes.name</link>
	<description>Web Developer in Rochester, NY (Django, JavaScript, LAMP)</description>
	<lastBuildDate>Fri, 06 Jan 2012 00:45:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CSS Meta Languages and Compilers</title>
		<link>http://seanhayes.name/2011/03/14/css-meta-languages-compilers/</link>
		<comments>http://seanhayes.name/2011/03/14/css-meta-languages-compilers/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 20:22:38 +0000</pubDate>
		<dc:creator>Seán Hayes</dc:creator>
				<category><![CDATA[Web Design & Development]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[language]]></category>

		<guid isPermaLink="false">http://seanhayes.name/?p=228</guid>
		<description><![CDATA[So, I&#8217;ve finally decided to add a CSS framework into my workflow, namely Blueprint. I&#8217;m not very skilled when it comes to graphic design (though I&#8217;m trying to learn) and the CSS frameworks out there give you some nice looking &#8230; <a href="http://seanhayes.name/2011/03/14/css-meta-languages-compilers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ve finally decided to add a CSS framework into my workflow, namely <a href="http://www.blueprintcss.org/">Blueprint</a>. I&#8217;m not very skilled when it comes to graphic design (though I&#8217;m trying to learn) and the CSS frameworks out there give you some nice looking web pages. The only problem is they require you to add extra classes to each HTML element you want to use them with. The whole point of CSS is you can modify it without changing your markup. If I could set an id for  each element (#content, #footer) and have each id style definition simply inherit the CSS framework classes I want to use my problem would  be solved, but that can only be done using a CSS meta language and compiler.</p>
<p>I was looking at <a href="https://github.com/dziegler/django-css">django-css</a>, a project which would integrate CSS compilation into my Django projects, and it mentioned 4 popular languages:  <a href="http://ncannasse.fr/projects/hss" target="_blank">HSS</a>, <a href="http://sass-lang.com/" target="_blank">Sass</a>, <a href="http://sandbox.pocoo.org/clevercss/" target="_blank">CleverCSS</a>, and <a href="http://lesscss.org/" target="_blank">LESS</a>.</p>
<p>Here&#8217;s a spreadsheet comparing the features:</p>
<p><iframe width='500' height='300' frameborder='0' src='https://spreadsheets.google.com/pub?hl=en&#038;hl=en&#038;key=0AhZ3SH4irFLEdDlpekFWQ2dKdmFETjFVY2FObERYN0E&#038;output=html&#038;widget=true'></iframe></p>
<p><strong>Popularity</strong><br />
I think SASS is by far the most popular. I&#8217;m secretly rooting for it, since it&#8217;s probably in higher demand and would  therefore be a more valuable skill to have, though it would be awkward  introducing Ruby dependencies in a Python project.</p>
<p><strong>Inheritance</strong><br />
The main reason I want to use a CSS meta language is for the inheritance. When looking at the documentation for CleverCSS I couldn&#8217;t see any inheritance implementation, which is a shame because it&#8217;s the only one implemented in Python and would&#8217;ve been easier to integrate into my Django project.</p>
<p>HASS example:</p>
<pre><code>var nomargin = { margin : 0px; padding : 0px; }

pre {
    $nomargin;
    color : #FF0000;

}</code></pre>
<p>The inherited styles can&#8217;t be a normal CSS class, so this can&#8217;t be used to inherit classes from a CSS framework.</p>
<p>SASS Mixin example:</p>
<pre><code>@mixin table-base {
  th {
    text-align: center;

    font-weight: bold;
  }
  td, th {padding: 2px}
}

@mixin left($dist) {
  float: left;
  margin-left: $dist;
}

#data {
  @include left(10px);
  @include table-base;
}
</code></pre>
<p>The inherited definition needs to be declared as a mixin, and I&#8217;d rather not modify any CSS frameworks. There is a project called <a href="http://compass-style.org/" target="_blank">Compass</a> that provides CSS frameworks rewritten in SASS, but I&#8217;d rather not add yet another dependency into my project, especially a Ruby one (nothing against Ruby, it&#8217;s just undesirable within the context of a Python  project).</p>
<p>SASS Inheritance example:</p>
<pre><code>.error {
  border: 1px #f00;
  background: #fdd;
}
.error.intrusion {
  font-size: 1.3em;
  font-weight: bold;
}

.badError {
  @extend .error;

  border-width: 3px;
}
</code></pre>
<p>Just what I want, but it generates more code than needed:</p>
<pre><code>/* CSS */

.error, .badError {
  border: 1px #f00;
  background: #fdd;
}

.error.intrusion,

.badError.intrusion {
  font-size: 1.3em;
  font-weight: bold;
}

.badError {
  border-width: 3px;
}
</code></pre>
<p>LESS example:</p>
<pre><code>.bordered {
  border-top: dotted 1px black;

  border-bottom: solid 2px black;
}

#menu a {
  color: #111;

  .bordered;
}
.post a {
  color: red;
  .bordered;
}
</code>
</pre>
<p>Generates:</p>
<pre><code>#menu a {
  color: #111;
  border-top: dotted 1px black;

  border-bottom: solid 2px black;
}
.post a {
  color: red;
  border-top: dotted 1px black;

  border-bottom: solid 2px black;
}
</code></pre>
<p>Exactly what I need. The documentation says, &#8220;Any CSS <em>class</em>, <em>id</em> or <em>element</em> ruleset can be mixed-in that way.&#8221; And since it&#8217;s written in JavaScript, you can load your LESS files and compile them on the client side, which should make designing and debugging a lot easier. LESS best suits my needs, so it&#8217;s the one I&#8217;ll be going with.</p>
<p>Update: It turns out LESS doesn&#8217;t eliminate the inherited classes, they&#8217;re still present in the output. Even so, I still think it best suits my needs.</p>
<p>Update 2: It looks like django-css isn&#8217;t being maintained, so you should probably use <a href="https://github.com/jezdez/django_compressor">django_compressor</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanhayes.name/2011/03/14/css-meta-languages-compilers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Survey of Best Programming Practices</title>
		<link>http://seanhayes.name/2009/10/07/survey-programming-practices/</link>
		<comments>http://seanhayes.name/2009/10/07/survey-programming-practices/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 03:37:18 +0000</pubDate>
		<dc:creator>Seán Hayes</dc:creator>
				<category><![CDATA[Web Design & Development]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[bug tracker]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[survey]]></category>
		<category><![CDATA[unit tests]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://seanhayes.name/?p=80</guid>
		<description><![CDATA[I was having a talk today with some colleagues about the scarcity of web developers, and even software engineers, who use best practices such as: using version control using a bug tracker writing unit tests using a programming framework In &#8230; <a href="http://seanhayes.name/2009/10/07/survey-programming-practices/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was having a talk today with some colleagues about the scarcity of web developers, and even software engineers, who use best practices such as:</p>
<ul>
<li>using version control</li>
<li>using a bug tracker</li>
<li>writing unit tests</li>
<li>using a programming framework</li>
</ul>
<p>In all honesty, I didn&#8217;t do any of these before my current job at <a href="http://govnex.com/">Govnex</a> (aside from a little dabbling with CakePHP), nobody at my first 2 web development jobs did any of these, and we didn&#8217;t learn about any of this stuff in college. As far as I know, nobody I knew at <a href="http://rit.edu/">RIT</a> followed these practices except for maybe using a framework. Of all the job descriptions I&#8217;ve read in the past few years, only a handful mentioned using a framework, and only a couple mentioned anything about unit tests or version control; none of them mentioned the use of bug tracking software. One of my colleagues said that these practices are common among all developers, while my other colleague agreed with me that they&#8217;re hard to find.</p>
<p>What do you think? I&#8217;ve created <a href="http://spreadsheets.google.com/embeddedform?key=t8n33IfgoipRYmFSS5CuqsQ">a 6 question Google Apps form for collecting survey data</a> and made <a href="http://spreadsheets.google.com/ccc?key=0AhZ3SH4irFLEdDhuMzNJZmdvaXBSWW1GU1M1Q3Vxc1E&#038;hl=en">the results</a> public, it would be a big help if you could fill it out. Afterwards, please share your comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanhayes.name/2009/10/07/survey-programming-practices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

