A friend who has studied software engineering should know that a reasonable software architecture is very advantageous for later maintenance and new function addition. I am very interested in studying the Windows architecture and want to practice it myself. But unfortunately, I don't have any big software code to study. To tell the truth, even if there is, maybe I don't have time to study it.
I had to use a small software I wrote before for transformation. The earliest versions of the software were not clear (I have already written more than 20 versions ). You may think this is unnecessary for a small software, but it is just a test. In the future, this architecture can also be used for larger software. You need to know that the system structure is very important for large software, and a reasonable structure will save a lot of work.
Let's briefly introduce my transformation objects. Aoouchware (r) date convert can be used to modify the file creation time, modification time, and access time, and supports batch modification. You can track system time in real time. This software is written based on microdoft. NET technology. For normal use, you must first install Microsoft. NET Framework Version 1.0 or later.
From the figure below, we can see that in SP2, the shell layer and the management layer are separated, but the first two layers of the release version are the same. So I started to transform it from the SP1 version. It was not easy to define it as a whole two levels completely separated, so I divided it into two steps. The SP1 version is a half-modified thing. The above two layers are not completely separated, but the text information in each module is extracted into a file named notify. dll. This architecture is not perfect. Now my version has basically implemented the architecture in my mind, although the optimization of the memory should be placed in the next version (the memory usage of the. NET program is too large ).
Let's briefly talk about my research achievements. In fact, it is the research result, but it turns some ideas in my mind into reality.
My ideas: My goal is to divide it into three layers: shell layer, manage layer, and kernel layer ). The shell layer mainly includes notify. dll and ushell. dll, which are directly accessible to users. Any changes they make have no direct impact on software functions. Management is mainly implemented by the main program. The main program does not have any code that can perform substantive work. It only provides the interface management function to effectively link the upper and lower layers. In this way, even if you want to update the lower-Layer Code or interface, the user layer will not be involved, that is, the size of the software update package will not be very large. The core layer consists of two parts: Environment Monitoring (Environment), including envirchk. DLL, verrep. DLL, these two modules mainly implement file version management and environment variable management. If the user leaves a file that does not belong to the current version during the update, the program will not run. The execution module of software functions, including fileevt. dll and timechkr. dll, will not be introduced much.
Specific functions of each module:
- Notify. dll is used to store text information on the user interface. It can also be called by other modules to send a prompt. This also facilitates the development of multilingual programs.
- Ushell. dll is part of the interface. The interface of the main program is inherited from this file. In this way, the skin replacement function is realized.
- Datecov. dll is the main program, which implements the connection and Management of the upper and lower layers.
- The envirchk. dll module is used to detect environment variables and manage versions. Unreasonable variables cannot be referenced. A version with the same error will make the program unable to run.
- Verrep. dll is used to return the correct version number of each module.
- Fileevt. dll is used to call the open file (folder) dialog box and execute changes to the file.
- Timechkr. dll can return the current system time and implement standard detection of user input time to avoid many unnecessary errors.
Date convert + SP2: http://free.efile.com.cn/aoouch/AoouchWare/DCSP2/DCSetup_CHS.exe
Pluspack for SP2: http://free.efile.com.cn/aoouch/AoouchWare/DCSP2/DCPSetup_CHS.EXE
About software download: the installation package I released is green. If you are not at ease, use WinRAR to solve it. I will not provide the installation package in the English version. If you want to use the English version, you can download pluspack.