A flower that looks beautiful - Book Review "Java and Mode"

zhaozj2021-02-08  441

A beautiful flower looks beautiful

- Book review "Java and Mode"

Word / razor

(This article is started to "programmer" magazine 2003 1st)

Lying in front of me is the "Java and Mode" on the 1024 page published by Qi Hong, the electronic industrial publishing house. If you follow my friend Jacques Lebrun's statement in his "THETHICAL MONTH: One Bean Book Review", this book is to be attributed to the "huge giant" of "Gong Wolf", and The number of page numbers in just 1K is indeed "people who make people psychological barriers". However, since I have a day, I also know that it is difficult to write a small book that can "make a dance" in design patterns, so I will have a "Bean Top" criticism, returning to rigorous Come up. In the order of "Java and Mode", Dr. Zhu Tianhua praised this book as "a fantastic flower of a wonderful fragrance", and I have a good time to evaluate it. "

Until recently, Chinese model theoretical books only have a "design pattern". The classic status of "design model" is undoubted, but the examples used are too old, it is difficult to let readers have a visual sensibility understanding, and the theoretical explanation is too abstract, causing reading experience. Readers "Design Mode" generally reflect "I don't understand", it is reasonable. "Java and Mode" is the first Chinese entry textbook that has been the first model theory, nature, is also the best, because there is no second.

For "Java and Mode", the expectations of Dr. Yu Honghong are not just popular model theory and design model technology, but also hopes to explore the philosophical roots of model theory, combining design model technology with traditional Chinese culture. This technique is multiplied, and it is the "wonderful aroma" that Zhu's praise is praised. It is also the reasons why it "looks beautiful". In this article, the author will also commented on these two aspects to give this book a comprehensive and unbiased evaluation.

The best pattern textbook so far

What should a textbook be like? Or, how to evaluate the advantages and disadvantages of a pattern textbook.

First of all, this book should be introduced for the model theory of C.alexander. After all, most readers have exposed to "mode", starting with "design model", the purpose of their learning model is to improve software development. The authors of the pattern textbook should not be assumed that his readers have read the "Eternal Way of Architecture". Due to the form of Alexander's mode theory, the theory has extremely far-reaching influence, so the authors of the pattern textbook should help readers to make up this lesson.

Second, this book should be introduced for some object-oriented some guiding principles. Like Open-Closed Principles (OCP), LISKOV Replacement Principles (LSP), dependent reversal principles (ISP), etc. are the direction of object-oriented programming efforts. Similarly, a responsible author should not assume that his readers have read Robert Martin's Designing Object Oriented C Applications Using The Booch Method, he should also help the object-oriented beginners make up this lesson.

Third, this book should be introduced to most of the model mentioned in the "Design Mode" book. Due to the classic status of "design mode" and its boring, a model textbook is the most important mode of "design mode" in some important modes, indicating why they are necessary, indicating their applicable scope and (More important) Not applicable, explain how they solve problems and legacy issues. If you can't answer these questions left by the Reader, a textbook will not be able to resonate the readers, and it is impossible to give readers immediate utility.

Finally, the content in the book should "advance with the times." Example should come from a more wide application, the language is preferably Java or C # (due to the inner limitations of C , it is not suitable for describing design mode), the legend should be used by UML ... Although I am very respectful Robert Martin Book, but if you see a book today's pattern textbook is still using the booch method, I must throw it on one side. In the model book I have seen, the "Java and Mode" in the "Java and Mode" in this "Java and Mode" are in line with the above four-point requirements, so Pattern Hatch. The Pattern Almanac and other books do not meet the above requirements, so it is not a "good pattern textbook" (please note: not a good pattern textbook, does not hinder their a good model. But it is not within my judgment, so therefore I don't have judgment. It is necessary to maintain proper silence outside the applicable category, is a rigorous scientific attitude. Now Design Patterns Explained has not been published in translation, so regardless of whether it is better than "Java and Mode", the latter is the best Chinese model textbook so far.

In addition to the two elements of "Alexander's Mode Theory" and "Object-Oriented Design Principles", "Java and Mode" has two items worth noting: First, it uses a large number of financial business systems Samples of Java code extracted; second, inserted a large number of philosophical products from Chinese classical masterpieces. With regard to the second characteristics, I will comment later. At least, Dr. Yan, a solid foundation and long-term experience in the development of software projects in Wall Street makes these examples as the example in "design mode", nor is it simply like the example in the Joy of Patterns.

However, this does not mean that Dr. Mode is not defective. For patterns, in addition to the Solution, the most important element also includes "Problem", "Force" and "Consesequern". Every reader learns a model, in addition to the solution represented by the model, the scope of this mode must be learned accordingly ("issued by the problem"), and is given by "constraint") And the effects of the opposite side of this pattern. Otherwise, the reader only learns to be a solution, but it does not know when to use (and when not used), can only rely on the constraints of this mode in the constant test error. The constraints of exploration models, the solution to the exploitation problem, the workload of the two is often different - that is, the mode will not help. Dr. Yao is clearly very clear. In the "Java and Mode" 1.6, Dr. Yan clearly lists the "top ten elements" of the model (including some of the most important elements, such as "example [ Example] "," known application [KNOWN Uses] ", etc.).

However, when explaining the specific mode, Dr. Yan ignores the important constraints of "constraint" - at least not explicitly pointed out in each model. This piece of text arrangement may be a philosophy of Dr. Yao (about this, I will discuss later). However, this leak may be very serious: lack (at least not clearly indicated) the mode introduction of constraints, plus philosophical sessions that are likely to put it four seas, may easily let readers have a model Over-optimistic attitude and the misuse of patterns without obtaining the type of "road" that has not been invisible, thereby losing the opportunity to deepen the mode understanding. Even, for a less responsible reader, the omission of constraints may make the efforts of the book. For a 1k-page technical book, let readers pursue philosophy means to gall up the risks of science, and the cost is probably too high. Strive to do some remedies for this 漏 漏 漏 目 的. 一........... The above is my evaluation of the technical level of "Java and Mode". He said that it is slight: white. Before the Chinese translation of Design Patternal Explained, this book is undoubtedly the best Chinese mode textbook; even if Design Patternal Explained is published, due to the difference between China and Western cultural differences and translation levels, it does not necessarily Strong than "Java and Mode", so the latter may continue to be the best Chinese model textbook.

As mentioned earlier, the author Qi Hong is very focused on the combination of model theory and Chinese traditional thinking. The book is also inserted from Chinese classic philosophy, and tries to convey the philosophy of Chinese Taoist thinking. Below, I will evaluate this philosophical meaning. As a software developer, in the face of a book that elaborates software development technology, I will try my best to converge comments within science, and maintain proper silence of science. As mentioned earlier, this is a rigorous scientific attitude. Difficult, cautiously, firmly, I will start.

Important rather than necessary philosophical

Looking at the book, Dr. Yan Hong can roughly summarize:

Software mode Theory originated from C. Alexander's architectural theory, and the latter originated from China's Taoist thought. Moreover, model theory is more close to Chinese traditional thinking, including grandson, Mozi, etc. Therefore, in the direction of Chinese traditional thinking, the exploration of the model theory is moderate, which helps to develop "Software Engineering Philosophy".

For Dr. Yan gives the philosophy of this book (and the space it occupies), my evaluation is: important, but not necessary. Say it "important" because it may not benefit from the reader's understanding mode theory - this is the value of psychological categories, not the scientific scope; saying "non-necessary" because it does not have any value in science There is no more helpful practical applications for patterns. Below, I will explain my point in detail.

This is no doubt that the software model originated from the architectural model of C.alexander. Whether it is GOF's "design mode", Alan Shalloway's Design Pattern Explained, or Linda Rising's Pattern Almanac, emphasizes Alexander's book "The Eternal Road of Architecture" and "Building Mode Language" on Software Mode Thought. However, the alexander's architectural model (and software model theory from it originated) is from China's Taoist thinking.

China's Taoist thinking seems to be a wide range of ideas applicable. Tiandi running, human life, seems to have no irrevers in a "Tao". This extremely wide applicability gives us a hint: it is probably a meaningful theory. From a logic perspective, a contradictory has an infinite information, which can be launched any proposition. Therefore, as long as it is hidden in a proposition with a sufficiently mixed language and is not discovered, then any other propositions can originate from this proposition, because the latter is already a contradictory. Taking Taoist thought as an example, for the first sentence of "Morality", most people 's sentence reading is "Dao Ke", very good ", meaning" Once the Tao is said, it will not be a constant road ", this It sounds like Wittgenstein's "language game"; and my friend ozzzzzz's sentence is "Tao, the road is not, the road", meaning "It is" not only facing positive views, also accommodating the opposite view, this It is a constant road, "which sounds more like Hegel's syndrome. Why does this happen? The reason is: This sentence is sufficiently confirmed, which can be allowed to have different, even contradictory understanding, so any theory can be launched - as long as there is enough logic. Say "model theory originated from China Taoist thinking", it is also an application of this logic ability. In order to demonstrate how to launch the theory they want from the contradiction, my friend Snowfalcon has made a more interesting experiment. Below is a paragraph of Snowfalcon's emercress:

Software eternal Zen

The philosophy of pattern can be traced back to Buddhism. The theory of Buddhism can be "projected" into the software design.

......

First, "Qwwan" means that the intrinsic properties of a software exist not only in this software, but also among the interactions of this software and other software, there is an exterior of this software and the world, especially It is in the interaction of the user.

"Nameless traits" have actually elaborated in Buddhism. The "empty" in Buddhism is this concept. "Empty" in Buddhism is divided into "human space" and "law". Among them, the law said that "the law is said that all things are generated by the cause, so there is no entity". " That is, all things are determined by the intrinsic nature "due to", when it is reflected in the human brain, "color method" is formed. The so-called "color method", it is a matter of hindrance, which has a certain space, which has a nature of his mutual disorder and deterioration. The unknown characteristic corresponds to the empty, it is the production and intrinsic nature of all things. However, due to human observation, a color method is formed. The color is hindered by the essence of things to things, and it is said that it is from him.

Therefore, this most important attribute in the software is "unknown" because it is the attribute that is mapped before the human brain. After this property is mapped to the human brain, it has undergone various ways to limit the process within a variety of different ranges; this process has led this unknown quality into a big pile "" famous "color method. ". The readers after this book will read, these "famous" "color methods" include the variability of software performance requirements, usability, scalability, flexibility, and insertability, and more. These quality is color method. If we use color to observe the world, then you can't understand the empty space of the unknown trait.

Is it very reasonable to sound? Why is "model philosophy" can originate from Taoist thinking or originate in Buddhism? Even, you can feel: As long as there is enough logical ability and language skills, you can also give "model philosophy" from other ideas. The reason is: Like Taoist Thoughts, Buddhism's theory is also contradictory with enough language, so it can be derived from any other theory.

As I impressed, you can continue to play such logic games. You can even claim that the philosophy of the model originated from Plato's ideas: mode is "Treatment Solution", is a "soul" of a specific solution; the specific solution is the "projection" in the real world; When you see these "projection", the rationality in their soul is shocking, and therefore explores the perfect "type" - that is, the model. Of course, you can also claim that the philosophy of the model originated from the thoughts of Herack, as long as you are willing. So, what is the significance of the chasing traceability of this theory? The answer is: there is no meaning in science. As mentioned above, any proposition can be launched from a contradiction. The entire derivation process is just a logical game, just gives the same proposition to different expressions without giving more information. For Dr. Yan, the situation is this: no matter what the model theory is attributed to Taoist thinking or Buddhist thought or something else, it cannot give model theory with more connotation.

In addition to the philosophical thoughts of the outline, Dr. Yan also has the same problem in the "cultural compound" used in the book: they have more helpful for understanding a single mode. This kind of small story from Chinese classical masterpieces are confused by readers while embellishment readers. Readers will save how much time in understanding the mode, will waste how much time in understanding mode.

In fact, this method of introduction is not fresh. Just on the CBS website, I also see some people who use metaphors to introduce design patterns (and other things that are more difficult, such as object-oriented), and the name "in-depth". I have never catch a cold for this way of reducing difficulty. For patterns, the most important elements are "constraints" - "Questions" and "Solutions" are all eyes, but it is really important to know "when not using mode", that is, "constraint" discussed. thing. What kind of metaphor can describe the complexity of software issues? Even if there is such a metaphor, how can it be as difficult as the software problem? Therefore, I oppose the abuse of metaphor when discussing the model - after all, we discuss the solution of software issues, not those that seem to be relaxed.

Even the metaphor of Dr. Yao is carefully selected, it is also unable to be satisfactory. I will pick an example:

Sun Wuko is in the battle with Huang Feng, "Make a means of a body: put the macarre, chew it with mouth, look forward to the spray, the sound 'change!' Change 50 walkers, They are all dressing, and each is holding a iron rod, and the weird is in the air. "In other words, Sun Wukong can copy a lot of" outside the body "according to their own image.

The means of this body of the old age is in the object-oriented design field called the prototype mode.

This is a typical excessive simplified metaphor: Since it can be said that this "body" means is Prototype mode, then can I say that it is a Factory Method mode? Can you say that it is a Singleton mode? Can you say that it is a Flyweight mode? Such a "case" cannot indicate the "problem" of the mode, nor can it explain the "constraint" of the mode - if the design pattern is discussed, and "Question" and "constraints" are discussed. There is no meaning. Such a metaphor is simple, it is simple, I am afraid the reader reads an example or in the clouds, I don't know if my software is suitable for this "homes".

At this point, the reader can see my point of view: Dr. gives this philosophy given by this "Java and Mode", cultural meaning, whether it is the philosophical origin of the outline, or the cultural compound of the book, there is no knowledge of the knowledge. Well. So I think it is not necessary. This is undoubtedly a blow for those who want to pass this book "to", it is undoubtedly a blow, but it should also start a popular old saying: No silver bullet. Although not necessarily, these contents have their value - not scientific science, but a psychological category. Philosophy in the book means not to give readers more model theory, but it is indeed attracting the attention of Chinese readers, so they are interested in this book; the cultural sessions in the book cannot make readers better understand the model, But it is indeed possible to adjust the reader's reading experience, let them throw the book aside. Similarly, these metaphors can also make readers a roughly understanding of the model, although they will take more time to explore the application range when needed.

This is a comprehensive evaluation of my philosophy in Java and Mode: Important, but not necessary. You can treat them as a good conditioner (of course, it is also possible to be seen as an improper diluent, depending on the personal hobby), but don't want to learn more from middle school. Laozi's "Tao" said that thousands of years, finally still no one "won."

Written in the last

If possible, I would rather do any evaluation of the philosophy of "Java and Mode", because this entangled philosophy, logic and scientific text written is hard. However, the author of Dr. Yu Hong has a good value to his book, and if I evaluate his book, it doesn't evaluate this part, it is big for him, so this is forced. Now, I finally returned to a relaxed book review route.

Borrow Jacques Lebrun's "French's pretty words" to evaluate Dr. Yan Hong: He didn't have time to write in a short. This "Java and Mode" will have 1K page so thick, Dr. Yan's "greed" is caused by it - I want to put down the model theory origin, pattern foundation and mode instance in a book, and I still don't want to thicken this thin, final The results become a "wolf giant" is also reasonable. However, this "greedy" style puts this book in a slightly embarrassing situation: it is too big, it is impossible to become a reading on the bus; if you want to see the reference manual, it is too thin - When you check out an urgently needed pattern, I am afraid that there will be no too many people have a mood to appreciate the "Grand Shengma Wars Yellow Styles". So, even though this is a very good book, I don't know what time read it. At least, I will not be willing to hold a 1k page on the bus, so it is still lying in the drawer of my office.

So, this "Java and Mode" is indeed a good book. If you have enough patience to read it - I have no such aortic. In fact, I have now seen more than 500 pages will retreat. However, in addition to those of these contributes, it is not commensurate to the reader's nutrients with its 1k page number. In this regard, I can only hope that Dr. Yao can have time to "write this book".

转载请注明原文地址:https://www.9cbs.com/read-669.html

New Post(0)