Design & Pattern team: "Application of Design patterns in software development" (excellent Version)

Source: Internet
Author: User

Here, I would like to summarize the first discussion of the team. Of course, Zookeeper's article is more original. If you have time, you can check it out.

In the following article, most of the arguments belong to the team, not my personal point of view.

 

What is your understanding of the design model?


Vcfly.net design mode is an idea, but the basis of the idea is to have some practical experience.


Wayfarer I think there are two ways to design an application:

Starting from the traditional software development, if you are familiar with the design mode when designing the architecture, the software to be designed is scalable and

Robust

However, from the TDD perspective, the design pattern is mainly reflected in refactoring.

Zookeeper should actually consider the pattern when designing the model. When the specific pattern is available, the code will come out without getting the pattern to replace

Right?


I think the dudu model can be understood as a theory of software design. It is very important to learn the theory well, but more importantly, how to use the theory is like

If you understand Sun Tzu's Art of War, you may not be able to win the battle.

I think the highest level of mode is that you use the mode to solve problems unconsciously in programming.


The single discussion mode is of little significance. In refactoring, the application mode is a common means of using the mode, so the views of Everyone naturally start

Divergence, reconstruction, TDD (test-driven design) pairwork xp


Reconstruction

Dudu I think we use modules to solve the problem of repeated code. We should consider how to avoid repeated code during coding,

Instead of the Mode

Zealot my own principle is that if I copy the code three or more times, I will refactor it.

A prominent problem with vcfly.net is that the functions of the system are becoming more and more complex, which requires reuse and reconstruction.

Vcfly.net I used to change a 5000-line program and reduced the code to 1800 lines. The scalability and scalability were all improved.

But the execution speed is reduced to 50%.

When I was reading the reconstruction of fowler, wayfarer thought the steps he was writing were too cumbersome, but later I thought it was worthwhile to be cautious.

Idior is right. He does not perform tdd without testing code. refactoring is very dangerous and troublesome.

The Design of Samuel is very important, but never overdo it!

When he started designing, Xiaolu implemented it in the simplest way. With the complexity of requirements or the emergence of more requirements

To avoid refactoring, first sort out the existing functions. At this time, you may need to apply various complicated models. Wait until the Refactoring is ready, and then add

New features.

Dudu Xiaolu, this is a typical XP idea,

The same is true for zookeeper TDD. First, write the test code and then ensure that the Code is only available for testing, that is, only available for testing.

There is a test code, so there is no excessive, so what we do is what we need most now.


Pairwork & customer

Which company does idior have a problem with? pairwork

Samuel does not believe Chinese companies will use pairwork

Dudu supports Pair Programming

Umlchina has not tried team-end programming. It sounds interesting.

Xiaolu has never tried real xp, but has tried Pair programming once. if it finds that the effect is poor, it stops. Has anyone had a successful experience?

? You can also learn from failures.

Wayfarer's domestic customer level does not meet XP's requirements

Samuel is very opposed to the fact that wayfarer customers are always right customers and you need to guide them.

Vcfly.net opposed to Samuel

I have no confidence in domestic customers.

Zealot does not complain or expect the level of the customer. It is natural that the customer needs to fulfill their own needs and does not want to spend more money.

Wayfarer wants to stay in the next topic for questions about Pair Programming and customer communication.


Common Mode

Which of the following modes are frequently used by zookeeper?

Templates using singleton, factory, and templates are classic in the mode, but they are relatively easy to use.

Wayfarer does not blindly pursue complicated models, which may lead to excessive design.

RoyDeng Composit is used in combination with the on-site architecture. Very common

Umlchina facade is easy to use, especially when dealing with a lot of messy code.

Wayfarer actually uses the Template mode. I believe many people have used it.

Idior strongly recommends bridge strategic state, which is an embodiment of Favor composition over inheritance.

In fact, if the mode is used in a system, I believe that all the modes are used.

Dudu I do not deliberately consider which mode to adopt in programming.


Mode and architecture

Jeseeqing I think the architecture is based on the pattern.

The Samuel architecture needs to be realized. It is not at the same level as patten, and the pattern is close to the language level.

? I think it is the most popular mode.

Samuel to RoyDeng: in fact, when designing the architecture, we do not consider the pattern design architecture or platform. It mainly involves universality and delay.

Scalability and functionality

You can see the. NET FrameWork

When you decide what you need, the use mode is just a matter of course.


Practical Application

In my opinion, the more business-oriented we are, the fewer models we use.

Vcfly.net yes, because he wants to consider business risks and costs

The key to wayfarer is whether we are working on projects or products.

Vcfly.net I have written software for some companies. They only consider the implementation of functions, and basically do not consider the later maintenance. As long as they get the money,

They don't care, so you and them are talking nonsense.

Wayfarer vcfly, of course, you cannot tell the customer the mode. You can only say the performance, function, time, price, and mode of your product.

Is to help you improve product performance, functions, and future expansion in Design

Does idior have a company interview requirement model? Not to mention the individual of the interviewee

Jeseeqing: Yes. I used to have an interview with a company.

Wayfarer I used to ask a small company in Chengdu, kewayster.


Role of the Model

Wayfarer I would like to ask you: how does design patterns help you in project development?

Zookeeper I think the biggest advantage is that you can write a lot of code.

Idior's maintainability and scalability can adapt to future changes. oo's understanding of the model is almost the same.

Help you understand oo

In fact, my learning on design patterns actually deepens my understanding of OO.

I think the pattern is also conducive to communication.

The du mode is a summary of the experience of many people. We can avoid a lot of detours, but you must really understand the mode.


Wayfarer I always think of patterns as two layers: one is thinking, which can help us clarify our design ideas; the other is tool, which can

It helps us effectively design models that cannot be used for patterns

Dudu recommends that you store a design model book on your bed. If you have nothing to do, check it out.

By the way, the benefits of the mode are as follows:

You can reuse existing designs and provide a set of languages for programmers to communicate.

The model allows you to look at problems from a higher perspective, view the design process, and better understand the OO ideas, rather than prematurely

Details of Code involved.

We should focus on the problem rather than on the implementation details. The mode can improve the abstraction of the problem. This is

Is the biggest benefit of the model.

The model is a tested idea that is more reliable and scalable than sudden ideas.

Through the learning model, we will have a deeper understanding of OO's thoughts.


This is my summary of the discussion. You can continue comments on this basis. In this way, you can continue chatting. :) hope everyone can respond.

A more comprehensive model special report can be prepared before the meeting. Otherwise, the time for one hour is too small. In this way, the discussion can be extended.

Theory.

I suddenly thought of a way in which, during the discussion by the team, people raised some points and gave some arguments, and then made comments,

The discussion will be continuously improved. Finally, we will summarize it. What do you think?

 


 

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.