Read the notes "software Cheats" 03
Read the software cheats and read the abstract factory model to explain the model of the abstract factory in a dialogue between the KFC and the father. The abstract factory provides an interface for creating a family of related or dependent objects, rather than a specific implementation class. For example, in a story, you want to create abstract food classes, to understand food characteristics: categories, prices, quantities, total price, etc., including food calculation methods. At the same time set up different food categories, such as cola, hamburger, fried chicken. Then, based on the creation of the food class, the factory model is established and the abstract class is transformed into logical entity classes. At the same time design factory according to the opening and closing principle, specific factories to create specific products.
1 before: For the abstract factory model, mainly through the classification of the establishment, before the development of the book, the development of Accounting query summary three categories, but not specifically created separately, its classification to establish a factory model.
2 So bad reason: chaotic development, the specific three main functions only realized the query, bookkeeping function, product effect is not ideal. At the same time show the gap between team cooperation, the use of recommendations is not ideal, can not meet user expectations.
3 Improve the method: the development of the product portfolio, respectively, the abstract design, to complete the functions, to provide product library development products such as: Accounting class, Query class, summary class, three items, concrete operation to complete the product. After the combination of use to complete the factory and products. At the same time, the development of a part of the completion of user experience, the classification of products to find out, to avoid the combination of re-repair
Read the notes "software Cheats" 03