metaduck
30Dez/090

New year resolutions

Happy new year to everyone!

I haven't posted for a while - had a busy end-of-year...

Things I want to look into early 2010:

  • Haml
  • Rails 3
  • Node.js
  • Erlang
  • Hadoop
  • Scala
  • EJB 3
  • Ruby alteranative VMs (JRuby, MacRuby, LevMag)
  • ...and more cool blog posts!
Filed under: No category No Comments
28Out/090

sweepy – Distributed and scalable file caching expiration in Rails

sweepyFollowin up on my post about Rails cache on a distributed environment, I recently published a Rails plugin called sweepy.

Sweepy allows you to expire file-based cache (page cache and fragment cache) on Rails on multiple boxes.

If you don’t want or don’t need to setup memcached, and just want to simply use Rails page and / or fragment caching, sweepy automatically handles page expiration.

You can use the Rails expire_page and expire_cache API, no need to change existing code.

16Out/091

How to alias_method_chain a class method on Rails

Sometimes, when building a plugin, you have to extend Rails behaviour using alias_method_chain.

So you do, on the included module:

...
    def self.included(base)
      base.send :include  InstanceMethods
      base.class_eval do
        alias_method_chain :method_i_want_to_extend, :my_feature
      end
    end

    module InstanceMethods
     def method_i_want_to_extend_with_my_feature(args)
       (do something or not...)
       method_i_want_to_extend_without_my_feature(args)
       (do something or not...)
     end
    end
...

What if the method you are extending is a class method?

13Out/090

Tutorial – advanced styled_objects on Rails

Following the building and styling a Rails app with styled_objects tutorial, we will learn how to use some advanced features of styled_objects and also some best practices to keep your CSS code maintainable while using styled_objects.

21Set/090

Structural SEO

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 part of something that I call Structural SEO.

Tagged as: Continue reading