How to make Patch-able/Update-able application?
I have completed a student project, this project extract data from xml files o开发者_如何学Cn 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??
What you will want to do is follow the steps below:
- Create new class projects in your solution, 1 for each of the classes you have.
- Add a reference to your main project, 1 for each new project you created.
- 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)
精彩评论