Cargando…

CoffeeScript Programming with jQuery, Rails, and Node.js.

3. CoffeeScript and jQuery; Finding and changing elements; The function; Utility functions; Ajax methods; Using jQuery; Using CoffeeScript and jQuery in the browser; Compiling CoffeeScript; jQuery and CoffeeScript; Testing it all; Running a local web server; Our application; TodoMVC; Our initial HTM...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Erasmus, Michael
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Pub., 2012.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Table of Contents; CoffeeScript Programming with jQuery, Rails, and Node.js; CoffeeScript Programming with jQuery, Rails, and Node.js; Credits; About the Author; About the Reviewers; www.PacktPub.com; Support files, eBooks, discount offers and more; Why Subscribe?; Free Access for Packt account holders; Preface; What this book covers; What you need for this book; Who this book is for; Conventions; Reader feedback; Customer support; Downloading the example code; Errata; Piracy; Questions; 1. Why CoffeeScript?; CoffeeScript syntax; Semicolons and braces; Whitespace; Parenthesis.
  • CoffeeScript has great function syntaxReturn isn't required; Function arguments; Where did the var keyword go?; CoffeeScript handles scope better; Top level var keywords; CoffeeScript has better object syntax; Inheritance; Overwhelmed?; Extending prototypes; A few other things CoffeeScript fixes; Reserved words and object syntax; String concatenation; Equality; The existential operator; List comprehensions; The while loop; Conditional clauses and logical aliases; Array slicing and splicing; Destructuring or pattern matching; => and @; Switch statements; Chained comparisons.
  • Block strings, block comments, and stringsSummary; 2. Running CoffeeScript; The CoffeeScript stack; Node.js and npm; Node.js, npm, and CoffeeScript on Windows; Installing CoffeeScript on a Mac; Using the Apple installer; Using Homebrew; Installing CoffeeScript with npm; Installing CoffeeScript on Linux; Ubuntu and MintOS; Debian; Other distributions; Installing CoffeeScript with npm; Building Node.js from source; Building on Linux or Unix; Building on Windows; Using CoffeeScript; The coffee command; The REPL; Running .coffee files; Compiling to JavaScript; Watching; Putting it all together.
  • Don't repeat yourself (DRY)Rails and JavaScript; Rails and CoffeeScript; Installing Rails; Installing Rails using RailsInstaller; Installing Rails using RVM; Got Rails installed?; Developing our Rails application; MVC; Running our application; Our todo_items resource; routes.rb; The controller; The view; The CSS; Our model; Migrations; The Rails console; Displaying the items in our view using ERB; Creating a partial; Adding new items; Let's try and add a to-do item; Adding a CoffeeScript view; CoffeeScript in the asset pipeline; Completing the to-do items; Removing tasks; Now, it's your turn.