Potential disadvantages of using DAO include leaky abstraction, code duplication, and abstraction inversion.
代码重复:相同或者相似的代码存在于一个以上的地方。
Duplicated code: identical or very similar code exists in more than one location.
如何为非常复杂的Web应用程序构建最佳的控制器结构,以便在避免代码重复的同时实现重用性和灵活性??
How do you best structure the controller for moderate/ complex Web applications so that you can achieve reuse andflexibility while avoiding code duplication?
首先,我们将回顾一下提取函数以减少代码重复的机制。
First, we will review how to extract a function to reduce code duplication.
这个例子清楚地演示了函数的主要目的之一是:避免代码重复。
This example clearly demonstrates one of the main purposes of functions:to avoid code duplication.
这个例子清楚地演示了函数的主要目的之一:避免代码重复。
This example clearly demonstrates one of the main purposes of functions:to avoid code duplication.
When const andnon-const member functions have essentially identical implementations, code duplication can be avoided by having the non-const version call the const version.
When const and non-const member functions havevery similar implementations you can avoid code duplication by having the non-cont version call the const version.
例如,可能希望从几个不同的类继承方法,以防止代码重复。
For example, it might be desirable to inherit methods from a couple of different classes in order toprevent code duplication.
中文
Bahasa indonesia
日本語
عربى
Български
বাংলা
Český
Dansk
Deutsch
Ελληνικά
Español
Suomi
Français
עִברִית
हिंदी
Hrvatski
Magyar
Italiano
Қазақ
한국어
മലയാളം
मराठी
Bahasa malay
Nederlands
Norsk
Polski
Português
Română
Русский
Slovenský
Slovenski
Српски
Svenska
தமிழ்
తెలుగు
ไทย
Tagalog
Turkce
Українська
اردو
Tiếng việt