CoffeeScript in 5mins
Upcoming SlideShare
Loading in...5
×
 

CoffeeScript in 5mins

on

  • 2,723 views

 

Statistics

Views

Total Views
2,723
Views on SlideShare
2,722
Embed Views
1

Actions

Likes
2
Downloads
16
Comments
0

1 Embed 1

http://paper.li 1

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

CoffeeScript in 5mins CoffeeScript in 5mins Presentation Transcript

  • CoffeeScript in 5mins @mackato - 2011.09.14 #izakaya.js11 9 15
  • “CoffeeScript is a little language that compiles into JavaScript.”11 9 15
  • Pros less code compile-time code check compiles into pure JavaScript11 9 15 View slide
  • Cons require compile process little strange syntax debugging is too hard, yet.11 9 15 View slide
  • Use Case Rails 3.111 9 15
  • Use Case Any other JavaScript Frameworks11 9 15
  • JS to CoffeeScript $(document).ready(function() { init(); some(); $("a.link").click(function() { $(this).fadeOut("slow", function () { $(this).remove(); }); }); });11 9 15
  • JS to CoffeeScript $(document).ready(function() { init() some() $("a.link").click(function() { $(this).fadeOut("slow", function () { $(this).remove() }) }) })11 9 15
  • JS to CoffeeScript $(document).ready function() init() some() $("a.link").click function() $(this).fadeOut "slow", function () $(this).remove()11 9 15
  • JS to CoffeeScript $(document).ready -> init() some() $("a.link").click -> $(this).fadeOut "slow", -> $(this).remove()11 9 15
  • JavaScript build is necessary without CoffeeScript concatenate <script src="/javascripts/jquery.js"></script> <script src="/javascripts/jquery.min.js"></script> <script src="/javascripts/application.js"></script> <script src="/javascripts/all.js"></script>11 9 15
  • JavaScript build is necessary without CoffeeScript minify (function( window, undefined ) { var document = window.document, navigator = window.navigator, location = window.location; (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9? a.defaultView||a.parentWindow:!1}function cv(a){if(!cj[a]){var b=f(" +">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"|| d===""){ck|| (ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),c11 9 15 .appen
  • JavaScript build is necessary without CoffeeScript concatenate minify js js js js js11 9 15
  • JavaScript build is necessary without CoffeeScript compile concatenate minify coffee js coffee js js js coffee js11 9 15
  • Cons require compile process # not cons little strange syntax debugging is too hard, yet.11 9 15