Book Image

CoffeeScript Programming with jQuery, Rails, and Node.js

By : Michael Erasmus
Book Image

CoffeeScript Programming with jQuery, Rails, and Node.js

By: Michael Erasmus

Overview of this book

<p>CoffeeScript is a young but popular language that makes web programming fun and more productive. It compiles to JavaScript and unleashes its powerful features while not straying too far from the language. It’s become one of the most popular languages on Github and is being used for both browser and server side programming.<br /><br />"CoffeeScript programming with jQuery, Rails, and Node.js" will not only teach you the CoffeeScript language but also show you how it’s being used by professional programmers with the latest web technologies.<br /><br />This book will teach you the basics of the language, focusing particularly on how it improves on JavaScript. It then focuses on building real life projects in CoffeeScript using jQuery, Rails, and Node.js. <br /><br />We look at CoffeeScript as a language that takes the power of JavaScript and presents it in an elegant and concise syntax. We will then see how we can use its power to write beautiful and short programs for various environments and how it complements the latest and greatest web frameworks.<br /><br />CoffeeScript programming with jQuery, Rails, and Node.js is all you need to become well versed with this great language and set you on your way to using it to write web applications.</p>
Table of Contents (12 chapters)
CoffeeScript Programming with jQuery, Rails, and Node.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Our application


In this chapter, we're going to build a collaborative to-do list application. This means that you'll be able to share your to-do list with other people in real time. One or more people will be able to add, complete, or remove to-do list items at the same time. Changes to the to-do list will be automatically propagated to all users. This is the type of application that Node is perfect for.

Our Node.js code will consist of two distinct parts, the normal web application that will serve static HTML, CSS, and JavaScript, and a WebSocket server that handles the real-time updating of all the to-do list clients. Together with this, we'll have a jQuery-driven client that will look very similar to our application in Chapter 3, CoffeeScript and jQuery.

We'll use some of the assets (stylesheets and images) from our existing to-do list applications. We'll also re-use the client-side jQuery code from Chapter 3, CoffeeScript and jQuery and tweak it to fit our application. If you weren't following...