Easy way to create a save/load functionality to an Application
-
Hello, I made a pretty complex application, and I want to know if there is any simple ways to create a save/load functionality. I tried serializing the entire app, but of course that does not work :) Any other methods that don't involve to much time to do this ? Thank you PS: It's a very quick school project, and I made the app pretty complex, with tab controls that have tab pages that contain different user controls ..etc.. It would take to long to take every control one at a time and save it.
-
Hello, I made a pretty complex application, and I want to know if there is any simple ways to create a save/load functionality. I tried serializing the entire app, but of course that does not work :) Any other methods that don't involve to much time to do this ? Thank you PS: It's a very quick school project, and I made the app pretty complex, with tab controls that have tab pages that contain different user controls ..etc.. It would take to long to take every control one at a time and save it.
There is no "easy" way to do this without proper planning. This should have been one of your first requirements, since it will have a large impact on your data model. What is that, you say?? Well, it's the classes that hold the data that your business logic manipulates. The business logic is told what operations to do on the data by other parts of the business logic, but is ultimately driven by the user interface. So, if all your data is encapulated by some properly designed classes, serializing it to a file or some other data store becomes a trivial matter. Since the hair on the back of my neck says you're likely storing some of the data in "global" variables, some in your user controls, and some in some other things, like arrays, it's going to be pretty good chore to straighten all this out so you can save/load the data.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008