The software engineering and design pattern of Java pen question

Source: Internet
Author: User

Software engineering and Design patterns

1 , UML Aspect

      standard modeling language uml, static diagram behavior diagram , interaction diagram ( sequence diagram , Cooperation diagram implementation diagram.

2. Software development

3 , Java What are the common design patterns? Describes the Factory mode.

Total , divided into three categories: created, structured, behavioral

I only remember the commonly used 6,7 kinds, respectively:

Created (Factory, factory method, abstract factory, Singleton)

Structural type (packaging, adaptors, combinations, proxies)

Behavior (Viewer, template, strategy)

Then talk about your understanding of the patterns you are familiar with.   

the four design Patterns in Java:

Factory(Factory mode), builder(build mode), Factorymethod (Factory approach mode),

Prototype(original model mode),Singleton(singleton mode), facade(façade mode ),

Adapter(Adapter mode), Bridge(bridge mode), Composite(synthetic mode ),

Decorator(decorative mode), Flyweight(enjoy meta mode), proxy(proxy mode ),

command (order mode), interpreter(interpreter mode), Visitor(visitor mode ),

Iterator(iterative sub-mode), Mediator(mediator mode), Memento(Memo mode),

Observer(Viewer mode), State (status mode), strategy(Policy mode ),

Template Method (pattern mode), Chain of responsibleity(responsibility chain mode)

      Factory mode: Factory mode is a frequently used pattern, classes implemented according to the factory pattern can generate an instance of a class in a set of classes based on the data provided, usually this set of classes has a common abstract parent class and implements the same method. However, these methods do different things for different data. First, you need to define a base class in which subclasses implement methods in the base class in different ways. Then you need to define a factory class where the factory class can generate different subclass instances based on the criteria. When an instance of a subclass is obtained, the developer can call a method in the base class without having to consider which instance of the subclass is returned.

4 , Those design patterns are used in development What is the occasion

Each pattern describes a problem that continues to arise in our environment and then describes the core of the solution to the problem. In this way, you can use the existing solutions countless times without having to repeat the same work. The main use of the MVC design pattern. Used to develop jsp/servlet or ee -related applications. Simple Factory mode and so on.

The software engineering and design pattern of Java pen question

Related Article

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.