马丁:嗯,在讨论何时应用重构时,我的确是这样谈论美学的。
Martin Fowler: I wrote that about aesthetics in discussing when you apply refactorings.
应用重构相空间理论对安全事故次数的时间序列进行了分析和预测。
Also, by using the reconstruction phase space theory, the time sequence of accidents was analyzed and predicted.
每个操作都包含日期和时间,以便您可以确保按正确顺序应用重构操作。
Each operation includes a date and time so that you can make sure that refactoring operations are applied in the correct order.
在此基础之上,它可以以数学的方式建立起来,以使得重复应用重构算法可以最终得到一个稳定的图案。
On this basis, it can be mathematically established that repeated application of the reconstruction algorithm will eventually result in a stable pattern.
重构脚本可以让您轻松地进行应用程序的升级,而不必担心客户需要花上几小时的时间去遍览文档以找出代码被破坏的原因。
Refactoring scripts allow you to easily upgrade your applications without worrying about clients having to spend hours looking through documentation to figure out what broke their code.
清单2显示了经过重构翻新以支持本地化后的RSS应用程序。
Listing 2 shows how the RSS application looks after refactoring and retrofitting it to support localization.
因此,组件化还包括对应用程序进行重构,以从应用程序中删除资源管理功能,并将其替换为容器提供的等效功能。
Thus, componentization also includes refactoring the application to remove the resource management functions from the application and replace them with equivalent functions provided by the container.
当你看到重构或创建可重用资产的机会时,不要把这些工作跟应用代码的剩余部分掺杂在一起。
When you see opportunities to refactor or create reusable assets, do separate them from the rest of your application code.
正确使用数据建模工具有助于避免在后续阶段重构应用程序。
Proper usage of data modeling tools helps to avoid re-factoring of the application at later stages.
假设在编写应用程序时这些数据在内存中可用,那么将要执行较大的重构。
If the whole application is written assuming this data will be available in memory, a major refactor is in order.
重构——修改或扩展现有应用程序,以提供更适合将其作为服务使用的新接口。
Refacing — The existing application is modified or extended to provide a new interface more suited to its use as a service.
如果包装模式的操作成本较高,IT 将对使用频繁的应用程序进行重构或组件化来提高性能。
If wrapping incurs higher operational costs, the IT organization refaces or componentizes heavily used applications to improve performance.
当支持通过HTTP GET执行更新操作时,也需要应用类似的Web方法重构,如清单4所示。
A similar refactoring of a Web method also needs to be applied in cases where an update operation is supported over HTTP GET, as shown in Listing 4.
单击Next以查看脚本将要执行的那些重构,然后单击Finish来应用这些重构。
Click Next to see the refactorings that this script will perform, then click Finish to apply the refactorings.
InfoQ:从开发者的测试、调试、重构、应用调优等方面来讲,工具对使用Grails框架开发应用的支持如何?
InfoQ: What is the tool support for application development using Grails framework in terms of developer testing, debugging, refactoring, application profiling etc.
重构的解决方案:应用模型-视图-控制器。
将抽取方法重构应用于这个创建代码,创建工厂方法(在Fowler书籍的第110页中讨论;有关更多信息,请参阅参考资料一节)。
Apply the Extract method refactoring to this creation code, creating the factory method (discussed on page 110 of Fowler's book; see the Resources section for more information).
这就让您可以存储并随后从内存存储恢复全部对象,而不是在您的应用程序内手动重构它们。
This enables you to store and later recover entire objects from the memory cache, instead of reconstructing them by hand within your application.
我们利用重构技术、设计模式和其他计算方法从我们的应用程序中去掉发臭的代码片段。
We use refactoring techniques, design patterns, and other computational methods to remove the smelly code segments from our applications.
先读取技巧涉及重构(或编写)应用程序逻辑和工作流,以便所有的处理和读取操作在事务作用域的外部首先发生。
The read-first technique involves refactoring (or writing) the application logic and workflow so that all processing and read operations occur first, outside of a transaction's scope.
组件化是重构的扩展,因为它在应用程序内引入了SOA接口,而重构仅应用于外部接口。
Componentization is an extension of refacing because it introduces SOA interfaces inside an application, whereas refacing applies only to exterior interfaces.
例如,解决方案架构可以经由应用敏捷方法,通过重构、小步增量设计,以及主要以代码形式表达。
Solution architecture for instance, can be applied in an agile manner, through refactoring, designed in small increments and expressed mainly in code.
由于使用字符串表示属性,因此应用程序在重构期间很可能变得更脆弱。
Applications also may be more brittle during refactoring due to the use of strings to signify properties.
在某些情况下,您可能需要重构应用程序逻辑,以支持这种事务策略。
In some cases, you may need to refactor your application logic to support this transaction strategy.
在示例应用程序中,您获取了一个笨拙的样式表并将其重构为一段更小更易于维护的代码。
In the sample application, you took an unwieldy stylesheet and refactored it into a much smaller and more maintainable piece of code.
开发者可以把这些信息用于进一步的代码重构以提高应用程序的性能。
Developers can use this information for further code refactoring to improve the application's performance.
在使用这种技术时,会收集关于给定工作负载的数据(比如剖析),然后以优化此工作负载的方式使用这些数据重构应用程序二进制代码。
When using this technique, data is collected for a given workload, such as a profile that is then used to rebuild the application binary in such a way to optimize the workload.
在第3部分中,您将重构本文所建立的摇滚巨星应用程序。
In part 3, you'll refactor the rock star application built in this part.
如果有可能需要对应用程序进行重构,以适应更大的用户群,那么这种努力会有更大的回报。
When you add in the possibility of needing to rework the application for a larger (plural!) audience, it pays off even more.
该技巧面临的挑战在于一个开发团队的开发人员的应用方法不一致,并且很容易错失重构的机会。
The challenges of this technique are that it's often inconsistently applied among developers on a team, and that it can be easy to miss opportunities for refactoring.
应用推荐