Basic architectural ideas that programmers should know in late 2016

  When it comes to the architecture of the system, beginners may not realize it, and friends who have been engaged in development for many years may know that the key to whether a system operates normally and whether it can operate efficiently depends on the architecture of the system, because a system has only one good Only the architecture can support more users and more applications to access the system. Next, Xinba will share with you some questions about the system architecture.

  Many programmers may have the idea that, to be able to complete the programming task, no matter how the program is implemented, the memory operation of the program, and how the program internally operates, many friends may not care. This is also a very serious problem faced by many programmers now. The most qualified programmer must not only complete the programming task quickly but also ensure the quality of the code. The so-called quality is the internal operation of the program, including when the program is running. The allocation of memory and the performance of the program are the most critical issues.

  Speaking of this, Brother Xinba is talking about a real thing. A friend of Brother Xinba can quickly run a stored procedure with a data volume of tens of millions on a computer with a very low configuration. What is the concept? Possibly, it can be seen that the operation of the program does not depend on the hardware resources of the system. You must know that our work is to achieve the greatest value with the least resources. This is what we programmers are trying to do. In fact, , to achieve such a level, it is not so difficult, as long as you are willing to work hard to achieve such a level, of course, such a road is still a long way to go.

  data separation

  A good system needs to be independent of data. In order to consider operations such as data migration or database replacement in the later stage, programmers should be aware of this, and should pay attention to this part of data operation when writing code. , if there is a database change, you can directly modify this part of the data operation, so that the changes can be small and the possibility of duplication of work can be reduced. Of course, it is not a simple matter to achieve data separation, and there are really many things that need to be done. The general data operation is at the DAO layer. For the operation of SQL, Xinba generally recommends not to write SQL in the program, so if the SQL is changed later, do you need to change the project? Recompile, if you are To write SQL in the configuration file, you only need to change one configuration file. Is it very simple? Programmers should consider this problem when writing any one and database operations, because only you are constantly thinking. There is progress.

  Low coupling The functions of the

  current system are very complex. If the coupling is not considered in the system architecture, there will be many problems later, because a simple operation of yours seems to be very simple, but you will find This is related to other parts of the system. There is no problem with the normal operation of the system. Considering the later expansion of the system, it will be difficult. This problem was not considered at the beginning of the design. As a large-scale software, if you encounter such a problem, it may be a devastating blow.

  High performance The quality of the

  code is not simply based on how much you write, but whether the code can run normally in different environments and whether it is dependent on the physical resources of the system. There is a saying that good code is not written, but modified. It is very well said. In fact, as long as you observe carefully, you will find that most of your time is spent on system debugging, and the realization of functions is not So difficult, qualified programmers know that high performance is their goal.

  high transplant

  A large-scale application system may be released in different environments. If such a function can be achieved, it is actually very simple. Before developing the system, the system architecture must be considered. Programmers should have this awareness whether it is a large project or a small project should treat any software project with higher requirements, so that you will find that the later work will be very easy.

  As a programmer, you can't stay at the level of writing code forever, but you must be strict with yourself. When developing any system, you must consider the high availability of the system, use high concurrency, and be strict with yourself. You will find yourself in 2017. Years have more harvests. If you encounter problems in the process of learning, please communicate with Xinba.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326992182&siteId=291194637