

Make your website super fast with Asset Pipeline, Sprites & Cloudfront - moritzplassnig
http://blog.railsonfire.com/2012/05/18/Assets-Sprites-CDN.html

======
davedx
This is a nice useful blog post, but it does lead me to question to state of
Rails -- is it me, or is it incredibly complicated these days to build a
production ready Rails site?

I still love the simplicity of developing with Rails, but all these things you
need to remember to deploy give me cold sweats.

~~~
inkel
I agree with you. I'm not doing Rails anymore, I'm working with Cuba + gs +
dep + Ohm + mote, and I find it easier and less bloated than what Rails has
become.

Rails 3.x, though with a couple of good ideas, it's not as easy as it used to
be to start developing an app, less say deploying it. Too many helpers and
technologies to learn, IMO completely unnecessary.

~~~
SkyMarshal
_> Cuba + gs + dep + Ohm + mote_

I thought I'd heard of everything, but I haven't heard of a single one of
these. Any chance you can write up a blog post about building websites with
them and post it?

------
sirn
May slightly OT: The best naming scheme for page name I've ever seen is to use
body#controller.action then put CSS relevant to a single controller in Rails-
generated controller_name.css.scss. It helps preventing crashing while keeping
file count to minimum. Extra bonus, it also provide ability to reuse certain
CSS within same controller. For example:

    
    
        # articles.css.scss
        
        body#articles {
        
          /* We display title in LARGE RED TEXT in articles controller. */
          h2 {
            font-size: 24px;
            color: red;
          }
        
          &.index {
            /* Oh noes we don't really want LARGE RED TEXT here. */
            h2 { font-size: 16px; }
          }
        
        }
    

All my projects now started this way. It's very maintainable.

~~~
ruckusing
I love this method and have almost the exact setup. I do the same for JS too.

In the footer of every page:

    
    
        $(document).ready(function() {
          if (V.Views.orders_index) { V.Views.orders_index(); }
        }
    

Where "V.Views.orders_index" is basically "${controller}_${index}". Thus you
just need to actually define that function in an included JS and voila, thats
your calling hook and your JS is invoked.

------
ericcholis
It should be noted that while this is written with Rails in mind, the
techniques can be applied to any web language.

~~~
matlock
You are absolutely right. Will add this to the Header

------
dawie
Won't Cloudflare help by caching static stuff and providing the CDN?

~~~
matlock
I haven't looked into Cloudflare a lot, but it looks like it would solve that
as well.

------
hydrorush
THIS IS THE MOST USELESS SERVICE I HAVE EVER SEEN. it is the equivilent of the
dicks gem for serivices (<http://bit.ly/bfQji6>) but wait no... dicks is funny
and this is just sad. like a clown dying. with cancer. of the ass.

~~~
mrinterweb
Comments like these make me wish I had the ability to downvote.

