I am developing several iOS apps using Core Data, and it is a great environment to work with. However, I ran into a problem on which we more or less distributed objects (synchronized) on several platforms. Backend server and web server database and mobile devices.
Although this has not been a problem so far, the static nature of the data model used by Core Data has made me a bit stuck. Basically, a system of dynamic forms is requested, through which forms can be created on the server and distributed to devices. I know a technique for doing this with a given number of tables with something like:
- Table of forms
- Field table
- Form Instances Table
- Instance Value Table
and just put it all together. However, I am wondering if there is an alternative system for Core Data (something above that speaks directly to the SQLite database) that will allow the use of a more dynamic graph of objects. Even a standard ORM would be nice if there were options for changing the circuit at runtime. The main reason I want to go along this route is performance in the sense that I do not want the table of instance values ββto explode with records (on the local device or server).
Another option is to have a static diagram (object-graph) on iOS devices, but with a conversion level on the server side, which extracts the correct object, fills in the properties and saves them in the correct table. Then, when the devices are synchronized, he does the opposite and breaks it into instances. Although this saves the server from having a bloated table of instance values, it can still be a problem on the device.
Any suggestions are welcome.
source share