Design RealmObject interface

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: API design
    • None

      In the Compiler Plugin we right now use the `@RealmObject` annotation, but we need to figure out exactly what the API for working with Realm Objects should look like.

      In Realm Java we have both an abstract RealmObject super class and a RealmModel marker interface. 

      With default methods on interfaces we can probably get away with just an interface for Kotlin/Java 8, but we need to figure out the exact semantics.

       

      QUESTIONS / TODO

      • How should a Realm Object be identifier?
      • What about DynamicRealmObject / Embedded Objects?
      • Interface default methods have some limitations, ie. we cannot have "default properties". Figure out exactly what is possible.
      • If we don't have a state on the marker interface, how would people access it?
      • How do people register observers on objects?
      • Writeup design doc with pros/cons for different solutions

            Assignee:
            Claus Rørbech (Inactive)
            Reporter:
            Christian Melchior (Inactive)
            Archiver:
            Marc Greenfield

              Created:
              Updated:
              Resolved:
              Archived: