Program Architecture and Design (Java language)

Source: Internet
Author: User

 programmers involved in application development have more or less had the feeling that the world is full of all sorts of concepts and abbreviations, and I don't know whether to follow this mentor or believe in that door, asEJB,RoR,AJax,Hibernate,IoC,AOP. Rod John sonIn his book, "Expert one on one EE development without EJBadvocates a "evidence-based architecture" (Evidence Based Architecture).  
  what is the basis for choosing an architecture, a technology? Rod John sonbelieves that it should be based on practical evidence, experience from historical projects or hands-on experimentation. Rod John sonThe more important message that the book hopes to convey is the "evidence-based" way of working ————— that should have been the way programmers work.  
  The interesting thing is that people who have read this book think that Daniel (Rod John sonvery cow, may be very cow, but how to let the world's architects together, or confused.  
  let's start with a question: if, give you aERPproject, what architecture would you choose, and why?  
Soap? EJB?no matter how you choose the architecture, although you can confidently say that this isxxDaniel recommends the best solution. ButRod John sonwill tell you loudly: wrong, fundamentally wrong, becausexxDaniel's experience is simply unreliable!  
  It is certainly dangerous to put the project in a dubious experience. The core concept of evidence is that all activities are based on the best evidence of the present. The evidence consists of two main categories: knowledge and experience. Knowledge is well known, and we say experience. First look at the empirical effect formula:
                          Surface Effect = Primitive Effect +  Pseudo Effect + Actual effect 
  as can be seen from the formula, Daniel's effective experience is not pure. Take the software architecture as an example, assuming that the original effect refers to the company's effective resources and development team capabilities (meaning that a company with high-quality resources, even if the worst choice of architecture may be successful), pseudo-effect refers to the belief architecture is the spiritual impetus of the optimal architecture (more easily understood as an example, Experts for patients to eat starch made without any drug action "pills" can cure the disease, referred to as the placebo effect. The apparent pseudo-effect is a useful effect, actually harmful, which means wasting resources on false beliefs rather than on the right beliefs, without obtaining the effective benefits of the right faith. ), the actual effect is the effectiveness of an architecture applied to a particular environment.  
  we have seen in countless books and articles,EJBis aJavaone of the core technologies;Rod John sonin his book it is claimed that the overwhelming majority ofJavaThe application does not need at allEJB. In the technology selection, the estimate can be very clear to realize: "Technology should be practical-oriented." But we can not help but be Daniel and their own experience around. Choice or not?EJB? No one wants to structure their projects in the castle, but how to get the real effect of the architecture and adapt to the environment?  
  reverse the empirical formula: Actual effect = Surface Effect - (Primitive effect +  pseudo-effect).  
  shielding off the bias (or volatility) of the surface effect is the actual effect. Evidence-based sources in the field of evidence-based medicine, it has a very effective method: randomized controlled trials (RCT). This experiment is the natural enemy of pseudo-effects (and occasionally comes out to beat pseudoscience), at least half of the Earth's people live to this day. Randomized controlled experimental method is simple, through a certain amount of samples to compare the results, the aim is to mask the pseudo-effect and the original effect. If you do a "EJBthexxclass Items Apply/Not applicable "experiment, set -a sample, divided intoA,Btwo groups,agroups are used for experimental groupsEJB,BGroup is a control group, using a specific schema. Finally, the key data of the experimental group and control group were collected and compared, and the results could be objectively reflected.EJBis adaptable to a particular environment.  
    looking again at the backward formula, assuming that the experimental group and the control group can simulate almost the same environment when the sample is sufficient, the actual effect of the experimental group should be stronger than that of the control group, namely: the actual effect of the experimental group = surface effect of experimental group - control group Surface effect. Through randomized controlled experiment, the pseudo effect of empirical formula, the external environment of the original effect, the company resources, the development team can be eliminated to the maximum, to restore its true face. The objective of randomization is to reduce the subjective selection of samples resulting in distortion by sampling,RCTThere is also a single-blind experiment, initially referring to the experimental group of patients to eat experimental drugs, to the group to eat the same design of the pill (placebo), to avoid the placebo effect in the experimental group. It was later found that doctors ' subconscious attention to the experimental group and ignoring the control group also led to bias (patients who felt more concerned about the disease better) and designed a double-blind experiment in which doctors and patients did not know whether the patient was taking pills or placebo.  
  " but," said the man, "I have always followed others/Online/The proposals in the book are to be structured. I don't have the time to look at all kinds of technologies and even have a lot of projects, and to compare their merits and demerits according to the project situation. ”。 In fact, the completeRCTThere are also ethical issues in the medical community, such as: whether to take the patient's life to do experiments in line with human morality. SeemsRCTonly available for new drug research (e.g. AIDS, cancer,SARS, AlphaH1N1,wait for the dead horse to be a live horse doctor). But there was no baffledDoctorThey invented theMetaevaluation methods. Let any one enterprise carry out -the experimental and control groups to do aEJBthexxclass Items Apply/Not applicable ", are not reliable. But we tend to overlook the existence of at least the world50000more than one of the "EJBapplied toxxclass Project Success/unsuccessful "case. MetaThe evaluation method first assumes that there are ways to collect enough samples (MetaThe evaluation benefited from the development of the Internet), withRCTthe idea of scientific and rational evaluation of the existing data. So,MetaThe evaluation method consists of at least four parts: 
1, collect enough samples, including available internal and external information, Internet materials, periodical magazines, and questionnaires.  
2, to form a comparison, to collectA,B,C ... NGroup control information and restore the truth by contrast.  
3, control bias, design can simulateRCTbias control of the effect. Does it look like programming? SoRod John sonthink evidence-based architecture is the way programmers should work.  
4, the composition, characteristics, indications, usage, side effects and taboos of the (experience) are analyzed.  
  It is worth noting that this is a four necessary part, not four sequential steps. The question is a bit like the first architecture or the need, where the main point is to collect samples first or control bias first. Of course, if a large number of reliable samples are available in general, samples will be collected before the bias control is designed. Conversely, design bias first, and then collect samples (such as design bias control, assuming the use of questionnaires, in the survey to add Bias Control strategy: problem traps, cross-validation, etc.). The purpose of the evidence-based framework is to collect and evaluate high-quality architectural methods, but at the same time avoid being guided by this awareness, resulting in "subjective bias", which isRCTTaboo Place.  
  don't underestimate it.RCTthe charm of the medical profession with it lay down countless classics,also saved countless lives, such as blood-letting therapy, vitamins and so on. New drug market in the United States withoutRCTnot allowed to go public at all. So far, no medical profession has dared to come out openly againstRCT, evidence-based hats are also detained in almost any field: evidence-based economy, evidence-based management, evidence-based physics ... Including evidence-based dating. Evidence exists where there is a problem.   
  a bit verbose, summed up: 
1, the empirical effect formula is: surface effect = Primitive Effect +  Pseudo Effect + Actual effect ,its backward-push gets: Actual effect = Surface Effect - (Primitive effect +  pseudo-effect).  
2, the effective method of shielding surface effect bias (pseudo effect and primitive effect) is randomized controlled experiment (RCT). Assuming that the approximate input in large sample sense should have similar output, then it can be assumed that the actual effect of the experimental group = surface effect of experimental group - control group Surface effect.  
3, randomized controlled trials were performed unconditionally (RCT), you can takeMetaevaluation methods.  
4,MetaThe evaluation methods include collecting a large number of reliable samples, forming a control, controlling bias and obtaining analysis results.  
  just likeRod John sonadvocated: Ye do not have to worship 泥胎 Idol, the Holy Spirit is ye itself. Of course, the premise is the sharing and verification of experience. FollowRod John son, a qualified architect has enough knowledge and experience, and more importantly, the architect should be the processor of information, not just the person who disseminates the information. It also means that qualified architects should be able to gather information, control bias, and extract experience to get the best architectural solution for their project, rather than just holding the red book and saying "Danielxxsay "or lie on the woodpile of your own experience to eat the empty mountains."

Program Architecture and Design (Java language)

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.