提取通用行为并把它们包含在泛型DAO 中,让类的所有用户通过泛型 DAO访问这些功能,这样就可以减少代码重复。
You can reduce code duplication by abstracting the common behavior and including it in the generic DAO, where all users of the class will have access to the functionality.
过滤器扩展功能将帮助提供更完整的输入评估,同时减少重复代码编写工作。
The filter extension helps provide more complete assessment of input while reducing repetitive code writing efforts.
以能够减少重复、更具组织性、更易于读取和维护的方式维护您的代码结构。
Maintaining your code structure in such a way that reduces repetition, is better organized, and is easier to read and maintain.
但您也会发现:重复少了、功能强大了并且在减少代码行的同时有了更大的灵活性。
But you also find less repetition, more power, and more flexibility with fewer lines of code.
通过去除应用中的重复代码,减少编写数据库控制逻辑的工作,这种方案降低了总的编程量。
This reduces the total programming effort by removing duplicated code in the application and by reducing the amount of effort spent in writing database control logic.
常用于减少代码行数和重复表达的串联字符串对于开发人员来说可能比较方便,但是有时候会导致全球化阶段需要付出更多的努力。
Concatenation strings, usually used to reduce the code lines and duplicated expressions, can be convenient for developers, but sometimes they can require more effort in the globalization phase.
这不但减少了您编写的代码量,而且也减少了重复的剪切、粘贴代码(错误的罪魁祸首),并且在阅读代码时思路更加清晰。
This not only reduces the amount of code you have to type, but also eliminates repetitive cut-and-paste code (a major source of errors), and makes your intentions clear when you read the code later.
泛型dao模式(也称为类型安全的DAO)对于减少数据访问层中的代码重复非常重要。
The generic DAO pattern (also called Typesafe DAO) is critical to reducing code duplication in the data access tier.
有时候,使用这种语句比嵌套的for循环或if语句更好,可以减少重复的代码而且结构更清楚。
Using such a statement can sometimes be a better route than nested for loops or if statements to cut down on repetitive code or just for better structure.
具备诸如ducktyping这类特性的编程语言,通过使用更少的类型定义、减少纯粹为了支持编译器所需要的代码数,能够提高灵活性和减少重复。
Programming languages with features like duck typing can improve flexibility and reduce repetition by forcing fewer type definitions and reducing code needed purely to support a compiler.
减少数据访问层中的代码重复。
它的确通过减少重复代码和使得代码更经得起变化给我们带来了巨大的好处,最终一门完备 的语言不应该需要这样的第三方库。
While it does give us great savings by reducing repetitive code and making code more tolerable to change, ultimately a complete language should not require this of us.
通过创建可重用的宏,可以避免重复输入相同的代码段;这不但可以避免重复,而且可以减少代码量,从而提高代码的可读性。
Instead of typing the same piece of code again and again, you can create reusable macros that both avoid this repetition and enhance the look and readability of the code by reducing clutter.
这种框架可以重复使用视图组件并减少应用程序的视图页面中重复的HTML和JS p源代码。
This framework lets you reuse view components and reduces duplication of HTML and JSP source in the application's view pages.
这样做可以重用经过测试的可靠的代码,避免重复编写脚本代码并减少错误。
Doing so reuses tested and proven code and will save you from repeating script code and making potential errors.
本文的代码示例(在下载中可以获得完整的代码包)演示如何使用这些接口帮助执行审计和减少数据访问对象(DAO)中的代码重复。
This article's code examples (see Download to obtain the full package) show how to use these interfaces to facilitate auditing and reduce code duplication in data access objects (DAOs).
添加ViewComponentParam属性,它可以告知MonoRail把参数作为属性绑定到你的视图组件上——减少了重复的代码规则。
Added ViewComponentParam attribute which tells MonoRail to bind the arguments as properties on your view component - reducing repetitive code rules.
Grails利用“约定优于配置(conventionover configuration)”和“不要重复自己(don ' t repeat yourself)”的原则,极大地减少了编写典型Web应用程序所需的代码量。
Grails leverages the principles of convention over configuration and don't repeat yourself to greatly reduce the amount of code you need to write for a typical Web application.
样板代码可以减少重复劳动,同时隐式功能会带来负面影响,所以应该只在好处远远大于危险时使用样板代码。
Only use boilerplate macros when the savings in repetitiveness clearly outweigh the negatives of implicit functionality.
使用企业bean除去了重复的应用程序代码需要,也减少了在编写数据库控制逻辑上所做的工作。
Using enterprise beans removes the need for duplicated application code and reduces the effort spent writing database control logic.
在软件开发过程中,采用代码生成技术可以显著减少开发者的重复性工作量。
During the development of software, using the technique of code generation can considerably reduce the workload of repetitive code.
对于大多数编程语言,你都可以调用函数来执行一段代码,这样可以使用减少重复的书写代码。
As in almost any programming language, you can use functions to group pieces of code in a more logical way or practice the divine art of recursion.
通过动态的生成方法可以减少大量的代码重复。这一节讲述如何创建一个rails插件来实现。
You can sometimes remove a lot of duplication by generating methods dynamic. In this episode I will show you how to create a plugin which does exactly that.
通过动态的生成方法可以减少大量的代码重复。这一节讲述如何创建一个rails插件来实现。
You can sometimes remove a lot of duplication by generating methods dynamic. In this episode I will show you how to create a plugin which does exactly that.
应用推荐