Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rails Frontline

Rails Frontline

Apresentação feita no DevDay 2011 BH - MG sobre Rails 3.1 e suas novidades sobre frontend development.

danielvlopes

August 04, 2011
Tweet

More Decks by danielvlopes

Other Decks in Programming

Transcript

  1. v v

  2. • MENOS REQUISIÇÕES • CSS e JS EXTERNOS • MINIMIZE

    JS E CSS • SCRIPTS DUPLICADOS • CSS NO TOPO • SCRIPTS NO FINAL • CACHE OTIMIZADO • COMPACTAÇÃO • CDN • E-TAGS • AJAX CACHE - EXPRESSÕES CSS AJAX CACHE EVITE REDIRECIONAMENTOS REDUZA PESQUISAS DNS
  3. #main { padding: 0px; border: 1px solid #aec1d0; background: white;

    position: relative; @include border-radius(10px, 10px, 10px, 10px); }
  4. #dashboardBody { .warning { margin: 10px 0 0 0; padding:

    0; color: #514721; background-color: #fff6bf; a { color: #098aa4; } a:hover { text-decoration: underline; } } }
  5. #bedsBody { li.bed { position: relative; display: inline-block; @include border-radius(5px);

    &.available { background-color: #e1ffdc; border: 1px solid #a0e897; color: #2e9d30; } &.occupied { background-color: #ffc1c3; border: 1px solid #d4888a; color: #b43c41; } }
  6. "CoffeeScript is well done and more convenient to use than

    Javascript" Brendan Eich - criador do Javascript http://bit.ly/qucelc
  7. class Speaker say: -> console.log "----" class BrazilianSpeaker extends Speaker

    say: -> console.log "Olá pessoal!" super() class AmericanSpeaker extends Speaker say: -> console.log "Hello folks!" super() speaker = new BrazilianSpeaker speaker.say()
  8. • Convenções claras • Sem colisões e escopo global •

    Sem confusões com this • Bem menos código • Código expressa a lógica • Mesmas vantagens de JS
  9. "CoffeeScript isn’t just about prettier code. It’s about being more

    confident that you got it right the first time" Trevor Burnham - CoffeeScript Book PragProg http://bit.ly/o915Fo