What are design patterns related to?

Most people say that design patterns are only related to software development.

Patterns force us to focus on reusing existing modules or freeing us from the burdensome work of future change.

Are templates more efficient?

0


a source to share


9 replies


I think the wiki says this is best.

A design framework in architecture and computer science is a formal way of documenting the solution to a design problem in a specific area of ​​expertise.



This can make the program more efficient, it can take up less memory space, and it can make things easier. etc.

All about what pattern you are talking about and what programming problem you are using it.

+7


a source


Don't reinvent the wheel.

This is the main goal. Design patterns were developed to deal with repetitive problems.



This way they help you to have clearer code, usable (and reusable) (as far as they are right)

+3


a source


Design patterns are commonly used to make it easier to loosely connect different components so that the objects themselves can be reused over and over again in different applications without having to make big changes. Code reuse is an important factor in development.

Another thing to consider is that if your code is loosely coupled, it will take much less time to implement the changes through the use of design patterns due to the fact that a significant change in one area will not mean massive changes around for relax. This means that if you want to do constant updates and feature updates, you may only need to change small and isolated pieces of code without worrying about the whole project sinking around a big flame around you.

+1


a source


There are literally hundreds of design templates. Some of them are for ease of maintenance, some are for proper access to objects, I'm sure some of them could even be considered "performance enhancing".

The key point is that they are proven ways to solve a problem, by their nature, then they can improve performance or many other aspects.

0


a source


In simple terms, I can say that a design pattern is actually a way to solve a problem. If you know the problem and the design pattern exist, then the design pattern will solve your problem in the best possible way.

0


a source


Templates make your program more user-friendly, so your programming can be more efficient. This does not necessarily affect execution efficiency (the program can be even slower due to runtime polymorphism).

0


a source


"Can templates work more efficiently?"

Only if you find good templates for efficiency.

The Design Pattern for Mapping is a way to eliminate searching. You will see that the amount of time it takes to search will be less (one kind of efficiency), but it may use more memory (another kind of efficiency).

The Tree Map design pattern (the Python people call it an ordered vocabulary) is one variation of this design pattern.

The Hash Map design pattern (the Python people call it a vocabulary) is another variation on this design pattern.

They are more time efficient but less area efficient.

0


a source


Design patterns are a solution to a well-defined problem. The solution consists of different parts that relate to each other. The solution is context specific, with advantages / disadvantages depending on the tools used and which aspect of the problem is emphasized. Design templates are also a great way to communicate design.

This is not just a piece of software, on the contrary, the idea was heavily borrowed from an architect named Christopher Alexander .

0


a source


Design patterns are for objects, as algorithms are for procedural programming. A design pattern tells you how to create one or more objects to accomplish some useful task. Like an algorithm, you tell how to compile instructions to do some useful task.

0


a source







All Articles