Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Coffeescript Application Development Cookbook
  • Table Of Contents Toc
Coffeescript Application Development Cookbook

Coffeescript Application Development Cookbook

By : Hatfield
4.6 (5)
close
close
Coffeescript Application Development Cookbook

Coffeescript Application Development Cookbook

4.6 (5)
By: Hatfield

Overview of this book

If you are interested in developing modern applications, this book will help you leverage the vast JavaScript ecosystem while using an elegant language, helping you avoid the shortcomings of JavaScript.
Table of Contents (13 chapters)
close
close
12
Index

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.

Tip

You might be surprised to know that Microsoft Windows has shipped with a JavaScript execution engine called Windows Script Host since Windows 98.

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:

Part

Some options

User interfaces

UI frameworks including jQuery, Backbone.js, AngularJS, and Kendo UI

Databases

Node.js drivers to access SQLite, Redis, MongoDB, and CouchDB

Internal/external services

Node.js with Node Package Manager (NPM) packages to create internal services and interfacing with external services

Testing

Unit and end-to-end testing with Jasmine, Qunit, integration testing with Zombie, and mocking with Persona

Hosting

Easy API and application hosting with Heroku and Windows Azure

Tooling

Create scripts to automate routine tasks and using Grunt

We will look at each of these in depth throughout this book.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Coffeescript Application Development Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon