on a computer, and I just need to resize the hard disk if it is not enough. But later I found that embedded products are very sensitive to this. When designing, we should consider how to slim down programs and improve code quality.It took about two months to complete the preliminary product transformation, followed by some minor repairs and supplements, the boss handed over the rest to the person who has been working with me, so that I began to invest in research and development related to the
Explanation of the decoration mode of the C ++ Design ModeDecoration mode of C ++ Design Mode
By dynamically adding some additional responsibilities to an object, the decoration mode is more flexible than the subclass generation. The decoration mode is an object structure mode.
I. Reasons
We often add functions to an
1. PrefaceA summary of the design pattern in succession one months, but also gradually some of the code in the project to some optimization. In fact, this summary of the processing so that they have a new understanding of the design pattern, the C # object-oriented, reflective, UML, design
interface programming,Instead of programming"
In fact, if you have done winform and used inheritance, sometimes you may feel a headache, because C # only supports class single inheritance. If you inherit a form, it is too much trouble, if the base class has any problems, your child forms cannot be re-painted for display.
The second principle of the design pattern is:
Object combination is preferred,Ins
Some casual ideas about the design philosophy of the C ++ language system (to be continued)
For a static language, its essential goal is to properly operate the data and obtain the expected value. Specifically, you need:
(1) DefinitionData Type
What is the data you define, whether it is an integer, a floating point, or a character. What is the range of values that can be included in data of this type.
(2) D
Use the C # reflection design to support scalable plug-ins,
1. Design Interface Class:
public interface IBase{ void Somefun();}
2. Design extension plug-ins:
class PluginCls:IBase{ public void Somefun() { Console.WriteLine("hello ,i am derived class"); }}
3. Main Program
Some casual ideas about the design philosophy of the C ++ language system (to be continued)For a static language, its essential goal is to properly operate the data and obtain the expected value. Specifically, you need to: (1) define the data type, whether it is integer, floating point, or character. What is the range of values that can be included in data of this type. (2) define the meaning of an operatio
We will discuss the implementation of the Short MMS module in the following aspects:
[Short MMS] C # Short MMS module development and design (1) -- Architecture (http://www.cnblogs.com/CopyPaster/archive/2012/12/07/2806776.html)[Short MMS] C # Short MMS module development and design (2) -- configuration (http://www.c
15.7 proxy mode effects and applicable scenarios
The proxy mode is one of the common structural design patterns. It provides a solution for indirect access to objects and controls access to objects. There are many proxy modes, among which remote proxy, virtual proxy, and protection proxy are widely used in software development.
15.7.1 advantages
The common advantages of proxy mode are as follows:
(1) It can coordinate callers and reduce the Coupling D
I. Introduction
In my previous blog post, I shared my understanding of the command mode. The command mode mainly abstracts the behavior into commands, making the behavior of the requester and the behavior of the recipient form a low coupling. In this chapter, we will introduce the iterator mode. I will not talk about the following nonsense. I will go directly to the topic of this blog post.II. Introduction to the iterator Mode
The iterator is generated for the Collection object. For the collecti
C # design Pattern (16) -- Iterator Pattern)I. Introduction I shared my understanding of the command mode in the previous blog. The command mode mainly abstracts the behavior into commands, making the behavior of the requester and the behavior of the receiver form a low coupling. In this chapter, we will introduce the iterator mode. I will not talk about the following nonsense. I will go directly to the top
C # design mode (19) -- State Pattern)I. Introduction in the previous article, we introduced the problems that can be solved by using the stateman mode and observer mode. In this article, we will first use an example of a bank account to explain the stateman mode, through this example, you can have a clear understanding of the state-owned mode. Then, you can use the state-owned mode to solve the problems ra
Six principles of design pattern, see http://www.uml.org.cn/sjms/201211023.asp. 1. Single Responsibility PrincipleDefinition: Do not have more than one cause for class changes. In layman's terms, a class is responsible for only one responsibility. The problem: class t responsible for two different responsibilities: responsibilities p1 p2 p1 requirements change and the class needs to be modified t
The first time to study one months, read the "Big Talk design mode" and "Effective C + +" two books, the first half of the two books are relatively easy, but later parts, such as: C + + memory, exception and template knowledge is difficult to understand. It may be that you rarely use exception handling and template relationships with yourself. I insisted on one m
18. Make the interface easy to use problem:
Parameters of the interface
Interface relies on other calls
classDate {public: Date(intmonth,intdayintyear;}The above code problem:
Easy to pass parameters in the wrong order
Invalid month or number of days may be passedWorkaround:
Get prevention by importing new types
struct Day {explicit day ( int ): Val (d) {} int val;}; class date {public : Data (const month M, const day D, const year y);};
Original address: http://www.cnblogs.com/zhili/p/SimpleFactory.html, IntroductionThis series is also a few of their own design patterns of learning notes, hoping to some beginners design patterns of people to help, in the previous topic introduced a singleton model, in this topic continue to introduce a more easily understood mode-simple Factory mode.Ii. Introduction to the Simple factory modelWhen it comes
1. Design Interface Class:
public interface IBase{ void Somefun();}
2. Design extension plug-ins:
class PluginCls:IBase{ public void Somefun() { Console.WriteLine("hello ,i am derived class"); }}
3. Main Program Design:
Class program {static void main (string [] ARGs) {Assembly ASM = assembly. loadFile (@".... \ plugincls. DLL "); Type
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.