Project access method
The modularized project access method addresses code management complexity in large software projects by dividing programs into modules, using event-driven interactions, and managing repositories, resulting in efficient code reuse and improved collaboration.
Patent Information
- Application Number
- CN202411251407.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-07
- Publication Date
- 2024-12-13
AI Technical Summary
Large-scale software projects face challenges in code management complexity, resource waste due to duplicate development, and increased maintenance costs, along with inconsistencies and incompatibilities among different teams and modules.
The project access method involves modularizing the program into functional modules, using event-driven interactions, creating separate repositories on GitHub, setting permissions, and integrating modules through a Git repository management tool to manage and organize code effectively.
This approach simplifies code management, reduces redundancy, enhances maintainability, and improves scalability, security, and collaboration efficiency by ensuring clear module interactions and resource sharing.
Smart Images

Figure CN119127291A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of technology integration, and more specifically, to a project access method. Background Art
[0002] In the field of software engineering, with the continuous advancement of technology and the continuous development of projects, we often encounter situations where the program is large in scale and involves many people. In this case, code management becomes crucial, but also becomes more complex and difficult. Large software projects usually contain millions to billions of lines of code, covering various functions and modules. As the amount of code increases, the complexity of managing the code also increases. There are many people involved in the development of large projects, involving multiple teams and departments. Different teams also have different workflows, development habits and communication methods. In an environment where large projects have long development cycles and frequent iterative updates, code management needs to be combined with project planning and scheduling.
[0003] Different programs contain many identical or similar functions and capabilities. When each program develops these functions separately, it will lead to a waste of human resources and code redundancy. Avoiding duplicate development has also been a long-standing challenge, which not only increases the size of the code base, but also increases the complexity and maintenance cost of the code. When the function needs to be modified or expanded, corresponding changes need to be made in each program, which increases the risk and workload of the modification. At the same time, duplicate development may also lead to inconsistencies between codes and incompatibility of functions, which poses a hidden danger to the overall stability and reliability of the project. Summary of the invention
[0004] The present invention aims at the technical problems existing in the prior art and provides a project access method to solve the problems raised in the above background technology.
[0005] The technical solution of the present invention to solve the above technical problem is as follows: a project access method, comprising the following steps:
[0006] S101. Divide the entire program into modules according to the similarity, relevance and independence of functions, use event-driven methods to realize the interaction of functional modules through interfaces, create a code framework for the main project to overall manage and organize various functional modules;
[0007] S102. Create a new program repository on GitHub to store the code of the main project, create a new function repository for each function module to store the code of its own function module, and link the function repository to the program repository in a submodule manner to achieve code reuse and management;
[0008] S103. Use the Git repository management tool to set read-only permissions and read-write permissions in each functional repository, clone the program repository and function repository containing the submodule to the local environment and create a new function branch, and integrate the functions provided by the submodule into the program;
[0009] S104. Configure the program running configuration items, build the project running program display, and test the functional operation by inputting and interacting with the program;
[0010] In a preferred embodiment, in S101, the entire program is divided into modules according to the similarity, correlation and independence of functions, the interfaces and communication methods of the functional modules are defined through the dependencies between the divided functional modules, the functional modules are interacted through the interfaces using an event-driven method, the interface specifications are designed, and the interface documents are written to describe in detail the functions, input and output parameters and exception handling information of each interface.
[0011] Furthermore, create a code framework for the main project, create a configuration file in the config folder, write a startup script in the scripts folder, store shared resources in the resources folder, and create a code directory for the functional module in the modules folder.
[0012] In a preferred embodiment, in S102, a new program repository is created on GitHub to store the code of the main project, and the code framework of the original main project is uploaded to the program repository. For each functional module, a new function repository is created to store the code of its own function module. The code of the corresponding function module is split from the main project and uploaded to the corresponding function repository. The function repository is linked to the program repository in the form of sub-modules to realize code reuse and management. The program repository is linked to the function repository to call the functions and classes provided by the function module to realize the mutual calling and interaction between the main program and the function module. The main program reference is updated by modifying the configuration and code of the main project, access and modification permissions are set for the program repository and each function repository, and assistance specifications are established. An independent deployment process is set to independently develop and deploy each function repository without relying on the main project.
[0013] In a preferred embodiment, in S103, the Git repository management tool is used to set read-only permissions and read-write permissions in each functional repository, and a permission management plug-in is used to implement permission control for specific developers and limit read and write permissions for sub-modules. By assigning development tasks and permissions, it is stipulated that specific developers can only access and modify the modules they are responsible for.
[0014] Furthermore, clone the program repository and function repository containing the submodules to the local environment and create a new function branch. Use the cd command to enter the directory of the submodule and switch the repository in the local environment to the function branch. Add the changes to the staging area and submit them to the function branch. After completing the development work, push the function branch to the remote repository immediately.
[0015] Furthermore, a command to obtain the latest functional branch code is executed in the main project and the submodule is pulled, and the functions provided by the submodule are integrated into the program. During the integration process, the document recording the selected submodule functions and integration methods is updated at the same time.
[0016] In a preferred embodiment, in S104, the program running configuration items are configured, the port number and running address are specified through command line parameters and the program is started, the running address and port number of the program are entered through the address bar of the web browser for access, the browser sends a request to the running address of the program and waits for the program to respond to load the page content, build a project to run the program display, and test the functional operation through input and program interaction.
[0017] The beneficial effects of the present invention are as follows: by modularizing the entire program, the program structure is clear, easy to maintain and expand; the interaction between functional modules is realized by event-driven method, which helps to reduce the coupling between modules and improve the flexibility and scalability of the system; by creating a code framework for the main project, a standardized process and specification are provided for the management and deployment of the entire project, and various resource files used in the project are effectively managed and shared, which improves the reuse rate of resources and the overall organization, improves the maintainability, scalability and reusability of the project, speeds up the development, and reduces the development cost; by creating a program warehouse and a function warehouse, the independence of each functional module is ensured, which facilitates the division of labor and cooperation among team members and improves the development efficiency Efficiency and code quality. By linking the program warehouse with the function warehouse, the main program and the function modules can be called and interacted with each other, which improves the scalability and flexibility of the code. By modifying the configuration of the main project and updating the code, the main program reference can respond to the changes and updates of the function modules in a timely manner. By setting the permission control mechanism of read-only and read-write permissions, the security and confidentiality of the code can be ensured to avoid unauthorized modification and access, and the standardization and controllability of code management can be improved. By allocating development tasks and permissions, conflicts and misoperations among specific developers can be reduced. By including the program warehouse and function warehouse of sub-modules and creating new function branches, the traceability and traceability of code modifications can be guaranteed, and the efficiency of team collaboration and the transparency of code management can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flow chart of the method of the present invention; DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0020] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0021] In the description of the present application, the term "for example" is used to mean "used as an example, illustration or description". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details to obscure the description of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0022] This embodiment provides Figure 1 A project access method is shown, which specifically includes the following steps:
[0023] S101. Divide the entire program into modules according to the similarity, relevance and independence of functions, use event-driven methods to realize the interaction of functional modules through interfaces, create a code framework for the main project to overall manage and organize various functional modules;
[0024] Furthermore, the entire program is divided into modules according to the similarity, correlation and independence of the functions. The similarity of the functions means that they have the same logic and operation flow in program implementation, and they are divided into the same functional module. The correlation of the functions means that they share the same code data and implement the functions together in program implementation, and they are divided into the same functional module. The independence of the functions means that they independently complete the functional tasks in program implementation and do not rely on other functional modules, and they are divided into an independent functional module. The interfaces and communication methods of the functional modules are defined through the dependencies between the divided functional modules. The event-driven method is used to realize the interaction of the functional modules through the interface. For service calls between different functional modules, including input and output parameters and interface functions, the interface specification is designed, including the name of the interface function, parameter type and return type. The interface document is written to describe the function of each interface, input and output parameters and exception handling information in detail.
[0025] Furthermore, create a code framework for the main project, create configuration files in the config folder, including system configuration, database configuration, and log configuration, write a startup script in the scripts folder to start the main project, store shared resources in the resources folder, and create a code directory for the functional module in the modules folder.
[0026] S102. Create a new program repository on GitHub to store the code of the main project, create a new function repository for each function module to store the code of its own function module, and link the function repository to the program repository in a submodule manner to achieve code reuse and management;
[0027] Furthermore, a new program repository is created on GitHub to store the code of the main project, and the code framework of the original main project is uploaded to the program repository. For each functional module, a new function repository is created to store the code of its own function module. The code of the corresponding function module is split from the main project and uploaded to the corresponding function repository. The function repository is linked to the program repository in the form of sub-modules to realize code reuse and management. The specific steps are as follows: add sub-modules to the program repository through the command line and initialize and update the sub-modules, enter the sub-module directory and execute the git pull command to pull the latest code, and submit modifications to the program repository, link the program repository through the function repository to call the functions and classes provided by the function module to realize the mutual call and interaction between the main program and the function module, update the main program reference by modifying the configuration and code of the main project, set access and modification permissions for the program repository and each function repository, and establish assistance specifications, including code submission process, branch management strategy, and set up an independent deployment process to develop and deploy each function repository independently without relying on the main project.
[0028] S103. Use the Git repository management tool to set read-only permissions and read-write permissions in each functional repository, clone the program repository and function repository containing the submodule to the local environment and create a new function branch, and integrate the functions provided by the submodule into the program;
[0029] Furthermore, the Git repository management tool is used to set read-only permissions and read-write permissions in each functional repository, and the permission management plug-in is used to implement permission control for specific developers and limit read-write permissions for sub-modules. By assigning development tasks and permissions, specific developers can only access and modify the modules they are responsible for, which is used to avoid permission leakage and code confusion.
[0030] Furthermore, clone the program repository and function repository containing the submodules to the local environment and create a new function branch for developing new functions and specific modifications. Use the cd command to enter the directory of the submodule and switch the repository in the local environment to the function branch. Add the changes to the staging area and submit them to the function branch. The changes include code modifications, adding new functions, and fixing bugs. After completing the development work, push the function branch to the remote repository immediately.
[0031] Furthermore, a command to obtain the latest functional branch code is executed in the main project and the sub-module is pulled, and the functions provided by the sub-module are integrated into the program to flexibly implement the program's ability to select sub-modules on demand. During the integration process, the documents recording the selected sub-module functions and integration methods are also updated.
[0032] S104. Configure the program running configuration items, build the project running program display, and test the functional operation by inputting and interacting with the program;
[0033] Furthermore, configure the program running configuration items, including the port number and running address, specify the port number and running address through command line parameters and start the program, enter the program's running address and port number through the address bar of the web browser to access it, the specific format is: http: / / IP address:port number, the browser sends a request to the running address where the program is located and waits for the program to respond to load the page content, build the project to run the program display, and test the functional operation through input and interaction with the program.
[0034] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0035] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0036] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0037] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0038] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0039] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0040] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A project access method, It is characterized in that The specific steps include: S101. Divide the entire program into modules according to the similarity, relevance and independence of functions, use event-driven methods to realize the interaction of functional modules through interfaces, create a code framework for the main project to overall manage and organize various functional modules; S102. Create a new program repository on GitHub to store the code of the main project, create a new function repository for each function module to store the code of its own function module, and link the function repository to the program repository in a submodule manner to achieve code reuse and management; S103. Use the Git repository management tool to set read-only permissions and read-write permissions in each functional repository, clone the program repository and function repository containing the submodule to the local environment and create a new function branch, and integrate the functions provided by the submodule into the program; S104. Configure program running configuration items, build project running program display, and test the functional operation through input and program interaction.
2. A project access method according to claim 1, Features: In S101, the entire program is divided into modules according to the similarity, correlation and independence of functions, and the interaction of functional modules is realized through interfaces in an event-driven manner. Interface documents are written to describe the function, input and output parameters and exception handling information of each interface in detail, and a code framework of the main project is created to overall manage and organize various functional modules.
3. A project access method according to claim 2, Features: The specific steps of creating the code framework of the main project, overall management and organization of each functional module are: creating the code framework of the main project, creating a configuration file in the config folder directory, writing a startup script in the scripts folder directory, storing shared resources in the resources folder directory and creating a code directory for the functional module in the modules folder directory.
4. A project access method according to claim 1, Features: In S102, a new program repository is created on GitHub to store the code of the main project, and a new function repository is created for each functional module to store the code of its own functional module. The code of the corresponding functional module is split from the main project and uploaded to the corresponding function repository, and the function repository is linked to the program repository in the form of sub-modules to achieve code reuse and management.
5. A project access method according to claim 4, Features: The function warehouse is linked to the program warehouse, in which the functions and classes provided by the function modules are called to realize the mutual calling and interaction between the main program and the function modules. The main program reference is updated by modifying the configuration and code of the main project, and access modification permissions are set for the program warehouse and each function warehouse. Assistance specifications are established, and an independent deployment process is set to develop and deploy each function warehouse independently without relying on the main project.
6. A project access method according to claim 1, Features: In S103, the Git repository management tool is used to set read-only permissions and read-write permissions in each functional repository, and a permission management plug-in is used to implement permission control for specific developers and limit read-write permissions for sub-modules. By assigning development tasks and permissions, it is stipulated that specific developers can only access and modify the modules they are responsible for, clone the program repository and function repository containing sub-modules to the local environment, and create a new functional branch.
7. A project access method according to claim 6, Features: In the process of cloning the program repository and function repository containing submodules to the local environment and creating a new function branch, use the cd command to enter the directory of the submodule and switch the repository in the local environment to the function branch, add the changes to the temporary storage area and submit them to the function branch, and push the function branch to the remote repository immediately after completing the development work.
8. A project access method according to claim 1, Features: In S103, a command for obtaining the latest functional branch code is executed in the main project and the submodule is pulled, and the functions provided by the submodule are integrated into the program. During the integration process, the document recording the selected submodule functions and the integration method is updated simultaneously.
9. A project access method according to claim 1, Features: In S04, the program running configuration items are configured, the port number and running address are specified through command line parameters and the program is started, and the program running address and port number are entered through the address bar of the web browser for access, which is used to build a project running program display.
10. A project access method according to claim 9, Features: The specific format of the running address and port number of the input program is: http: / / IP address:port number.
