JavaScript for PHP Developers. A Concise Guide to Mastering JavaScript - Helion
ISBN: 978-14-493-7031-2
stron: 160, Format: ebook
Data wydania: 2013-04-24
Księgarnia: Helion
Cena książki: 50,91 zł (poprzednio: 59,89 zł)
Oszczędzasz: 15% (-8,98 zł)
If you want to significantly expand your web development skills beyond PHP, this practical, hands-on book teaches you ECMAScript—the core JavaScript language—from the ground up. You’ll discover some similarities between JavaScript and PHP, such as conditions and loops, but the primary focus is on JavaScript’s unique object creation, classes, prototypes, and inheritance.
JavaScript knowledge is essential for working with today’s Web, whether you’re building applications for the client, the server, or for mobile use—and your PHP experience gives you a head start. This book will help you become fluent with JavaScript quickly, and then serve as a handy reference once you start coding.
- Explore JavaScript syntax, including variables, arrays, loops, and conditions
- Learn how functions are important in JavaScript—and why they’re actually objects
- Delve into JavaScript’s object-oriented features, including prototypes, code reuse, and inheritance
- Examine the built-in API and explore its global functions, properties, and objects
- Learn about updates in ECMAScript5, the latest version of the standard
- Use common design patterns to organize your code in large applications
Osoby które kupowały "JavaScript for PHP Developers. A Concise Guide to Mastering JavaScript", wybierały także:
- D3.js w akcji 67,42 zł, (20,90 zł -69%)
- Tablice informatyczne. Node.js 16,86 zł, (5,90 zł -65%)
- React i GatsbyJS. Kurs video. Nowoczesne strony internetowe w oparciu o headless CMS i GraphQL 148,98 zł, (59,59 zł -60%)
- TypeScript i React. Kurs video. Tworzenie nowoczesnych komponent 129,00 zł, (51,60 zł -60%)
- Vue.js w praktyce. Kurs video. Poznaj narz 148,98 zł, (59,59 zł -60%)
Spis treści
JavaScript for PHP Developers. A Concise Guide to Mastering JavaScript eBook -- spis treści
- JavaScript for PHP Developers
- Acknowledgments
- Dedication
- Preface
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- 1. Introduction
- Scope of This Book
- The Language
- Learning Environment
- Browsers
- JavaScriptCore
- Node.js and Rhino
- Longer Examples
- Lets Get Started
- 2. JavaScript Syntax
- Variables
- What Does $ Do in JavaScript?
- Values
- typeof Introspection
- null and undefined
- Arrays
- Associative Arrays
- Conditions
- Ternary Operator
- Strict Comparison
- switch
- try-catch
- while and for Loops
- for-in Loops
- Miscellaneous Operators
- in
- String Concatenation
- Type Casting
- void
- Comma Operator
- Variables
- 3. Functions
- Default Parameters
- Any Number of Arguments
- arguments.length Trick
- Return Values
- Functions Are Objects
- A Different Syntax
- Scope
- Hoisting
- Hoisting Functions
- Closures
- Closures in PHP
- Scope Chain
- The Scope Chain in the WebKit Console
- Retaining the Scope
- Retaining References, Not Values
- Closures in a Loop
- Exercise: onclick Loop
- Immediate Functions
- Initialization
- Privacy
- Passing and Returning Functions
- Callbacks Are Not Strings
- 4. Object-Oriented Programming
- Constructors and Classes
- Returning Objects
- Enforcing Constructors
- Prototypes
- Object Literals
- Accessing Properties
- Confusing Dots
- Methods in Object Literals
- Fancy Arrays
- Own Properties
- __proto__
- this or prototype
- Inheritance
- Inheritance via the Prototype
- Inheritance via Copying Properties
- Beget Object
- Classical extend()
- Borrowing Methods
- Conclusion
- Constructors and Classes
- 5. The Built-In API
- The Global Object
- Global Properties
- Global Functions
- Numbers
- Encoding URLs
- Built-In Constructors
- Object
- toString()
- toLocaleString()
- valueOf()
- hasOwnProperty()
- propertyIsEnumerable()
- isPrototypeOf()
- constructor
- Array
- length
- push()
- pop()
- unshift()
- shift()
- concat()
- sort()
- slice()
- splice()
- reverse()
- join()
- RegExp
- test() and properties
- exec()
- Function
- Function properties
- String
- substring()
- localeCompare()
- split()
- search()
- replace()
- match()
- Number
- Boolean
- Math
- Error
- Date
- Object
- Constructors Review
- 6. ECMAScript 5
- Strict Mode
- Property Attributes
- New Object APIs
- Object.create()
- Object.getOwnPropertyDescriptor()
- Object.defineProperty() and Object.defineProperties()
- Restricting Object Mutations
- Looping Alternatives
- Object.getPrototypeOf()
- Array Additions
- Array.isArray()
- indexOf() and lastIndexOf()
- Walking the Array Elements
- Filtering
- Testing the Array Content
- Map/Reduce
- String Trimming
- New in Date
- Function.prototype.bind()
- JSON
- Shims
- 7. JavaScript Patterns
- Private Properties
- Private Methods
- Exposing Private Objects
- Returning Private Arrays
- Deep Copy via JSON
- Revealing Pattern
- Constants
- Namespaces
- Modules
- CommonJS Modules
- Defining a CommonJS Module
- Using a CommonJS Module
- Using an Agnostic Module
- AMD
- Design Patterns
- Singleton
- Singletons with constructors
- Factory
- Decorator
- Decoration API
- Adding decorators
- decorate() and get()
- Singleton
- Documentation and Testing
- Manual
- Documenting Your Code
- Unit Testing
- JSLint
- Linting This Book
- Private Properties
- Index
- About the Author
- Colophon
- Copyright