JavaScript Patterns: Build Better Applications with Coding and Design Patterns 1st Edition by Stoyan Stefanov (PDF)

6

 

Ebook Info

  • Published: 2010
  • Number of pages: 363 pages
  • Format: PDF
  • File Size: 3.56 MB
  • Authors: Stoyan Stefanov

Description

What’s the best approach for developing an application with JavaScript? This book helps you answer that question with numerous JavaScript coding patterns and best practices. If you’re an experienced developer looking to solve problems related to objects, functions, inheritance, and other language-specific categories, the abstractions and code templates in this guide are ideal—whether you’re using JavaScript to write a client-side, server-side, or desktop application.Written by JavaScript expert Stoyan Stefanov—Senior Yahoo! Technical and architect of YSlow 2.0, the web page performance optimization tool—JavaScript Patterns includes practical advice for implementing each pattern discussed, along with several hands-on examples. You’ll also learn about anti-patterns: common programming approaches that cause more problems than they solve.Explore useful habits for writing high-quality JavaScript code, such as avoiding globals, using single var declarations, and moreLearn why literal notation patterns are simpler alternatives to constructor functionsDiscover different ways to define a function in JavaScriptCreate objects that go beyond the basic patterns of using object literals and constructor functionsLearn the options available for code reuse and inheritance in JavaScriptStudy sample JavaScript approaches to common design patterns such as Singleton, Factory, Decorator, and moreExamine patterns that apply specifically to the client-side browser environment

User’s Reviews

Reviews from Amazon users which were colected at the time this book was published on the website:

⭐I own the kindle and paperback versions of this book. An exceptional book!This is a must have if you are serious about javascript programming. It is NOT a beginner’s book and it doesnt waste whole chapters on a beginning javascript tutorial. To read this book, you should already know something about using prototypes and closures in js.The first part of the book covers basic elements of the language such as types and declarations, for loops etc but this is a more advanced treatment. I learned something in every one of these sections. For example I had never really understood variable hoisting before.After that the book seems to cover all the topics in Crockford’s Javascript The Good parts, but with more explanation. His writing is clear and straightforward. Many software authors really dont know how to write clear English and give rambling, confusing explanations. On the other end of the scale, I found Crockford’s book a bit cryptic at times. Why would you do inheritance this way?? Stefanov explains. You don’t really need Crockford’s book if you have this one. But JS The Good Parts is a classic.The code examples are short and succint. This is not a cook book, nor a book with apps stretching over pages. In one chapter he does cover a complete app in some detail. But for the most part the code is short easily readable snippets well chosen to make his point. But this is not a code snippet resource. The examples he does give are written for clarity and are not optimized. Nor are they cluttered with code for dealing with special cases. You can find more sophisticated implementations of all these ideas on the web. The goal is to get the core idea.The last part of the book covers such useful things as deployment, remote scripting and loading which are all very useful.OReilly is currently offering a special deal where if you buy the kindle version, you can then buy the printed version for $5 !!. Which means you can get both for less than Amazon’s price for the book alone. In addition, OReilly allows you to download, for free, unrestricted copies of the book in PDF & Mobi format. This deal is a no brainer. Note: OReilly’s price for the ebook is much higher than Amazon’s, but if you buy it from Amazon , you still get all these extras.Cons: Doesn’t cover ECMA 5 which is just coming out and includes some significant features and changes. I can’t fault the author for that and the book is well worth it anyway. Doesn’t discuss memory management which is a significant issue for the current version of JS with circular references causing memory leaks. This problem may go away in the new generation of browsers. Dunno. The book doesnt have a code download site. Even though this is not a cook book, I consider this a serious fault. It’s nice to cut and past examples into a JS console and play with them as you read. Kindle for PC does not allow cut and paste. But in mitigation, The author’s site has the code for the complete apps. I would have knocked off a star for this but in light of OReilly’s generous offer and the fact that I would have rated this book 6 stars, I decided to let it go 🙂

⭐If you’re a JavaScript developer, you would be wise to have this on your bookshelf–nestled nicely between

⭐and

