Book Image

CoffeeScript Application Development

By : Ian Greenleaf Young
Book Image

CoffeeScript Application Development

By: Ian Greenleaf Young

Overview of this book

JavaScript is becoming one of the key languages in web development. It is now more important than ever across a growing list of platforms. CoffeeScript puts the fun back into JavaScript programming with elegant syntax and powerful features. CoffeeScript Application Development will give you an in-depth look at the CoffeeScript language, all while building a working web application. Along the way, you'll see all the great features CoffeeScript has to offer, and learn how to use them to deal with real problems like sprawling codebases, incomplete data, and asynchronous web requests. Through the course of this book you will learn the CoffeeScript syntax and see it demonstrated with simple examples. As you go, you'll put your new skills into practice by building a web application, piece by piece. You'll start with standard language features such as loops, functions, and string manipulation. Then, we'll delve into advanced features like classes and inheritance. Learn advanced idioms to deal with common occurrences like external web requests, and hone your technique for development tasks like debugging and refactoring. CoffeeScript Application Development will teach you not only how to write CoffeeScript, but also how to build solid applications that run smoothly and are a pleasure to maintain.
Table of Contents (19 chapters)
CoffeeScript Application Development
About the Author
About the Reviewers


At the beginning of this chapter, we had a lot of knowledge but nothing to show for it. Now, we've got a snazzy single-page web application built with all the goodness of CoffeeScript! There's still a lot more that we can add to our application, but this is a pretty good start.

We learned:

  • How to set up a CoffeeScript application to behave like a normal JavaScript application

  • How to manipulate the DOM from CoffeeScript, and how to call back to CoffeeScript functions on events

  • How to define functions in CoffeeScript, how to name them, and how implicit return values work

  • How to use switch statements

Now that we've had a chance to flex our new CoffeeScript muscles, we're going to hit the gym again. We'll keep adding to our application as we go, but we've got a lot of new CoffeeScript syntax to learn! We'll explore some intermediate features of CoffeeScript, and use them in turn to improve our pet shop's web application.