The Little Book on CoffeeScript by MacCaw Alex
Author:MacCaw, Alex [Alex MacCaw]
Language: eng
Format: epub
Tags: COMPUTERS / Programming Languages / JavaScript
ISBN: 9781449325541
Publisher: O'Reilly Media
Published: 2012-01-20T16:00:00+00:00
Creating Applications
Using Cake for CoffeeScript compilation is fine for static sites, but for dynamic sites, we might as well integrate CoffeeScript compilation into the request/response cycle. Various integration solutions already exist for the popular backend languages and frameworks, such as Rails and Django.
The rest of this chapter explores how to actually structure and deploy CoffeeScript client-side applications. If you’re just using CoffeeScript on the server side, or your framework, such as Rails, already manages this, feel free to skip to Chapter 5.
For some reason, when developers build client-side JavaScript applications, tried and tested patterns and conventions often fly out the window, and the end result is a spaghetti mess of unmaintainable coupled JavaScript. I can’t stress enough how important application architecture is; if you’re writing any JavaScript/CoffeeScript beyond simple form validation, you should implement a form of application structure, such as MVC.
The secret to building maintainable large applications is not to build large applications. In other words, build a series of modular de-coupled components. Keep application logic as generic as possible, abstracting it out as appropriate. Lastly, separate out your logic into views, models, and controllers (MVC). Implementing MVC is beyond the scope of this chapter; for that, I recommend you check out my book on JavaScript Web Applications and use a framework like Backbone or Spine. Rather than that, here we’re going to cover structuring applications using CommonJS modules.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(6556)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6445)
Kotlin in Action by Dmitry Jemerov(5092)
Odoo 15 Development Essentials - Fifth Edition by Daniel Reis & Greg Mader(3513)
Odoo 15 Development Essentials by Daniel Reis(2837)
React Native - Building Mobile Apps with JavaScript by Novick Vladimir(2551)
Learning Angular - Second Edition by Christoffer Noring(2381)
Pride and Prejudice by Jane Austen(2370)
Mobile Forensics Cookbook by Igor Mikhaylov(2040)
Computers For Seniors For Dummies by Nancy C. Muir(2023)
Bulletproof Android: Practical Advice for Building Secure Apps (Developer's Library) by Godfrey Nolan(1893)
Android Development with Kotlin by Marcin Moskala & Igor Wojda(1817)
Building Android UIs with Custom Views by Raimon Ràfols Montané(1810)
1936941139 (N) by Bob Rosenthal(1758)
Building Progressive Web Apps: Bringing the Power of Native to the Browser by Ater Tal(1748)
Hands-On Internet of Things with MQTT by Tim Pulver(1732)
Android App Development by Franceschi Hervé J.;(1729)
Ember.js in Action by Joachim Haagen Skeie(1711)
Hands-On Design Patterns with React Native by Mateusz Grzesiukiewicz(1670)
