如何找出代码库中隐藏的复制?
How do you find the duplications that have crept into your code base?
如何实现可以进行重大重构的代码库?
How do you get your code base in a place where major refactorings are possible?
对于一个代码库来说,存在相似的问题。
我将讨论如何发现代码库中隐藏的设计。
In it, I'll discuss how to discover design already lurking in your code base.
这部分代码很快就会出现在代码库中。
熟悉你经常使用的代码库。
NDepend可以比较代码库的两个版本。
代码库的可维护性直接影响着软件的整个成本。
The maintainability of a code base directly affects the overall cost of software.
限制通常来自于现有的代码库或来自于客户需求。
The limitations often come from the existing code base or from customer requirements.
但是缺点是它仍是一个大代码库,不是真正的模块。
But the downside is that it's still one big codebase, not really modular.
首先,需要下载NDepend,然后分析你的代码库。
增加过多灵活性将使对代码库的每一次更改都变得更加复杂。
Adding too much flexibility makes every change to the code base more complex.
解决方案:对源代码库上应用的每个修改都运行构建。
Solution: A build is run with every change applied to a source code repository.
这不错,因为我们的作业可以引用代码库中的任何其他代码。
This was kind of cool, in that our jobs could reference any other code in our code base.
我们可以向代码库进行提交和推送,就和其他Git系统一样。
We can commit and push to our repository, much like any other Git system.
对任何项目来说,值得称赞的一点就是拥有可以轻松进行重构的代码库。
A laudable goal for any project is a code base that is easy to refactor.
我们在代码库中采用一种@public、@semipublic和@private的标准规范。
We have adopted a standard in the code base of @public, @semipublic and @private specs.
同样,转化代码对库的依赖性是个潜在的问题。
Also, the translated code's dependence on a library is also a potential issue.
将您自己的代码加入开源库。
可以重构库代码创建更好的连接点模型。
Base code is refactored to create a better join point model.
通过参考资源中的链接可以找到完整的库代码。
The full library code is available from the link in Resources.
下面这段代码使用JSTLsql库。
这个库的代码如清单1所示。
这个新库的代码如清单7所示。
库的代码很基本,在下一个清单中显示。
The code for the library is pretty basic and is shown in the next listing.
最后,你需要加载原生代码最终编译到的库。
Finally, you need to load the library that the native code will ultimately compile to.
Freeform非常适合应用程序的初始原型化或库代码的开发。
Free form is ideal for initial prototyping of applications or development of library code.
这个图形库的新代码如清单3所示。
The new code for the graphics library is shown in Listing 3.
通用库和其他通用代码。
为了通过PHP运行此代码,需要一个图形库。
To run this code through PHP, you need the graphics library.
应用推荐