Hi, I’m a novice/junior developer and I’m trying to develop a desktop app and android app. Both should connect to the same db that I’m hosting in MongoDB Atlas. It’s for a college project, essentially, and I’d be using the free tier. I have some experience with MongoDB Atlas, and it seems like the best deal considering I can’t pay.
So I have a model of Java objects to match the elements of the collections and whatnot. I have experience doing this interacting with Atlas directly in Java desktop apps. I’ve added a lot of functionality to all the classes and heavily tested them.
However it seems that the API for interacting with such elements in mobile devices (the Realm stuff) is completely different. They require things from your model classes like usage of special annotations, extending RealmObject and other stuff that would be irrelevant for the model in the desktop application.
And as far as I know the Java SDK doesn’t work in Android, so using this “Realm” feature would be the way to go right?
I’m just wondering if anyone could give me some rough guide, tip or resource to try to solve this conundrum that I’m presenting since this has been frustrating me for days now. I’d rather not have to maintain two versions of the same code.
Any help will be hugely appreciated!