<?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>metaduck &#187; Web</title>
	<atom:link href="http://www.metaduck.com/category/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.metaduck.com</link>
	<description></description>
	<lastBuildDate>Wed, 05 May 2010 12:04:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Zero width ExtJS HTMLEditor on IE7</title>
		<link>http://www.metaduck.com/2010/05/zero-width-extjs-htmleditor-on-ie7/</link>
		<comments>http://www.metaduck.com/2010/05/zero-width-extjs-htmleditor-on-ie7/#comments</comments>
		<pubDate>Wed, 05 May 2010 12:04:43 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.metaduck.com/?p=252</guid>
		<description><![CDATA[Do you have a zero width HTMLEditor on IE7 only?
Don't waste hours like I did trying to figure it out.
Pass in a 'width' argument to the HTMLEditor constructor. That did it for me.
Using ExtJS 3.2.1.
]]></description>
			<content:encoded><![CDATA[<p>Do you have a zero width HTMLEditor on IE7 only?</p>
<p>Don't waste hours like I did trying to figure it out.</p>
<p>Pass in a 'width' argument to the HTMLEditor constructor. That did it for me.</p>
<p>Using ExtJS 3.2.1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2010/05/zero-width-extjs-htmleditor-on-ie7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tutorial: building and styling a Rails app with styled_objects</title>
		<link>http://www.metaduck.com/2009/10/tutorial-building-and-styling-a-rails-app-with-styled-objects/</link>
		<comments>http://www.metaduck.com/2009/10/tutorial-building-and-styling-a-rails-app-with-styled-objects/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 22:53:23 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.metaduck.com/?p=88</guid>
		<description><![CDATA[How to keep your stylesheets clean and organized using Rails
This tutorial covers building a web application from scratch using Rails with the styled_objects plugin.
As an example we will be building a very static front-end website, mainly to focus on stylesheets.
Everything you get from can be applied to more complex applications.
Because this is such a simple [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>How to keep your stylesheets clean and organized using Rails</em></strong></p>
<p>This tutorial covers building a web application from scratch using Rails with the styled_objects plugin.</p>
<p><span id="more-88"></span>As an example we will be building a very static front-end website, mainly to focus on stylesheets.</p>
<p>Everything you get from can be applied to more complex applications.</p>
<p>Because this is such a simple application, we won't be using scaffolding generators.</p>
<h2>About styled_obejcts</h2>
<p><a href="http://wiki.github.com/pgte/styled_objects">styled_objects</a> <strong> </strong>is a Rails plugin for simplifying stylesheet management on your application.</p>
<p>Instead of having one or more large stylesheets on your public folder, have many. Keep your <span>CSS</span> close to their respective templates. <strong>styled_objects</strong> will compile them into one file per page.</p>
<h2>Getting started</h2>
<p>1. Bootstrap your Rails app</p>
<pre>$ rails testapp</pre>
<p>2. Install the LESS gem:</p>
<p>Edit your config/environment.rb and place, anywhere before the "end":</p>
<pre class="brush: ruby;">config.gem 'less'</pre>
<p>Run on the shell:</p>
<pre>$ sudo rake gems:install</pre>
<p>2. install the styled_objects plugin</p>
<pre>script/plugin install git://github.com/pgte/styled_objects.git</pre>
<h2>The application</h2>
<p>Here we will be building a simple example application for an e-commerce website.<br />
First we will be focusing on building the controllers and the views, and finally we will learn how to style them with styled_objects.</p>
<p>To start we will be having products and product categories. One product can be in many categories and one category can contain many products. So, it is a many-to-many relationship.</p>
<p>For the sake of simplicity, let's say a product has a name and a description.</p>
<p>Each category have a name.</p>
<p>(I won't go through the building of the models, it's beyond the scope of this tutorial).</p>
<h3>Product page</h3>
<p>After you have your migrations and models setup, we need to configure the routes for our products controller.</p>
<p>Edit your config/routes.rb and add:</p>
<pre class="brush: ruby;">map.resources :products</pre>
<p>Now build the controller under app/controllers/products_controller.rb. For now we will only have a "show" action:</p>
<pre class="brush: ruby;">
class ProductsController &lt; ApplicationController

  def show
    @product = Product.find(params[:id])
  end

end
</pre>
<p>Do the show template  under app/views/products/show.html.erb:</p>
<pre class="brush: ruby;">
&lt;h1&gt;&lt;%= h @product.name %&gt;&lt;/h1&gt;
&lt;p&gt;&lt;%= h @product.description %&gt;&lt;/p&gt;
</pre>
<h3>Category page</h3>
<p>On this page we will be presenting all products on the current category.</p>
<p>Build the product category routes ou config/routes.rb:</p>
<pre class="brush: ruby;">
config.resources :categories
</pre>
<p>Next, build the controller under app/controllers/categories_controller.rb:</p>
<pre class="brush: ruby;">
class CategoriesController &lt; ApplicationController

  def show
    @category = Product.find(params[:id], :include =&gt; :products)
  end

end
</pre>
<p>And the view under app/views/categories/show.html.erb:</p>
<pre class="brush: ruby;">
&lt;h1&gt;&lt;%= h @category.name%&gt;&lt;/h1&gt;

&lt;p&gt;products in this category:&lt;/p&gt;

&lt;%= render :partial =&gt; 'products/product', :collection =&gt; @category.products %&gt;
</pre>
<p>This template is a bit more complex than the product show one because it presents all the products inside the current category by calling the <em>products/_product.html.erb</em> partial for each product.</p>
<p>Let's do this partial (under app/views/products/_product.html.erb):</p>
<pre class="brush: ruby;">
&lt;h2&gt;&lt;%= link_to h(product.name), product_path(product) %&gt;&lt;/h2&gt;
&lt;p&gt;&lt;%= h truncate(product.description) %&gt;&lt;/p&gt;
</pre>
<p>Here, instead of presenting the full product description, we truncate it using the ActionView truncate helper, presenting only the first 30 characters of the product description.</p>
<h2>Styling up</h2>
<p>So, now that we have the category and product pages in place, we need to style them.</p>
<p>But first we need to style the whole website.</p>
<h3>Global styling</h3>
<p>Personally, I feel comfortable with using this folloing setup when starting a website, but it is not a requirement for styled_objects. (We haven't got there yet).</p>
<h4>Reset stylesheet</h4>
<p>There are numerous reset stylesheets out there. I particulary like the one bundled inside blueprint CSS.</p>
<p>So, <a href="http://www.blueprintcss.org/">grab a copy of blueprint</a> and extract the <em>blueprint/src/reset.css</em> file and copy it into <em>public/stylesheets/</em> directory.</p>
<p>Next, edit your <em>app/views/layouts/application.html.erb</em> and add the following line before the &lt;/head&gt; tag:</p>
<pre class="brush: xml;">

&lt;%= stylesheet_link_tag 'reset' %&gt;
</pre>
<h4>Typography sytlesheet</h4>
<p>This is where we add a special stylesheet only for defining your typography. This is where you will be styling your p, a, ul, li, table, etc. tags.</p>
<p>This is your job, but I like to start from the blueprint/src/typography.css bundled on blueprint.</p>
<p>Save this file into public/stylesheets and add the respective the stylesheet link tag right after the reset one:</p>
<pre class="brush: xml;">
&lt;%= stylesheet_link_tag 'reset' %&gt;
&lt;%= stylesheet_link_tag 'typography' %&gt;
</pre>
<p>This stylesheet you will be formatting according to the desired look of your website.</p>
<h4>Layout stylesheet</h4>
<p>Before building a layout stylesheet, you need to build your layout markup. This will be done inside <em>app/layouts/application.html.erb</em> :</p>
<pre class="brush: php;">
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
&lt;html&gt;
	&lt;head&gt;
		&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;
		&lt;title&gt;Untitled Document&lt;/title&gt;
		&lt;%= javascript_include_tag 'jquery-1.3.2.min' %&gt;
		&lt;%= stylesheet_link_tag 'reset' %&gt;

	&lt;/head&gt;
	&lt;body&gt;
      &lt;div class=&quot;container&quot;&gt;
        &lt;div id=&quot;header&quot;&gt;&lt;h1&gt;Welcome to ACME&lt;/h1&gt;&lt;/div&gt;
        &lt;div id=&quot;main&quot;&gt;
          &lt;%= yield %&gt;
        &lt;/div&gt;
      &lt;/div&gt;
	&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>So, on inside our HTML body tag we have a div tag with a "container" class. This "container" class will be used to center and fix the width of our content.</p>
<p>This is what goes inside the layout stylesheet, under public/stylesheets/layout.css:</p>
<pre class="brush: css;">
.container {
  width: 950px;
  margin: 0 auto;
}
</pre>
<p>So, we are setting the width of content area of our website and centering it.</p>
<p>A lot more could be done here, like styling the <em>header</em> div. This also should be done on the layout stylesheet.</p>
<p>The main idea here is: <strong>use the layout stylesheet to only style markup on the layout template. Don't style more than that here</strong>.</p>
<h3>Local styling</h3>
<p>Now we want to style our templates and partials individually. That's where styled_objects comes in.</p>
<p>This plugin allows you to define the styles per template or partial wiathout adding any code.</p>
<p>First we need to call this helper on the <em>app/views/layouts/application.html.erb</em> file:</p>
<pre class="brush: ruby;">&lt;%= so_stylesheet_link_tag %&gt;</pre>
<p>Place it right before the &lt;/head&gt; tag. This helper creates the link tag to the URL for the "glued" stylesheet of each page.</p>
<p>We now begin with the product show page.</p>
<p>Create app/views/products/show.css and edit it.</p>
<p>We want to style the title and the description:</p>
<pre class="brush: css;">background-color: #e0e0e0;
h1 {color: #f576d8; border-bottom: 1px solid #822321};
p {padding: 1em 0; background-color: #fff;, border-top: 1px solid #d6d6d6}
</pre>
<p>On the first line we see something that isn't pure CSS: the background color style declared on the root of the CSS document. That's there because we are styling the <em>show.html.erb</em> template, not any sub node.</p>
<p>Now we want to style the product category page.</p>
<p>Create <em>app/views/categories/show.css</em>:</p>
<pre class="brush: css;">
border-top: 5px solid black;
background-color: #f7f7f7;
h1 {letter-spacing: -2px; color: #3e3e3e}
</pre>
<p>Here we're giving the category show template a top border (line 1), a background-color (line 2) and we're also styling the title on line 3.</p>
<p>This category show template also shows the products and for that it uses the <em>products/_product.html.erb</em> partial.</p>
<p>We also wish to style this partial. Create the file <em>app/views/products/_product.css</em>:</p>
<pre class="brush: css;">background-color: #999;
border: 1px solid #333;
float: left;
h2 {text-transform: uppercase}
</pre>
<h3>AJAX loading</h3>
<p>So, styled_objects collects the needed CSS fragments on each page and constructs one URL that references all the "glued" CSSes.</p>
<p>What if I want to have a shopping basket partial that is called by AJAX instead of normal partial rendering inside a template?</p>
<p>Simple: just add &lt;%= so_include_partial(partial_path) %&gt; (or &lt;%= so_include_template(template_path) %&gt; if it's a template) to anywhere on the calling template. The partial CSS will be included.</p>
<p>Next: <a href="http://www.metaduck.com/2009/10/tutorial-advanced-styled-objects-on-rails/">See the Advanced styled_objects on Rails Tutorial</a></p>
<h2>More</h2>
<p>Read more about object-oriented CSS here:</p>
<ul>
<li><a href="http://wiki.github.com/stubbornella/oocss">Object-oriented CSS by stubbornella</a></li>
</ul>
<p>See the presentation video:</p>
<ul>
<li><a href="http://www.stubbornella.org/content/2009/03/23/object-oriented-css-video-on-ydn/">Object-oriented CSS by stubbornella</a></li>
</ul>
<h2>Other resources</h2>
<ul>
<li><a href="http://lesscss.org/docs.html">LESS syntax</a></li>
<li><a href="http://wiki.github.com/pgte/styled_objects">styled_objects Rails plugin</a></li>
<li><a href="http://www.blueprintcss.org/">blueprint CSS framework</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2009/10/tutorial-building-and-styling-a-rails-app-with-styled-objects/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>styled_objects Rails plugin</title>
		<link>http://www.metaduck.com/2009/10/styled_objects-rails-plugin/</link>
		<comments>http://www.metaduck.com/2009/10/styled_objects-rails-plugin/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 13:38:13 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.metaduck.com/?p=84</guid>
		<description><![CDATA[Yesterday I released the styled_objects Rails plugin.
styled_objects is a Rails plugin for simplifying stylesheet management on your application.
Instead of having one or more large stylesheets on your public folder, have many. Keep your CSS close to their respective templates. styled_objects will compile them into one file per page.
Why do I need styled_objects?
Because It’s hard to [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I released the styled_objects Rails plugin.</p>
<p><strong>styled_objects</strong> is a Rails plugin for simplifying stylesheet management on your application.</p>
<p><span id="more-84"></span>Instead of having one or more large stylesheets on your public folder, have many. Keep your <span>CSS</span> close to their respective templates. <strong>styled_objects</strong> will compile them into one file per page.</p>
<h2>Why do I need <strong>styled_objects</strong>?</h2>
<p>Because It’s hard to keep order on your application. Having one or many big stylesheet files is not easy. It’s hard do build, maintain and debug.</p>
<p>Do object-oriented stylesheets. Each presentation object has its own style definitions. With styled_objects everything is where expected.</p>
<p>You also make your stylesheets independent from each other, making it easier to find problems extend your app.</p>
<p><a href="http://www.slideshare.net/stubbornella/object-oriented-css">» Check out this presentation for a full pitch on <span>OOCSS</span> (Object-Oriented <span>CSS</span>).</a></p>
<p><a href="Check out http://wiki.github.com/pgte/styled_objects">Check out http://wiki.github.com/pgte/styled_objects</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2009/10/styled_objects-rails-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails cache in distributed environment</title>
		<link>http://www.metaduck.com/2009/10/rails-cache-in-distributed-environment/</link>
		<comments>http://www.metaduck.com/2009/10/rails-cache-in-distributed-environment/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 10:01:55 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://localhost/metaduck/?p=22</guid>
		<description><![CDATA[Page and fragment caching are life-savers for Rails application scalability. Specially for page cache, they can make your app fast, specially if you use a webserver like Nginx, serving static files directly without touching the Rails stack.
But maintaining cache consistency across a distributed Rails application can be challenging.

When page caching, Rails writes page result in [...]]]></description>
			<content:encoded><![CDATA[<p>Page and fragment caching are life-savers for Rails application scalability. Specially for page cache, they can make your app fast, specially if you use a webserver like <a href="http://nginx.net/">Nginx</a>, serving static files directly without touching the Rails stack.</p>
<p>But maintaining cache consistency across a distributed Rails application can be challenging.</p>
<p><span id="more-22"></span></p>
<p>When page caching, Rails writes page result in a static file on the public folder (when using the default options), allowing the web server to serve it directly.</p>
<h2>Expiring cache</h2>
<p>Cache expiration must be done explicitly by your app using the <a href="http://guides.rubyonrails.org/caching_with_rails.html">expire_page command</a>. This should be done when changes are made to your model (creations, deletions and updates), and should affect one or more pages, depending on your app. The cache expiration should be placed on model sweepers, as <a href="http://guides.rubyonrails.org/caching_with_rails.html#sweepers">explained here</a>.</p>
<h2>Distributed environment</h2>
<p>What about whenu  you are using more than one box for serving your Rails app? When one box calls ethe expire page command, it only cleans the local cache, rendering the other boxes cache remain inconsistent.</p>
<h2>Solutions</h2>
<p>There are several solutions to this. Let's look at them:</p>
<h3>1. dRb cache store</h3>
<p>dRb (or distributed Ruby) cache store uses a singleton process to communicate your cache decisions. This is not a good solution because:</p>
<ul>
<li>there is a single point of failure: the dRb process</li>
<li>web servers generally can't talk to dRb. even if they could, serving static files locally is much faster</li>
</ul>
<h3>2. Memcache Store</h3>
<p>Using a <a href="http://www.danga.com/memcached/">memcached</a> service is one good solution. Memcached can be use clustering and load balancing, and it is pretty fast. But, if you are using a distributed Rails environment mainly for the sake of redundancy, or don't want to complicate the environment setup, don't use memcache store.</p>
<h3>3. Cron-based expiration</h3>
<p>You can expire cache on a scheduled basis. This can be enough for some applications. But for some, specially when you have to keep a tight  cache consistency, this is not enough</p>
<h2>4. Build your own distributed cache cleaning</h2>
<p>In this solution, your model cache sweepers are responsible for cleaning the cache (deleting page cache files) on the other machines.</p>
<p>But how does one machine contact the other machines?</p>
<p>One solution I came up with envolves every machine having a Mongrel server listening on a public TCP port. (When I say public,. mean accessible to the other machines on the cluster. This is not a service that you  want to be public on the internet) .</p>
<p>This HTTP service is there just to listen to cache expiration events. It accepts, as arguments, the paths of the page cache</p>
<h3>Security concerns</h3>
<p>This service can be implemented on your Rails app, but it should not be accessible to</p>
<h2>Drawbacks</h2>
<p>There are several problems with this aproach:</p>
<h3>1. Every machine must know each other</h3>
<p>In order for one machine to contact each other when expiration must occur, every machine must know the other machines. This can be challenging using Rails config, but can be done in Capistrano tasks.</p>
<h3>2. It does not scale well</h3>
<p>Every time you add a machine you are increasing the cache expiration cost.</p>
<h3>3. Fault tolerance</h3>
<p>When you expire a cache page, you must contact EVERY other box. If the cache expiration service of one box is down, the cache expiration will fail. Error handling must be done carefully, having a fall-back mechanism like putting the cache expiration command on a queue.</p>
<h2>A better solution</h2>
<p>One better solution is to make cache expiration events ASYNCHRONOUS. When expiring a page, an event is triggered, and every other box is listening on this channel.</p>
<p>This can be achieved using UDP broadcasts, and having every box listening on this UDP port.</p>
<h3>Drawbacks (again)</h3>
<p>A fall-back mechanism must be in place, though, in case one box is down during the cache expiration event, rendering the cache inconsistent.</p>
<p>This can be done using some kind of persistent message queue instead of UDP broadcasts, but I think this can be an overkill for most applications.</p>
<p>Expect to hear from me soon regarding the implementation of this solution!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2009/10/rails-cache-in-distributed-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Please make the web faster</title>
		<link>http://www.metaduck.com/2009/09/please-make-the-web-faster/</link>
		<comments>http://www.metaduck.com/2009/09/please-make-the-web-faster/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 11:30:29 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://localhost/metaduck/?p=20</guid>
		<description><![CDATA[Let's make the web faster, says Google. Best practices for speeding up your website, says Yahoo.
Search engines want to crawl the web faster, and website owners want their users to have a good navigation experience which includes fast page loading.
Both Google and Yahoo say approximately the same regarding techniques for optimizing page load and rendering [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/speed/articles/">Let's make the web faster</a>, says Google. <a href="http://developer.yahoo.com/performance/rules.html">Best practices for speeding up your website</a>, says Yahoo.</p>
<p>Search engines want to crawl the web faster, and website owners want their users to have a good navigation experience which includes fast page loading.</p>
<p>Both Google and Yahoo say approximately the same regarding techniques for optimizing page load and rendering speed. I am not going to go through each one of them, it's not the point. Let me just tell you my experience regarding the implementation of these rules.</p>
<p><span id="more-20"></span></p>
<h3>1. It's not that hard</h3>
<p>It's not so hard to implement these rules. Any savvy web developer should have no trouble setting up gzip compression or the page cache.</p>
<p>If you think it's hard, you should not be doing deployments. No more weak sauce 25th hour deployments, please!</p>
<h3>2. You should plan it ahead</h3>
<p>When planning for a new website or a website revamping, you should discuss and establish the performance goals with the team building it.</p>
<p>These are the minimal list of things I think should be established beforehand:</p>
<ul>
<li>Maximum total page weight for empty cache - what is the sum in bytes of all the page elements, including HTML, CSS, javascript, images, flash movies, etc?</li>
<li>Maximum total page weight for primed cache - the same as above, but when the customer is reloading a page shortly after.</li>
<li>Static files should have a very long expiration dateur</li>
<li>What should be the cache expiration time for dynamic content?</li>
<li>How many HTTP requests the browser will make for empty and primed cache?</li>
</ul>
<p>Remember: this is a negotiation, not an imposition. The more complex your webpage design is, the more it will weight. Balance your design with webpage size, reach an agreement on these values, and write them down.</p>
<p>YSlow (which is a tool for measuring website performance) grades webpages according to some conventions on good practices. For an even more aggressive approach, aim for a good YSlow grade!</p>
<h3>3. you should audit it</h3>
<p>There are many tools for building performance grades on your website pages. I use YSlow for Firebug, but there is a list of others <a href="http://code.google.com/speed/downloads.html">here</a>. Anyone can use them, and they produce quite comprehensive graphics and stats on your webpage performance.</p>
<p>Check and recheck these stats against what was previously decided.</p>
<h3>Back to reality</h3>
<p>Not many companies know their homepage total weight, or their YSlow grade. Many big portals have poor grades, and can be fairly improved. Why don't they? I think it's because usually Marketing people lead website projects (which is good), they measure clicks, conversion rates, etc., but they lack the tools and knowledge to measure it's performance.</p>
<p>Website owners, please be at least as demanding on page loading and rendering speeds as you are with design and content quality. Please make the web faster.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2009/09/please-make-the-web-faster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Structural SEO</title>
		<link>http://www.metaduck.com/2009/09/structural-seo/</link>
		<comments>http://www.metaduck.com/2009/09/structural-seo/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 21:47:13 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[No category]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://localhost/metaduck/?p=24</guid>
		<description><![CDATA[SEO, SEO, it's all so 2005... but yet, if you check the average website, the SEO concerns lack on the implementation side.
Everyone in the Marketing department is concerned about metadata, keyword density, and all the other recommended metrics to quantify you content SEO, but, for the most part, their website implementation lacks at least one [...]]]></description>
			<content:encoded><![CDATA[<p>SEO, SEO, it's all so 2005... but yet, if you check the average website, the SEO concerns lack on the implementation side.</p>
<p>Everyone in the Marketing department is concerned about metadata, keyword density, and all the other recommended metrics to quantify you content SEO, but, for the most part, their website implementation lacks at least one part of something that I call <em>Structural SEO</em>.</p>
<h3><span id="more-24"></span>What is structural SEO?</h3>
<p>Structural SEO is the SEO that one can provide on the software side. It sets the base for the content writer, maximizing search engine indexability.</p>
<p>Minimal key features of structural SEO are:</p>
<h4>Page titles</h4>
<p>Page titles should vary according to content since it is a very good place to have important keywords.</p>
<p>In my opinion, they should also include the website name and navigation context, but not too much of it, and the content title should always come in first.</p>
<p>Example of a title:</p>
<p><code>Structural SEO &lt; SEO &lt; metaduck</code></p>
<h4>Headings and styling</h4>
<p>Content should be organized in headings. For that, content management people should have CSS stylesheets in place so that no additional formatting is required when entering content. Too much formatting using markup hurts SEO. Content should be only content.</p>
<p>As an example, when producing content templates or layouts, I always put the website title inside a &lt;h1&gt; tag.</p>
<p>Content title is next, which shold have it's own h2 title, and content subtitles should be inside h3, etc.</p>
<h4>Accessibility on navigation</h4>
<p>Navigation menus should not be javascript or flash dependent. This sounds simple, but there are still a lot of old and new websites out there implementing dynamic menus that are unreadable by the search engines.</p>
<p>Javascript is ok, but you should have the browser fallback on plain HTML. Your menu should work when the browser has javascript disabled.</p>
<h4>Proeminence on navigation</h4>
<p>Important navigation links should be placed as early as possible on content so that they are more relevant to the search engines.</p>
<h4>Image titles and alts</h4>
<p>All static images should have relevant alt and title attributes, and the content management tools should facilitate (and impose) filling these in.</p>
<h4>Search-engine-friendly URLs</h4>
<p>URLs should be minimal, but provide enough information on the content. For me, wordpress-style URLs are the way to go.</p>
<p>Example for the URL of a page with the title "Structural SEO":</p>
<p><code>http://mydomain.com/structural-seo</code></p>
<p>That's it. No file extensions, no unnecessary arguments, no query string. Words are well separated.</p>
<p>Several products / frameworks allow this, and several make it very hard to implement, specially when using Microsoft ones.</p>
<p>My choice ones are Wordpress (for small websites) and Ruby on Rails routing configuration (for larger websites and applications).</p>
<h3>Conclusion</h3>
<p>If you are running a website development project, please have these considerations in mind before the building phase starts.</p>
<p>If possible, before contracting anyone for building a website, ask what he can do technically to maximize SEO. These should be their minimal concerns.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2009/09/structural-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
