On May 25, the makers of Realm unveiled version 1.0 of their mobile database to the world.
"Today—13,949 commits and 6,148 closed issues later—we’re proud to release Realm 1.0," the blog post said, "a major milestone not only for Realm as a company and a product, but also for the iOS and Android developer communities that have embraced Realm."
For anyone not in the know, Realm is an object database for mobile app developers geared to run within phones, tablets and wearable tech. It is not an ORM, and it isn't built on top of SQLite. Instead, it uses native objects mapped to a database engine.
"This allows us to provide a simple API while even enhancing performance," according to Realm's overview of its product within the same post. "With Realm, you can model complex data, link objects in a graph, and compose advanced queries."
Speed and efficiency are cornerstones of what the team is trying to do. By making it an object database, rather than an ORM, it avoids any impedance mismatch. "This is also one of the reasons that we can provide lazy-loading for everything," said Christian Melchior, a member of Realm's Java team, in response to a few questions about Realm. "With ORMs, the API might look the same on the surface, but you usually run into problems when trying to access foreign collections."
As fellow Realm colleague Adam Fish put it in the same thread, "Relationships are first-class citizens."
Back in February, we featured a blog post by Alexander Prusak comparing Realm, SQLite, and Core Data. Each tool has its strong points, but Prusak praised Realm's adaptability and efficiency. "If you are designing an app with a lot of records and for a large number of users, you need to pay special attention to scalability from the very beginning," he said. "Realm is great at this and it allows you to handle a lot of data fast."
On the downside, while most of the code is available on GitHub, Realm's internal storage engine is closed source. According to the company's literature, they're working on opening it up under the Apache 2.0 license, but it's still in progress. "In the meantime," the FAQ reads, "its binary releases are made available under the Realm Core (TightDB) Binary License."
The Spice of Life
What started as an Objective-C offering (with the docs for those interested) for iOS and Mac developers quickly exploded into something more. The team later added Swift support to the Objective-C repository (though with its own set of documentation—the platforms aren't interchangeable) as well as Android support (with docs).
In March, Realm released the code for Realm React Native—Android and iOS alike—and the team is considering supporting Cordova/PhoneGap/Ionic and Node.js (V8). Meanwhile, they've been working with their Xamarin version since December. Right now, it only supports Xamarin.iOS and Xamarin.Android, but Xamarin.Mac, Unity, and UWP accessibility are in the pipeline for a future release.