Clean Code in JavaScript

0
(0)

Clean Code in JavaScript
 

  • Author:James Padolsey
  • Length: 548 pages
  • Edition: 1
  • Publisher: Packt Publishing
  • Publication Date: 2020-01-20
  • ISBN-10: 1789957648
  • ISBN-13: 9781789957648
  • Sales Rank: #358779 (See Top 100 Books)
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    Get the most out of JavaScript for building web applications through a series of patterns, techniques, and case studies for clean coding

    Key Features

    • Write maintainable JS code using internal abstraction, well-written tests, and well-documented code
    • Understand the agents of clean coding like SOLID principles, OOP, and functional programming
    • Explore solutions to tackle common JavaScript challenges in building UIs, managing APIs, and writing states

    Book Description

    Building robust apps starts with creating clean code. In this book, you’ll explore techniques for doing this by learning everything from the basics of JavaScript through to the practices of clean code. You’ll write functional, intuitive, and maintainable code while also understanding how your code affects the end user and the wider community.

    The book starts with popular clean-coding principles such as SOLID, and the Law of Demeter (LoD), along with highlighting the enemies of writing clean code such as cargo culting and over-management. You’ll then delve into JavaScript, understanding the more complex aspects of the language. Next, you’ll create meaningful abstractions using design patterns, such as the Class Pattern and the Revealing Module Pattern. You’ll explore real-world challenges such as DOM reconciliation, state management, dependency management, and security, both within browser and server environments. Later, you’ll cover tooling and testing methodologies and the importance of documenting code. Finally, the book will focus on advocacy and good communication for improving code cleanliness within teams or workplaces, along with covering a case study for clean coding.

    By the end of this book, you’ll be well-versed with JavaScript and have learned how to create clean abstractions, test them, and communicate about them via documentation.

    What you will learn

    • Understand the true purpose of code and the problems it solves for your end-users and colleagues
    • Discover the tenets and enemies of clean code considering the effects of cultural and syntactic conventions
    • Use modern JavaScript syntax and design patterns to craft intuitive abstractions
    • Maintain code quality within your team via wise adoption of tooling and advocating best practices
    • Learn the modern ecosystem of JavaScript and its challenges like DOM reconciliation and state management
    • Express the behavior of your code both within tests and via various forms of documentation

    Who this book is for

    This book is for anyone who writes JavaScript, professionally or otherwise. As this book does not relate specifically to any particular framework or environment, no prior experience of any JavaScript web framework is required. Some knowledge of programming is assumed to understand the concepts covered in the book more effectively.

    Table of Contents

    1. Setting the Scene
    2. The Tenets of Clean Code
    3. The Enemies of Clean Code
    4. SOLID and Other Principles
    5. Naming Things is Hard
    6. Primitive and Built-In Types
    7. Dynamic Typing
    8. Operators
    9. Parts of Syntax and Scope
    10. Control Flow
    11. Design Patterns
    12. Real-World Challenges
    13. The Landscape of Testing
    14. Writing Clean Tests
    15. Tools for Cleaner Code
    16. Documenting Your Code
    17. Other Peoples’ Code
    18. Communication & Advocacy
    19. Case Study

    中文:

    书名:Clean Code in JavaScript

    通过一系列干净编码的模式、技术和案例研究,最大限度地利用JavaScript构建Web应用程序

    Key Features

    • 使用内部抽象、编写良好的测试和文档化良好的代码编写可维护的JS代码
    • 了解清洁编码的代理,如可靠原则、面向对象和函数式编程
    • 探索解决方案,以应对构建UI、管理API和编写状态方面的常见JavaScript挑战

    Book Description

    构建健壮的应用程序从创建干净的代码开始。在这本书中,您将通过学习从基本的Java脚本到干净代码的实践来探索实现这一点的技术。您将编写功能强大、直观且可维护的代码,同时了解您的代码如何影响最终用户和更广泛的社区。

    这本书从流行的清洁编码原则开始,如Solid和德米特定律(Lod),并强调了编写清洁代码的敌人,如货物崇拜和过度管理。然后,您将深入研究JavaScript,了解该语言更复杂的方面。接下来,您将使用设计模式(如类模式和揭示模块模式)创建有意义的抽象。您将探索浏览器和服务器环境中的实际挑战,如DOM协调、状态管理、依赖项管理和安全性。稍后,您将介绍工具和测试方法,以及记录代码的重要性。最后,本书将重点介绍提高团队或工作场所内代码清洁度的宣传和良好的沟通,同时还将介绍一个干净编码的案例研究。

    到本书结束时,您将精通Java脚本,并学会如何创建干净的抽象、测试抽象以及通过文档进行交流。

    What you will learn

    • 了解代码的真正目的及其为最终用户和同事解决的问题
    • 考虑到文化和语法惯例的影响,发现干净代码的原则和敌人
    • 使用现代的JavaScript语法和设计模式创建直观的抽象
    • 通过明智地采用工具和倡导最佳实践来维护团队中的代码质量
    • 了解现代的JavaScript生态系统及其面临的挑战,如DOM协调和状态管理
    • 在测试中和通过各种形式的文档表达代码的行为

    这本书是为谁而写的

    这本书适用于任何编写Java脚本的人,无论是专业的还是其他的。由于本书并不特别涉及任何特定的框架或环境,因此不需要具备任何Java Web框架的经验。一些编程知识被认为可以更有效地理解书中涵盖的概念。

    Table of Contents

    1. Setting the Scene
    2. The Tenets of Clean Code
    3. 《清洁代码》的敌人
    4. 坚实的原则和其他原则
    5. 给东西命名很难
    6. Primitive and Built-In Types
    7. Dynamic Typing
    8. Operators
    9. 部分语法和作用域
    10. Control Flow
    11. Design Patterns
    12. 现实世界的挑战
    13. 测试的前景
    14. Writing Clean Tests
    15. 用于清理代码的工具
    16. 记录您的代码
    17. 其他民族代码
    18. 传播与宣传
    19. Case Study
  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

    平均分 0 / 5. 投票数: 0

    还没有投票!请为他投一票。

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册