SlideShare a Scribd company logo
A Small Introduction..!
Who am I?
• rampicos.wordpress.com
• twitter.com/rampicos
• facebook.com/raamkumar.m
• Code
• Ramkumar Murugadoss
What is CoffeeScript
• CoffeeScript is a little language that aims to
give you easy access to the good parts of
JavaScript
• One-third less code in order to generate the
same JavaScript
Why CoffeeScript
• Increases readability
• Eliminates syntactic clutters
• Very less number of code lines to get much
more javascripts
• Get to know, because it is really popular
History
• On Christmas Day 2009, Jeremy Ashkenas first
released CoffeeScript
• On Christmas 2010 CoffeeScript 1.0 get
released, with this release CoffeeScript
became one of Github’s “most-watched”
projects
• In 2011, CoffeeScript was included in Ruby on
Rails 3.1
How it gets so much Popularity
• The good parts like super functions, classes,
etc.. are still there
• The Compiler is present to help
• It is all so clear
Setting Env
• Install Node.js for your platform
• Goto Terminal/CMD
• Execute “npm install -g coffee-script”
• Use “coffee -v” to check CoffeeScript works
and to know the version
All set
• “coffee –c <filename.coffee>” to compile
coffee file to js file
• “coffee -o output/folder -c Coffee/files/folder”
to bulk compile coffee files to js files and store
in specified folder
Ready to Code
• You don't need to declare variables with var
• You don't need to use semicolons ;
• Instead of using curly braces { } to surround
blocks of code with indentation
• Use @ for this
• Use -> for function definition
• Assign default values from function arguments
Some Examples
An Introduction to CoffeeScript
Much more
• Functions
• Objects and Arrays
• Lexical Scoping and Variable Safety
• If, Else, Unless, and Conditional Assignment
• Splats...
• Loops
• Array Slicing and Splicing
• Classes, Inheritance, and Super
With jQuery
Or
Or
Or
Time is Yours

More Related Content

PDF
FITC Sneak Peek 2012
PPTX
Maximize Community Toronto VMUG - Mike Preston
PDF
Migrate PHP E-Commerce Site to Go
PDF
The Often Useful Somewhat Annoying World of WordPress Multisite
KEY
Ruby Concurrency Realities
PPTX
6 reasons you should program in go
PDF
STAQ Development Manual (Redacted)
PDF
Why I will never write JavaScript ever again*
FITC Sneak Peek 2012
Maximize Community Toronto VMUG - Mike Preston
Migrate PHP E-Commerce Site to Go
The Often Useful Somewhat Annoying World of WordPress Multisite
Ruby Concurrency Realities
6 reasons you should program in go
STAQ Development Manual (Redacted)
Why I will never write JavaScript ever again*

What's hot (20)

PDF
SPSNJ 2014: EmberJS & SharePoint
PPTX
Style Is Cool
PDF
Ember and SharePoint
PDF
Must Have Tools
PPTX
Netbeans dev and ecosystem
PPTX
Untangling - fall2017 - week 7
PPTX
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
PDF
DevOps Cardiff - Puppet vs Chef vs Ansible
PDF
Seven Jobs You Should Be Running #sqlsat126
PDF
PowerShell Runspaces
PPTX
Journey To The Front End World - Part3 - The Machine
PPTX
Xamarin - Why I started learning it?
PPTX
Saving Time By Testing With Jest
PDF
Make Local WordPress Development Simple
PPTX
Untangling - fall2017 - week6
PPTX
Sea 2011 presentation
PDF
Use all the buzzwords
PDF
Web Development with Joomla - Past, Present & Future
PPTX
Advice for New WordPress Developers
PPTX
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SPSNJ 2014: EmberJS & SharePoint
Style Is Cool
Ember and SharePoint
Must Have Tools
Netbeans dev and ecosystem
Untangling - fall2017 - week 7
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
DevOps Cardiff - Puppet vs Chef vs Ansible
Seven Jobs You Should Be Running #sqlsat126
PowerShell Runspaces
Journey To The Front End World - Part3 - The Machine
Xamarin - Why I started learning it?
Saving Time By Testing With Jest
Make Local WordPress Development Simple
Untangling - fall2017 - week6
Sea 2011 presentation
Use all the buzzwords
Web Development with Joomla - Past, Present & Future
Advice for New WordPress Developers
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
Ad

Similar to An Introduction to CoffeeScript (20)

