Here we will talk about the deployment scheme of openexpressapp. Clickonce is used as the implementation solution: Smart deployment and Smart Clients. However, the usage here is not the same as in the past ......
Deployment Overview
In openexpressapp, the interface is automatically generated. Applications developed by framework usersProgram(Hereinafter referred to as the customer Program), you only need to write your own business logic model class according to the specific format conventions, and then publish it with the framework, you can directly run and display all the interfaces, in this way, large granularity can be reused.
In other words, when the framework is used by the Framework, the file folder with the application .exe and. DLL files is displayed, and they can only add their own files in the library and module folders.Business Model Library DLL. In this way, the Framework automatically loads the specified DLL and runs the business logic of the client program after it starts running. (The module folder in is also a similar function. When framework users want to expand the interface function, they need to place their own interface module here .)
Although not all applications are suitable for this mode, in some Windows programs that do not require flexible interfaces, such large-granularity reuse is indeed a good way to improve development efficiency. :)
Other problems
Because clickonce is used to implement the Smart Client, every time we release the frameworkBusiness Model Library DLLProgram. People who have used clickonce will know that the generated folder contains two files with the. Application and. manifest extensions. The file stores the list of all published files and Their hash values (there will be signature information, but it is not used in the framework currently .), This prevents malicious tampering with published programs.
That is to say, framework users cannot directly copy their own business logic class DLL into a folder and publish it to IIS together with the framework for automatic upgrade.
Solution
Framework users can use the tool manifestmanagerutility.exe to modify the. Application file generated after the release, and add the client program DLL to the list. And then publish it under IIS.
You can add a new file reference in the red box in the figure. In this tool, you can also modify other attributes in the application file, such as the server URL.
In this way, although the program can be successfully released, it cannot be "intelligent ". Because manifestmanagerutility calculates the new hash value this time and changes the. Application file. However, when the framework user updates the client program again, the client cannot obtain the updated DLL because the hash value also changes. In this way, you must repeat the above operation to modify the. Application file before normal release. This is certainly not a "smart upgrade ".
Therefore, we have written the versionadd.exe console program. After the client program is upgraded, the Framework user overwrites the upgraded DLL to the DLL of the previous version, and then calls this EXE to implement update. Then, the application file list can be automatically maintained and the clickonce version can be upgraded. You only need to write a simple script file to complete these releases. For example, we are currently developing the project gix4, which was originally released using finalbuilder. Now we have replaced it with a script file, autobuild. bat. Its main work is to update files from the server, compile, publish, mail notifications, etc ...... For example:
............ Other scripts ...............
Rem Update file
..................
Rem Compilation
..................
Increase in rem version
Versionadd.exe-FILENAME "D: \ publish \ Intranet \ openexpressapp. Host. WPF. Application"
Rem email notification to all testers
..................
............ Other scripts ............
Conclusion
Currently, the gix4 project we are developing uses the openexpressapp framework, so it is deployed with one click implemented by the above method. This is of great help for implementing daily building and improving the efficiency of development and testing.
RelatedArticleLink:
Openexpressapp architecture-an Information System Platform
Order example
Origin of the overall architecture
Essential knowledge for platform Learning
Code directory description
Application Model ApplicationModel
Built-in supported module types
Built-in support for Attribute editing
Built-in list editing
Understand the core element objectview
Autoui Automatic Generation Interface
Command Extension Mechanism