"Pragmatic Programmer" book review (e)

  Discussion "bend or break" of - for the fifth chapter.

  Life we ​​often face a number of difficulties, had to make some changes. Write the code too, to maintain the flexibility of the code, in order to ensure that in responding to various contingencies, there are other remedies, I think this is the ability of a qualified programmer included.

  And in general we write some kind of a goal, they often will have a certain relationship to each other. This relationship is like a plug between two iron rods connected to each other so that this rigid connection does play a significant role, but also make the code loses its flexibility, at least in the event of a problem, they must corresponding chain reaction will occur, therefore, to minimize the coupling, is our goal. In order to minimize the error, we will think of "Demeter law", but please note that this rule is not applicable in any case, and it might have a larger response set of a class are more likely to .

  The second is the "meta-programming", where the need to use metadata, that is data about data, is probably the most common database schema or data dictionary. When using metadata to drive as much as possible configurations and applications through metadata, our goal should be to think declaratively, and create highly flexible and adaptable program. In addition, we also need to develop their own business logic, because compared with other aspects of the project, business policies and rules are more likely to change, then it makes sense to maintain them in a very flexible format.

  In addition to the module coupling, and the coupling time. In terms of the code may only time we consider the complexity of time, but we project to be considered concurrently with the order. If you save time in this area, we want to be familiar with the workflow, to see if there is anything you can "synchronize" the. In doing concurrent design, while also taking into account interface issues, "messy" interface prone to mistakes, we need to make the interface as much as possible more "clean."

  Development when you can not talk directly with the client code, they do not understand, this time the need to abstract view of the other side to understand this concept we all know. General view Anybody can do it, the question is how to put some of it becomes clever. View a book that: with a view to make separation model. This brings is flexibility, this is only one consideration direction, there are other improvements, we need to discover.

  Finally, there is "blackboard" in the project, there will be a process of discussion, it is often revolves around a simple blackboard model design solutions. At this time, there is the concept of "blackboard system", which was originally developed for applications in artificial intelligence and invention. We can also use it to do something.

Guess you like

Origin www.cnblogs.com/20183711PYD/p/12121745.html