PDF
Choosing Javascript Libraries to Adopt for Development
PPTX
Apache Curator: Past, Present and Future
PPT
Joomla as a mobile App backend - ideas, examples and experiences
PPTX
The front end toolkit
PPTX
Ten years later
PDF
Clojurescript slides
PPTX
WordPress Rest API
PPTX
Introduction to Web Technology Stacks
PDF
Go - A Key Language in Enterprise Application Development?
PPTX
Server Side Swift with Kitura@IBM by Sangeeth K Sivakumar
ODP
Selenium at Mozilla: An Essential Element to our Success
PPTX
Font End Development and Drupal: Gulp, Sass, Susy, and Mappy Breakpoints
PPTX
Be faster then rabbits
PDF
Recon-Fu @BsidesKyiv 2016
PPTX
Coding for the cloud - development of modern web applications
PDF
Let’s learn how to use JavaScript responsibly and stay up-to-date.
PDF
The Three Musketeers
PPTX
Ruby and Security
KEY
Why ruby and rails
PDF
Introduction to Go
Choosing Javascript Libraries to Adopt for Development
Apache Curator: Past, Present and Future
Joomla as a mobile App backend - ideas, examples and experiences
The front end toolkit
Ten years later
Clojurescript slides
WordPress Rest API
Introduction to Web Technology Stacks
Go - A Key Language in Enterprise Application Development?
Server Side Swift with Kitura@IBM by Sangeeth K Sivakumar
Selenium at Mozilla: An Essential Element to our Success
Font End Development and Drupal: Gulp, Sass, Susy, and Mappy Breakpoints
Be faster then rabbits
Recon-Fu @BsidesKyiv 2016
Coding for the cloud - development of modern web applications
Let’s learn how to use JavaScript responsibly and stay up-to-date.
The Three Musketeers
Ruby and Security
Why ruby and rails
Introduction to Go
Ad

Recently uploaded (20)

PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Lesson notes of climatology university.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Cell Structure & Organelles in detailed.
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Pre independence Education in Inndia.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Classroom Observation Tools for Teachers
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
Pharmacology of Heart Failure /Pharmacotherapy of CHF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Microbial disease of the cardiovascular and lymphatic systems
Lesson notes of climatology university.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Cell Structure & Organelles in detailed.
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pre independence Education in Inndia.pdf
Institutional Correction lecture only . . .
PPH.pptx obstetrics and gynecology in nursing
Supply Chain Operations Speaking Notes -ICLT Program
O5-L3 Freight Transport Ops (International) V1.pdf
Pharma ospi slides which help in ospi learning
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Classroom Observation Tools for Teachers
102 student loan defaulters named and shamed – Is someone you know on the list?
FourierSeries-QuestionsWithAnswers(Part-A).pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Module 4: Burden of Disease Tutorial Slides S2 2025

An Introduction to CoffeeScript

  • 2. Who am I? • rampicos.wordpress.com • twitter.com/rampicos • facebook.com/raamkumar.m • Code • Ramkumar Murugadoss
  • 3. What is CoffeeScript • CoffeeScript is a little language that aims to give you easy access to the good parts of JavaScript • One-third less code in order to generate the same JavaScript
  • 4. Why CoffeeScript • Increases readability • Eliminates syntactic clutters • Very less number of code lines to get much more javascripts • Get to know, because it is really popular
  • 5. History • On Christmas Day 2009, Jeremy Ashkenas first released CoffeeScript • On Christmas 2010 CoffeeScript 1.0 get released, with this release CoffeeScript became one of Github’s “most-watched” projects • In 2011, CoffeeScript was included in Ruby on Rails 3.1
  • 6. How it gets so much Popularity • The good parts like super functions, classes, etc.. are still there • The Compiler is present to help • It is all so clear
  • 7. Setting Env • Install Node.js for your platform • Goto Terminal/CMD • Execute “npm install -g coffee-script” • Use “coffee -v” to check CoffeeScript works and to know the version
  • 8. All set • “coffee –c <filename.coffee>” to compile coffee file to js file • “coffee -o output/folder -c Coffee/files/folder” to bulk compile coffee files to js files and store in specified folder
  • 9. Ready to Code • You don't need to declare variables with var • You don't need to use semicolons ; • Instead of using curly braces { } to surround blocks of code with indentation • Use @ for this • Use -> for function definition • Assign default values from function arguments
  • 12. Much more • Functions • Objects and Arrays • Lexical Scoping and Variable Safety • If, Else, Unless, and Conditional Assignment • Splats... • Loops • Array Slicing and Splicing • Classes, Inheritance, and Super
  • 14. Or Or