Source code organization method

zhaozj2021-02-16  62

If the development of a software involves only a language, the source code management will be relatively simple. According to different modules, it is directly divided into different folders. For example, C, you can divide a project into moda, modb, MODC and other modules, then divide into H, SRC two types of files (clips), in the H directory, can be divided into submod1, subsmod2, etc., also divided into submod1, subsmod2, and other sub-modules or also in the SRC directory. It can be divided by other sub-modules.

Such an organizational mode is for a language, and it is a modular manner as a division. There is a direct role in module as a division standard, which is to make the exchange between developers easier, because the module's division corresponds to the functional division, which is in line with the essence of functionality. In this case, the hierarchical relationship between the modules is not directly reflected, but there is a need for additional system definitions and document descriptions.

Let me be confused is an organizational approach in a variety of development languages. If there is C, C , I can still follow the above organization. But if there is Java at the same time?

According to the general idea, different development languages ​​apply to different functional development. For example, Java is suitable for the intermediate service layer and customer access layers under multi-layer application architecture, which played up in the B / S architecture, and the J2EE architecture is a good example. C / C is more suitable for the development of functional modules of the basic hierarchy, suitable for intermediate service layers in multi-layer application architecture, as well as active development, hardware management, network communication, etc. as preferred development languages. This is a good example of Windows, ACE, VXWORKS, etc. It can be seen that C / C is mainly facing, while Java is an application. Other languages, such as TCL suitable for automatic test script writing, etc., FORTRAN is suitable for accurate calculations.

In this case, if the scope of the application of different languages ​​is independent of each other, they can designed to a module design, and they can fully organize the above-oriented language. However, if different PLs, such as C / C , and Java in the same module, it is clear that the way the C / C can not meet the management requirements of Java code. Because Java's source code is not divided into H / SRC, only .java files.

In this case, the relationship between the folder hierarchical relationship between the submodule and the module is easy to confuse. In fact, I am confused, I can't write. My solution to this situation is still the module as the main division. Different languages ​​are divided in the most root modules. That is to say all the submodules in the same module are developed using the same PL.

转载请注明原文地址:https://www.9cbs.com/read-15013.html

New Post(0)