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
4Nov/090

Tools for the job

toolsHere are some tools / gems / plugins I can't live without:

IDEs:

  • Aptana Rad Rails - very good at Rails and Ruby. It's based on Eclipse - Java - so it tends to bloat
  • gedit- Tiny footprint, simple. Great for web and PHP with the right plugins and conf tweaks

Ruby / Rails plugins:

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/090

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.

12Out/094

Tutorial: building and styling a Rails app with styled_objects

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.

Filed under: CSS, Rails, Web Continue reading
10Out/090

styled_objects Rails plugin

Yesterday I released the styled_objects Rails plugin.

styled_objects is a Rails plugin for simplifying stylesheet management on your application.

Filed under: Rails, Web Continue reading
7Out/090

Rails cache in distributed environment

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.

28Set/090

Capistrano deploying full text search on Rails using acts_as_xapian

acts_as_xapian is a rails plugin for Xapian, a full text search engine.

acts_as_xapian installs the search engine database inside the plugin directory, under xapiandbs. If you use Capistrano as a deployment tool and since the entire codebase is rewritten (including the plugin directory),  you will have to rebuild the entire index every time you do a deployment.

22Set/090

Please make the web faster

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 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.

Filed under: Web Continue reading