zoukankan      html  css  js  c++  java
  • Writing Better Javascript

       some of the techniques I use to make my code easier for other   programmers and projects to use.

      dumping useful functions into the utils.js file throughout this book.

       The problem with just dumping functions into a file in this way is that they become hard to manage  and maintain and, as I’ll explain shortly, difficult for others to integrate into their projects.    不利于别人使用,,,,

        I revisit my kitchen-sink file when I have reached a point in a project where the basic
    functionality is stable and I have a good feel for the way that different features fit together. At this point,
    and not before, I start to rework the code into modules so that it plays nicely with other libraries.

       再看代码,如果基本功能很稳定,并且把不同情况汇合到一起。再找代码重构,和别的库融合

      Once I have tidied up and modularized the code, I begin unit testing    当在模块化代码的时候,开始单元测试

    Testing is a very personal
    thing, and many testing proselytizers will insist that testing must begin as soon as you start coding

      测试是一个非常个人的事,

    Test when it feels right, test until you are happy with your code, and use the
    techniques and tools that work for you        测试感觉正确,喜欢自己的代码,并使用一些一具和技术

    Managing the Global Namespace

  • 相关阅读:
    PL/SQL 自动补全[转]
    关闭开发环境的开发者模式
    删除带外键的表【foreign key constraint fails】报错
    CSSS选择器总结
    XSS漏洞初窥(通过dvwa平台进测试)
    Oracle 闪回 找回数据
    Oracle 函数 Function
    Oracle 存储过程 PROCEDURE
    Oracle 备份与恢复
    Web应用程序架构的比较
  • 原文地址:https://www.cnblogs.com/yushunwu/p/2598585.html
Copyright © 2011-2022 走看看