In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what are the classes of web design patterns". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what kinds of web design patterns there are.
Classes that are simple enough
The above design has no problem when the output content is simple, but when the input content is more complex, there will be some problems:
In addition to the actual output, it will at least include additional processing, such as traversal of data structures, and sometimes parsing content.
The parts of each class that deal with the common structure of data (pages, paragraphs, etc.) should be very similar, but the specific input
The part that comes out is different.
The solution to these problems is to further separate the common processing so that FileWriter deals with only the really different parts, while other data traversing and other things are left to other classes.
At this point, it is basically no different from the BUILDER model. The following figure is a class diagram of the motivation part of the BUILDER design pattern.
There are three main differences between the two class diagrams:
The name of the class is different, and the author uses Writer instead of Converter to make it more clear that the function of the class contains only the function of the final output.
Location of the builder/writer. Both nouns are used to specify the names of Converter/Writer data members. The "Design pattern" book is marked on the RTFReader side, while the author's picture is marked on the Writer side. Which situation is correct, you can refer to the books on UML.
The begin/end method is added to the author's example, which makes the corresponding concrete class easier to implement.
No matter who is right and who is wrong, BUILDER's thinking remains the same.
Thank you for your reading, the above is the content of "what are the classes of web design patterns". After the study of this article, I believe you have a deeper understanding of what types of web design patterns have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.