I am trying to simulate some of our objects in our domain and have encountered the problem that some of these objects may be versioned. Those. the user can create new versions of objects within a certain period of time. So, I need to simulate them in a program. I think this is a common problem in software design.
At first, I jumped to the idea of imitating the concepts of source code version control and proposed the concept and methods of a versioned object, such as registration, verification, etc. But I feel that this is not entirely “systematic” as I did. investigate patterns (i.e. I feel that I am committing sins as
- I did not cover aspects such as finding more than one solution.
- studying literature that would give me more reliable links, etc.).
So, my current problem is that for systematic modeling, I need to look for patterns that solve the problem of versioning, preferably in the literature. And take the best of it, of course.
So, I googled for such templates and found only the Temporal Object template. But I was not sure if this was really what I wanted. Do you guys have any suggestions on such schemes?
[Self-Edit] Maybe I did not describe the problem well. You may see a problem similar to the version control problem of the version control file. I have several types of objects (stored in a database) that can have several versions. Inside my application, I have to process all these versions, and I also have to create new versions of objects (which will ultimately be stored in the database). I look forward to some cited template with which I can model the interfaces for accessing / modifying / adding new versions for these objects. The basic interface I could come up with is IVersionedObject with methods like checkout, checkin, undoCheckout, etc. But this is my own idea of monitoring version control systems. I do not think this is a SW design pattern per se. So, we are waiting for a few well-documented design patterns for the above problem.
source share