- CoffeeScript Application Development Cookbook
- Mike Hatfield
- 377字
- 2021-07-23 19:35:51
Introduction
We are living in a time where JavaScript is becoming the most widely-used programming language in the world, even though it is not a language without its faults.
With its rise in popularity, JavaScript has become a legitimate option to develop all aspects of modern applications, applications that comprise a rich HTML/CSS/JavaScript client that communicates with backend services via AJAX. These applications can be run on desktops and mobile platforms as websites, mobile web, or hybrid applications using a native wrapper such as Apache Cordova / Adobe PhoneGap.
Node.js has helped JavaScript reach well beyond the boundaries of the web browser and into our operating systems themselves.
JavaScript, though very successful, can be a difficult language to work with. JavaScript was designed by Brendan Eich in a mere 10 days in 1995 while working at Netscape. As a result, some might claim that JavaScript is not as well rounded as some other languages, a point well illustrated by Douglas Crockford in his book titled JavaScript: The Good Parts, O'Reilly Media.
These pitfalls found in the JavaScript language led Jeremy Ashkenas to create CoffeeScript, a language that attempts to expose the good parts of JavaScript in a simple way. CoffeeScript compiles into JavaScript and helps us avoid the bad parts of JavaScript.
There are many reasons to use CoffeeScript as your development language of choice. Some of these reasons include:
- CoffeeScript helps protect us from the bad parts of JavaScript by creating function closures that isolate our code from the global namespace by reducing the curly braces and semicolon clutter and by helping tame JavaScript's notorious
this
keyword - CoffeeScript helps us be more productive by providing features such as list comprehensions, classes with inheritance, and many others
- Properly written CoffeeScript also helps us write code that is more readable and can be more easily maintained
As Jeremy Ashkenas says:
"CoffeeScript is just JavaScript."
We can use CoffeeScript when working with the large ecosystem of JavaScript libraries and frameworks on all aspects of our applications, including those listed in the following table:

We will look at each of these in depth throughout this book.
- 程序員面試筆試寶典(第3版)
- 自己動手實現Lua:虛擬機、編譯器和標準庫
- Interactive Data Visualization with Python
- JS全書:JavaScript Web前端開發指南
- jQuery開發基礎教程
- Hands-On Functional Programming with TypeScript
- IBM Cognos Business Intelligence 10.1 Dashboarding cookbook
- Advanced UFT 12 for Test Engineers Cookbook
- QGIS 2 Cookbook
- C語言從入門到精通
- Deep Learning for Natural Language Processing
- Hands-On ROS for Robotics Programming
- TypeScript High Performance
- Game Development Patterns and Best Practices
- A/B 測試:創新始于試驗