YourProgramIn, there is a function that communicates with another class other than the resident class: Call the latter, or be called by the latter.Create a new function with similar behavior in the class most commonly referenced by this function.
You have some sub-classes, some of which execute similar operations in the same order, but the details of each operation are different. Put these operations into independent functions, and keep them all with the same signature, so the original
First: be familiar with the business.
Only when you are familiar with the business can you better grasp it.Code. Understand the code process
Second: Solution
The total project is actually a solution, so a largeProgramIt is possible that you are
A function is more interested in a class than in its own class. The common focus is data. A function calls almost half a dozen value functions from another object to calculate a value. In this case, an applicationMove Method(Shift function)Move it
A function is no longer required for the function ontology.Remove this parameter.
Motivation:ProgramMembers may check the added parameters but are often reluctant to remove them. Their wishful thinking is: in any case, redundant parameters will
You have a complex conditional statement.Separate independent functions from the IF, then, and else sections..
Motivation:ProgramComplex conditional logic is one of the most frequent locations that lead to increased complexity. You must
The parallel inheritance system is actually a casual modification (Shotgun surgery. In this case, whenever you add1Subclass, which must also be added to another class1Sub-classes. If you find that the class name prefix of an inheritance system is
The Inline template feature in razor is not widely discussed, but it provides the ability to use inline templates as method parameters. Currently, only grid helper on the Asp.net page uses the inline template, and there are not many documents on how
Generally, when an object has multiple set-type child elements, we will create a collection object for each child element to carry the child elements, similar:
Public Class Process{ Public VaR isexecutable: Boolean; Public VaR
SilverlightResources in
1. Use resource files in the same component
1,XAMLFile and resource file directory are at the same level
UseImageExample
ImagesFolder andMainpage. XAMLThe file is in the same-level directory.
1. Upload distinguishes between historical and real-time data by data type. The real-time data is1400, The historical data iscolor:blue">1410
2. Time Synchronization data packets:Time Synchronization request
3. Debugging data:
Real-Time
In weblogic9.1And9.2Use its own database driver connection in versionDb2v9.5When the process Parsing is released, an error is reported:
Tested, it should beWebLogicDriver version issues.
The solution is as follows:
1. SetDB2Install the
Each branch of a conditional expression has the same segment.Code.Move the duplicate code out of the conditional expression.
Motivation: all branches of a set of conditional expressions execute the same code segment. You should move this code out
A class does not do much.Move all features of this class to another class, and then remove the original class..
Motivation: The Inline class is the opposite of the extract class. If a class no longer bears sufficient responsibilities and has
The httpapplication object is passed through httpapplicationfactory. getapplicationinstance (and finally call httpruntime. httpapplicationfactory created by createnonpublicinstance. Its main task is to use URL Information to find the matching
1. Initial screen usage
A feature set that can be used to construct a Silverlight initial screen is designed to handle, but not limited to, the following situations:
Show download progress
Displays animations even if you do not need to
YourProgramA field is used by another class other than its resident class.Create a new field in the target class, modify all users of the Source Field, and change them to a new field.
Motivation: Moving status and behavior between classes is
You have some domain data in Gui controls, and domain functions need to access the data.Copy the data to a domain object. Create an observer mode to synchronize repeated data in the domain object and GUI object.
Motivation: a well-layered
I recently bought several sql2005 books. I can see some of the classic problems in the books, so that I can easily find them later.This book is ProgramDesign> America: translated by Robert Vieira and Dong Ming. A very basic book.
Differences
You can create shortcuts for folders, files, and URLs. You can also create shortcuts for settings in the control panel. The following is a shortcut command. Usage: Right-click the blank area of the desktop or folder, select "new" and "shortcut",
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service