Root cause of poor code generation (1) lack of theoretical knowledge (continued)

Source: Internet
Author: User

1. Object Oriented Programming)

Object-Oriented Programming abstracts all things into objects. Even if a virtual object exists, it must be abstracted as an object, such as a link or state; some things that are not defined as objects in the objective world will be defined as objects in the object-oriented world, such as behavior and action.

Different from process-oriented programming emphasis: Order, selection, and loop, object-oriented emphasis: Include, inherit, implement, and combine these relationships. Object-oriented features: encapsulation, polymorphism, and inheritance ).

2. Dependency Injection)

When dependency is dynamic, dependencies can be gradually introduced through reflection by configuring dependency class names externally. Dependency injection can better solve coupling, makingCodeHot swapping can be implemented ".

However, dependency injection requires many XML files.

Another name for dependency injection is "inversion of control)

3. Domain specfic Language)

Different from object-oriented languages, a domain-specific language is a solution to solve problems in a specific domain. The following are some examples:

Regular Expression, state machine, Expression Tree, expression builder, and Annotation)

And so on.

4. Design Pattern)

The design model is a set of conventional design methods summarized by gof based on long-term work experience. Each mode has a name and is commonly used in 23 design modes.

State, strategy, bridge, proxy, mediator, Singleton) factory, flyweight, abstract factory, facade, command, and observer) template Method, adapter, interpretor, iteration, and chain of responsibility) composite, decorator, prototype, memonto, and visitor)

 

 

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.