⭐. The three make a nice little troika.And read them in that order: The Good Parts, Patterns, and then High Performance.Here’s why:What Stefanov gives us with this book is effectively an overview [1] of best practices for JavaScript development, going over the benefits and gotchas of certain important language features, and translating those into design and implementation patterns. Many of these patterns are language-agnostic–and you’re likely to recognize them from “The Gang of Four”–but Stefanov puts them in their JavaScript party dresses and takes them out to the ball. Wisely, Stefanov also presents these patterns in an environment/host-independent fashion, so the lessons you learn about encapsulation or inheritance or performance should be equally valid regardless of whether you’re coding for the browser [2] or NodeJS or some image exporting automation for Adobe Illustrator. Stefanov is also a lucid and concise author, clearly illustrating his points about these design patterns; the text is accessible–easy to follow and digest–and he is careful to clearly define words and terms that might be ambiguous or commonly misunderstood (e.g., “function expression” vs. “function declaration” vs. “function literal”).JavaScript patterns makes a great transition guide for intermediate developers–the men and women who have stopped confusing jQuery-the-library with JavaScript-the-language–the folks who are ready to re-evaluate their approach software development with JavaScript. This is for the folks that made it through Crockford’s The Good Parts knowing that they learned something but also feeling less-than-certain about how to apply that something. This is the follow-on; JavaScript Patterns is the application of those lessons. And then after you’ve written your clean, maintainable, scalable applications–then you make the jump to Zakas’ High Performance JavaScript to tune things just a little bit further.So you’re probably wondering then: if you recommend it so highly, why only four stars?The four stars comes mostly from two niggling points:(1) Relative to The Good Parts and High Performance, JavaScript Patterns was not published in the order that I recommend reading them. As a consequence, since I’d read the others (and quite a few others above and beyond those two), there is quite a bit of information in there that I’d seen before. This is not a Bad Thing; sometimes it pays to see information presented again–to help it sink in or else to gain another perspective on it. And in some cases Stefanov offers an as-good-or-better explanation on certain topics/techniques as others writing in the field (e.g., his examples for memoization and currying rival Crockford’s, and his explanation of the pub/sub pattern (and custom event design) is more concise than the one Zakas presents in

⭐). Sometimes (and I’ve written this before) you were just hoping for… just a little bit more.(2) And this is super nit-picky but… The book could have taken another quick editorial pass for spelling and grammar. The one that stuck out at me was right in the intro to Chapter 6: “But it’s important to keep the end goal in mind–we want to reuse cod;.” Indeed.—1 : An in-depth overview, but an overview nonetheless.2 : Stefanov is careful to “keep the browser out of it” and dedicates only one chapter (Chapter 8: DOM and Browser Patterns) to the subject; though everyone’s favorite host environment does creep in a couple of times, in a couple of examples.

⭐The trouble with most programmers have when learning javascript, is that they often have the mindset that JavaScript is not a real programming language and it is only a scripting language.. This problem is exasberated by that fact, that today most programmers interactions with javascript, is often restricted through some kind of Javascript framework, which in my opnion often disguise the elegance and intricacies of the language itself.I feel this book, does a great job, in only 205 pages, of introducing you to, the complexities that these frameworks are shielding you from.I bought this book, along with “Javascript the definitive guide” & “Javascript: The Good parts” and honestly think that this is a trilogy that all programmers should read. I managed to read all 3 books cover to cover, and that is saying something!

⭐Excellent book. Really interesting!I would love to say that I understood every word, but I’m not quite there yet: it does delve into some quite complex topics. (This is not a beginners’ book and does require careful study.)Everything is explained very clearly. But given the complexity of some topics I think certain chapters or sections could be expanded upon a little. But perhaps this is just me making excuses he, he.O’Reilly books, as always, have excellent print and production quality.

⭐I really found this book very helpful as someone who has used js for years and sometimes come up against some strange ways that developers do things. Sometimes they seem like good devs but get this part of the trade wrong. This book helps you confirm what is good and what is often trying to be too clever and the devs writing unreadable code. This busts them big time. I am yet to fully complete the book but already rate it well.

⭐This book is not for newbies. It successfully translates the most popular programming patterns to JavaScript. Very wide knowledge, I call it the “new age JavaScript” (“new age” in a good sense ;). If you’re fairly new to the subject, I’d point you first to my favourite JavaScript book of the same author – “Object-Oriented JavaScript”.

⭐Brilliant book. Opens the mind to the power of JavaScript. Prior JavaScript knowledge definitely required in my opinion. Very pleased with the book.

Keywords

Free Download JavaScript Patterns: Build Better Applications with Coding and Design Patterns 1st Edition in PDF format
JavaScript Patterns: Build Better Applications with Coding and Design Patterns 1st Edition PDF Free Download
Download JavaScript Patterns: Build Better Applications with Coding and Design Patterns 1st Edition 2010 PDF Free
JavaScript Patterns: Build Better Applications with Coding and Design Patterns 1st Edition 2010 PDF Free Download
Download JavaScript Patterns: Build Better Applications with Coding and Design Patterns 1st Edition PDF
Free Download Ebook JavaScript Patterns: Build Better Applications with Coding and Design Patterns 1st Edition

Previous articleLearning Python, 5th Edition by Mark Lutz (PDF)
Next articlePython Pocket Reference: Python In Your Pocket (Pocket Reference (O’Reilly)) 5th Edition by Mark Lutz (PDF)