OneGen is an innovative solution for designing and maintaining application data models. The whole ecosystem revolves around a simple idea: what if data models were not tied to a specific programming language or database?
Data models are objects that define the structure of your application data. Up until now, developers would most commonly write data models in the programming language (or database) of their choice.
The Old Way
Imagine you're developing a Reminder app for Android, you would start by defining models
Reminder in Kotlin as you're developing the app in Kotlin.
Now your app got popular, so you'd like to develop an iOS version. Amongst the things you would have
to code again, are the data models. The current ones are in Kotlin and your iOS app is using Swift.
But wait a minute, the data did not change. The reminders still hold the same information, i.e. reminder name,
date, etc. Now that's some repetitive work. You'd also have to connect the models to another
local database, write validation methods again, etc.
Maintaining the data models across platforms is as bad as the initial overhead. Imagine you want to
Category model to the Reminder app from above, or you may want to add a description
field to the
Reminder model. You'd have to coordinate and test both platforms separately and
that gets harder the bigger your team and the number of supported platforms are.
It's just a matter of time before bugs start crawling all over your models. The good news is, OneGen can prevent all of this.
The OneGen Way
With OneGen, you and your team design data models separately from the rest of your application. No code, just a comfortable interface that gives you a nice overview of your application's data structure.
Then, you just generate models for the platforms you'd like to support. Bringing back the Reminder app example from above,
we would design the
User models once and generate models for
both iOS and Android.
Maintenance with OneGen
OneGen is designed to be a part of your developer workflow. Reusing the Reminder app example, let's say
we want to let users categorize their reminders, so we'd probably need a
Category model. We
would simply create this model in our design module, which would instantly propagate
to both of our engines (Swift for iOS and Kotlin for Android).
Then, we'd commit our changes and with a click of a button instantly generate pull requests of the new models to our iOS and Android repositories. Last but not least, we would review and merge the pull requests.
Done! Our Reminder app now supports categories, and we don't have to worry about the inconsistency between two different platforms.