Hudson, A: Smashing CoffeeScript
(Sprache: Englisch)
Brew the perfect code with CoffeeScriptIf you're familiar with JavaScript and the often-frustrating process of creating complex applications, a nice cup of CoffeeScript can help. CoffeeScript is a programming language that compiles into JavaScript and...
Leider schon ausverkauft
versandkostenfrei
Buch
38.42 €
Produktdetails
Produktinformationen zu „Hudson, A: Smashing CoffeeScript “
Klappentext zu „Hudson, A: Smashing CoffeeScript “
Brew the perfect code with CoffeeScriptIf you're familiar with JavaScript and the often-frustrating process of creating complex applications, a nice cup of CoffeeScript can help. CoffeeScript is a programming language that compiles into JavaScript and simplifies the entire development process. Now you can tap the full power of CoffeeScript with Smashing CoffeeScript. This full-color, practical book explains CoffeeScript language, syntax, and processes, and will soon have you producing concise and quality code. Ultimately, you'll create RIAs and mobile apps faster, with less hassle.* Gets developers up and running on CoffeeScript, a programming language that compiles into JavaScript and simplifies the process of building software* Helps you produce better JavaScript and more quickly* Introduces the language, syntax, and processes of CoffeeScript* Covers the development of both mobile and rich internet apps* Explores the HTML5 feature set, real-time communication, and using CoffeeScript within node.js projectsDevelopers, blend some better JavaScript with CoffeeScript and Smashing CoffeeScript.
Inhaltsverzeichnis zu „Hudson, A: Smashing CoffeeScript “
INTRODUCTION 1PART I: COFFEESCRIPT BASICS 7Chapter 1: Starting Up Your CoffeeScript Environment 9CoffeeScript in the Browser 10Starting CoffeeScript in Plain HTML 10Understanding CoffeeScript 11Compiling CoffeeScript Outside the Browser 12What Is npm? 12Installing Coffee Using npm 13A Quick Tour of npm 13Installing CoffeeScript 14Compiling CoffeeScript Code 15Putting It Together 16Automatic Compilation 17Avoiding Coff eeScript Errors 17Coding in Good Style 18Coffeelint Will Pick Up Errors 20Summary 20Chapter 2: Using jQuery: DOM Manipulation 21jQuery's Fluent API 22Th e "DOM Ready" Handler 23Selectors, Now Even More Usable 24Comprehensions 25Working with Functions 26Functions for Encapsulation 28Keeping Code DRY 31Function Parameters and Existential Operators 32Using Utility Functions 33Cleaner Click Handlers 36General Event Handling 37Page Events 38Feature Detection for Practical Polyfi ll 40Detecting CSS Features 41Summary 42Chapter 3: Working with Forms 43Basic HTML5 Forms 44Collecting Form Data 44Validating Form Data 45Systematizing Validation 47Common Form Techniques 49Displaying Validation Results Inline 49Continuous Validation 52Controlling Submit Button Interaction 54Prepopulating Form Elements 54Multi-Step Forms 55Selective Form Display 55Validating Partial Form Data 59Modal Form UI 59Using Subforms as Data Helpers 61Summary 62Chapter 4: AJAX Requests 63Getting Data to and from the Server 64HTTP Requests 64Easily Retrieving Information 66Cross-origin Request Handling 68Understanding Browser Request Security 68JSONP Requests 69Cross-Origin Resource Sharing 71Example: User Registration Form 71Error Handling 78Generating Errors 79Detecting Errors 80Retrying in Case of Temporary Errors 81Deferring and Cancelling Requests Using Queues 83Strategies to Defer Requests 84Strategies to Cancel Requests 86Local Storage and Offl ine Apps 87A Short History of Local Storage 87LocalStorage 88IndexedDB 90Comparing Local Storage Options 92Summary 92Chapter 5: Object-Oriented
... mehr
Design 93Classes and Inheritance 94What Does It Mean To Be Object-Oriented? 94Functions Versus Objects to Encapsulate 95Extending Classes 97Making Classes Substitutable 100Using this. in Coff eeScript 101Private and Protected Members 102Mixins and Interfaces 102Summary 103PART II: COFFEESCRIPT PROJECTS 105Chapter 6: Using Javascript Libraries 107Easy Calling Conventions: Don't Th row Away that Existing Code! 108Calling JavaScript from Coff eeScript 108Calling Coff eeScript from JavaScript 110Using CommonJS Modules 111Using Extends on Existing Classes 113Not All Objects Are Created Equal 113Writing Javascript Libraries in Coff eeScript 114Providing a Natural Interface 114Documenting Code 115Mixing Javascript--When Absolutely Required 117Summary 119Chapter 7: Testing with Jasmine 121Introducing Jasmine 122Setting Up a Spec Area to Run Jasmine Tests 122Writing Jasmine Tests 123Spying with Jasmine 124Behavior-Driven Development: What Is a Good Test? 126Testing Inside the Browser 127Conventions for Testing the UI 131Driving jQuery 132Fixtures 133Summary 134Chapter 8: Debugging CoffeeScript 135Writing Reliable Software 136Reading and Debugging CoffeeScript and JavaScript 136Using Firebug 139Using AceBug 142Building Source Maps 143Introducing CoffeeScript Redux 144Using CoffeeScript Redux 145Using Source Maps 146Summary 150Chapter 9: Building Resources with cake and hem 151Tasks and the Cakefile 152Starting with cake 152Thinking about Project Directory Layout 153Tests from cake 154Compile Source into Single Files for Production Deployment 155hem for Further Minification 156Using Standardized Locations 157Summary 158PART III: COFFEESCRIPT APPLICATION DEVELOPMENT 159Chapter 10: Writing Applications with Spine 161Introducing Spine 162Creating a New Spine Application 163Building the Application 169Preparing the Ground 170Removing jQueryify 171Styling an Application with Stylus 172Working with Stylus 172Taking a Deeper Look at Stylus Features 174Spine's Default Styls 177Starting with Controllers 180Testing Controllers 181Controlling the Page 182Adding Controllers 185Stacking Controllers 186Viewing the Results 188Using (j)Eco Templates 188Data Binding 190Modelling Client-Side Data 193Creating a Spine Model 193Working with Models 195Triggering Model Events 196Validating Models 198Editing Model Data 199Storing Data on the Server 202Summary 204Chapter 11: Writing jQuery Plug-ins 205Anatomy of a jQuery Plug-in 206Creating a Skeleton Plug-in 206Writing a Classful Plug-in 209Handling Events and Behavior 211Attaching the Plug-in to jQuery 213Inheriting from an Existing Plug-in 214jQuery UI 215Using Widgets Instead of Plug-ins 215Writing a Tagging Component 218Bridging the Divide 222Summary 225Chapter 12: Mobile Coff eeScript Applications 227Understanding Mobile First Principles 228jQuery and Mobile Applications 229Spine.mobile 230Creating an e-Commerce Shop 234Providing a Product Listing 238Bringing in jQuery Mobile 243Jumping and History 250Summary 254PART IV: ADVANCED COFFEESCRIPT 255Chapter 13: Data Bindings and Form Elements 257One-Way Bindings onto Form Views 258A Simple Binding Interface 258Setting Form Data 260Two-Way Bindings 261The Infamous "Getter Setter" Pattern 262Implicit Getter/Setter 264Observing Changes 265Dynamic Form Building 268Form as Model, View, and Controller 270Summary 270Chapter 14: Server-Side CoffeeScript 271Putting Coff ee in the Server 272Node.js and Coff eeScript 272Writing a Simple Server 273Using MongoDB 273Architecting with MVC 274Introducing Express.js 275Responding to Client Requests 279Rendering Views 280Controlling Responses 281Securing the Application 287Summary 290Chapter 15: Real-Time Web with socket.io 291Defi ning Real-Time Applications 292Polling the Server for Data 292Comet for Lightweight Polling 293Server-Side Events and Web Sockets 293Doing Micro-Blogging in Real Time 294Integrating Static and Real-Time Data 296Rendering on the Client Side 296Reusing Server-Side Code on the Client 298Sharing Templates 298Sharing Models 299Dealing with Callback Pyramids 299Real-Time Collaboration within a Single App 301Operational Transformation 302Separating Input from Operation 302Building a Meeting Whiteboard App 303Modeling Information According to OT 306Serving Simple socket.io Information 307Handling Remote Updates 308Summary 311Index 313
... weniger
Autoren-Porträt von Alex Hudson
Alex Hudson is a technology expert and programmer. A hacker by trade, he likes to keep on top of new technologies. He hacks in C, C#, JavaScript, Perl, PHP, Python, and Vala Primarily, and due to the day job has a keen interest in HTML5, CSS, SQL, and NoSQL.
Bibliographische Angaben
- Autor: Alex Hudson
- Maße: 19 x 23,4 cm, Kartoniert (TB), Englisch
- Verlag: Wiley
- ISBN-10: 1118454375
- ISBN-13: 9781118454374
- Erscheinungsdatum: 12.04.2013
Sprache:
Englisch
Kommentar zu "Hudson, A: Smashing CoffeeScript"
0 Gebrauchte Artikel zu „Hudson, A: Smashing CoffeeScript“
Zustand | Preis | Porto | Zahlung | Verkäufer | Rating |
---|
Schreiben Sie einen Kommentar zu "Hudson, A: Smashing CoffeeScript".
Kommentar verfassen