• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
10 reasons to love CoffeeScript
 

10 reasons to love CoffeeScript

on

  • 935 views

 

Statistics

Views

Total Views
935
Views on SlideShare
935
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    10 reasons to love CoffeeScript 10 reasons to love CoffeeScript Presentation Transcript

    • 10 razões para você usar CoffeeScript e se apaixonar... Lukas AlexandreSaturday, January 19, 13
    • 1-Sintaxe limpa • Inspirada em Ruby e Python; • Parênteses opcionais; message = Hello World sayHello messageSaturday, January 19, 13
    • 2-Impõe boas práticas de JS • Escopos fechados; • Previne “global namespace flooding”; sayHello = (message) -> (function() { console.log message var sayHello; sayHello Hello World sayHello = function(message) { return console.log(message); }; sayHello(Hello World); }).call(this);Saturday, January 19, 13
    • 3-Fat Arrow • Workarounds imbutidos; coffee = var coffee = { isFull: true isFull: true, watchDrink: -> watchDrink: function(){ $(.drink a).on click, => var that = this; @isFull = false $(.drink a).on(click, function(){ that.isFull = false; }); } }Saturday, January 19, 13
    • 4-Interpolação de strings • Chega de + + + + name = John Doe var name = John Doe; console.log "Hi, my name is #{name}" console.log("Hi, my name is " + "name")Saturday, January 19, 13
    • 5-List Comprehensions names = [Foo, Bar, Baz] var names = [Foo, Bar, Baz]; console.log(name) for name in names for(var i=0; i < names.length; i++){ console.log(names[i]); }Saturday, January 19, 13
    • 6-Modificadores Condicionais allowEntrance() unless age < 21 if(age > 21) { allowEntrance() if age >= 21 allowEntrance() } if(age >= 21) { allowEntrance() }Saturday, January 19, 13
    • 7-Classes class Coffee constructor: (@name) -> brew: -> console.log Brewing description: -> console.log "Coffee is #{@name}" frenchCoffee = new Coffee(French) frenchCoffee.description # Coffee is FrenchSaturday, January 19, 13
    • 8-Uma visão do futuro • Suporte de Brendan Eich; • @ e => no JS;Saturday, January 19, 13
    • 9-Aceitação da comunidade • Rails >= 3.1; • Python & PHP; • Unit Testing frameworks;Saturday, January 19, 13
    • 10-Ótimas fontes de aprendizado • http://coffeescript.org • http://coffeescriptcookbook.com • http://www.codeschool.com/courses/ coffeescriptSaturday, January 19, 13
    • Contato • pessoal: lukasalexandre@me.com • profissional: lukas@codelogic.me • http://github.com/lukasalexandreSaturday, January 19, 13
    • Perguntas?Saturday, January 19, 13
    • Referências • http://www.netmagazine.com/features/10- good-reasons-use-coffeescriptSaturday, January 19, 13