掌握面向对象的JavaScript第三版:2017年最新教程

需积分: 15 15 下载量 21 浏览量 更新于2024-07-20 收藏 5.1MB PDF 举报
《Packt - 对象导向JavaScript第3版(2017年1月)》是一本由Ved Antani和Stoyan Stefanov合著的专业指南,全面介绍了面向对象编程在JavaScript中的应用。本书旨在帮助读者掌握最新开发技术,深入理解并实践对象导向JavaScript。该版本是第三版,版权归属于Packt Publishing,所有内容未经出版商书面许可不得复制、存储或传输。 书中内容覆盖了面向对象编程的基础概念,如类、对象、封装、继承和多态等核心特性,适合希望提升JavaScript编程技能,特别是对面向对象设计感兴趣的开发者。作者们通过实例和实战项目,展示了如何在JavaScript中构建可维护、可扩展和模块化的代码结构。 学习本书,读者将学会如何: 1. 设计和实现有效对象模型:理解如何创建类和构造函数,以及如何利用原型链进行继承。 2. 实现数据封装:保护数据安全,避免直接访问内部状态,确保代码的健壮性。 3. 使用构造函数和原型方法:了解如何定义和调用构造函数,以及如何创建共享行为和属性。 4. 面向对象设计模式:探索JavaScript中的常见设计模式,如工厂模式、单例模式和策略模式等,以提高代码的灵活性和可重用性。 5. 使用模块化和ES6的类语法:理解模块系统如何组织代码,并了解ES6中的类和类方法,与传统的面向对象编程进行对比。 尽管本书努力确保信息准确,但出版商和作者不承担因本书内容导致的任何直接或间接损失的责任。此外,Packt Publishing在提及商标时已尽最大努力提供恰当的标注,但可能存在遗漏或不完整之处。 阅读《Packt - 对象导向JavaScript第3版》,读者可以提升JavaScript编程技能,适应现代软件开发的需求,成为高级JavaScript开发者,特别是在面向对象领域具有深厚理解的专家。
2017-03-29 上传
Build sophisticated web applications by mastering the art of Object-Oriented Javascript About This Book Learn popular Object-Oriented programming (OOP) principles and design patterns to build robust apps Implement Object-Oriented concepts in a wide range of frontend architectures Capture objects from real-world elements and create object-oriented code that represents them Learn the latest ES6 features and how to test and debug issues with JavaScript code using various modern mechanisms Who This Book Is For JavaScript developers looking to enhance their web developments skills by learning object-oriented programming. What You Will Learn Get acquainted with the basics of JavaScript language constructs along with object-oriented programming and its application. Learn to build scalable server application in JavaScript using Node.js Generate instances in three programming languages: Python, JavaScript, and C# Work with a combination of access modifiers, prefixes, properties, fields, attributes, and local variables to encapsulate and hide data Master DOM manipulation, cross-browser strategies, and ES6 Identify and apply the most common design patterns such as Singleton, Factory, Observer, Model-View-Controller, and Mediator Patterns Design applications using a modular architecture based on SOLID principles In Detail JavaScript is the behavior, the third pillar in today's paradigm that looks at web pages as something that consists of : content (HTML), presentation (CSS), and behavior (JavaScript). Using JavaScript, you can create interactive web pages along with desktop widgets, browser, and application extensions, and other pieces of software. Object-oriented programming, which is popularly known as OOP, is basically based on the concept of objects rather than actions. The first module will help you master JavaScript and build futuristic web applications. You will start by getting acquainted with the language constructs and how to organize code easily. You develop concrete understanding of variable scoping, loops, and best practices on using types and data structures, as well as the coding style and recommended code organization patterns in JavaScript. The book will also teach you how to use arrays and objects as data structures. By the end of the book, you will understand how reactive JavaScript is going to be the new paradigm. The second module is an easy-to-follow course, which includes hands-on examples of solutions to common problems with object-oriented code. It will help to identify objects from real-life scenarios, to protect and hide data with the data encapsulation features of Python, JavaScript, and C#. You will discover the advantage of duck typing in both Python and JavaScript, while you work with interfaces and generics in C#. With a fair understanding of interfaces, multiple inheritance, and composition, you will move on to refactor existing code and to organize your source for easy maintenance and extension. The third module takes you through all the in-depth and exciting futures hidden behind the facade. You should read through this course if you want to be able to take your JavaScript skills to a new level of sophistication. Style and approach This course is a comprehensive guide where each chapter consists of best practices, constructive advice, and few easy-to-follow examples that will build up your skills as you advance through the book. Get object oriented with this course, which takes you on a journey to get acquainted with few useful hands-on tools, features, and ways to enhance your productivity using OOP techniques. It will also act as a reference guide with useful examples on resolving problems with object-oriented code in Python, JavaScript, and C#. Table of Contents Chapter 1: Javascript Primer Chapter 2: Functions, Closures, And Modules Chapter 3: Data Structures And Manipulation Chapter 4: Object-Oriented Javascript Chapter 5: Javascript Patterns Chapter 6: Testing And Debugging Chapter 7: Ecmascript 6 Chapter 8: Dom Manipulation And Events Chapter 9: Server-Side Javascript Chapter 10: Objects Everywhere Chapter 11: Classes And Instances Chapter 12: Encapsulation Of Data Chapter 13: Inheritance And Specialization Chapter 14: Interfaces, Multiple Inheritance, And Composition Chapter 15: Duck Typing And Generics Chapter 16: Organization Of Object-Oriented Code Chapter 17: Taking Full Advantage Of Object-Oriented Programming Chapter 18: Object-Oriented Javascript Chapter 19: Primitive Data Types, Arrays, Loops, And Conditions Chapter 20: Functions Chapter 21: Objects Chapter 22: Prototype Chapter 23: Inheritance Chapter 24: The Browser Environment Chapter 25: Coding And Design Patterns Chapter 26: Reserved Words Chapter 27: Built-In Functions Chapter 28: Built-In Objects Chapter 29: Regular Expressions