How to make Patch-able/Update-able application?

喜欢而已 提交于 2020-01-04 03:58:09

问题


I have completed a student project, this project extract data from xml files on internet and save to database and displays it. And i use that data in a few different ways e.g. display on main page, in another tab as a table, and to create some graphs.

I did all this by making 5 different classes. Each class extracts different type of XML and save it to database with a single Load() function.

Last requirement of the project is to make the application Update-able/Patch-able (user does not need to download the whole new build to update the application, instead a small patch installer will add feature to application). How do i do that? My teacher says that adding polymorphism will help, a friend says that create different modules of application (break it into parts) so that each class will have its own dll.

What steps i need to do to make it patch-able? How to create dll of classes? how to break application into parts? Or all of this is unnecessary, i should just use a patching software that creates a patch by comparing both builds??


回答1:


What you will want to do is follow the steps below:

  1. Create new class projects in your solution, 1 for each of the classes you have.
  2. Add a reference to your main project, 1 for each new project you created.
  3. At this point everything should compile and like Henk said, if you don't change the public part of the assemblies, everything should be fine.

If you want to go a step further though, create a new interface and have the interface implement the methods in your classes. Have all your classes implement this interface. As long as the interface doesn't change, you can change anything you want about the assemblies and classes (as long as your classes keep implementing the interface)



来源:https://stackoverflow.com/questions/3207792/how-to-make-patch-able-update-able-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!