How do their APIs compare?
How do their APIs compare?
About realm/realm-java · 2 messages · last activity 9/8/2026
Comparing "APIs" across these two projects is a bit apples-to-oranges since they serve very different purposes — one is a mobile database SDK, the other is a YouTube client app — but here's how they compare based on what's in the retrieved data:
realm/realm-java: a public library API
Realm-java exposes a deliberate, documented public API meant for third-party app developers to build on. This is evident from:
- Formal Javadoc conventions enforced via contribution guidelines — every public class/method needs Javadoc with specific rules for
@param,@throws,@deprecated,@see, verb-phrase descriptions, etc. [CONTRIBUTING.md:L153-L196] - Annotation-driven schema API — things like
@Indexfor marking searchable fields [realm-annotations/src/main/java/io/realm/annotations/Index.java:L1-L35] andRealmNamingPolicyfor controlling how Java field names map to internal Realm file names (with policies likeCAMEL_CASE,PASCAL_CASE,LOWER_CASE_WITH_UNDERSCORES) [realm-annotations/src/main/java/io/realm/annotations/RealmNamingPolicy.java:L81-L120, realm/realm-annotations-processor/src/main/java/io/realm/processor/Utils.kt:L556-L595]. - Kotlin extension functions layered on top of the core Java API to give idiomatic Kotlin call sites, e.g.
RealmQuery<T>.oneOf(...)which wraps the underlyingin(...)query method [realm/kotlin-extensions/src/main/kotlin/io/realm/kotlin/RealmQueryExtensions.kt:L1-L40]. - An annotation processor (
TypeMirrors.kt,Utils.kt) that generates proxy classes and interfaces from model classes at compile time, which is how Realm turns plain Java/Kotlin objects into persisted, queryable database objects [realm/realm-annotations-processor/src/main/java/io/realm/processor/TypeMirrors.kt:L1-L33].
This is a classic SDK-style API surface: stable, versioned, documented, annotation-based, with compile-time code generation and query builders (RealmQuery) as the primary interaction points for consumers.
yuliskov/smarttube: internal app-only interfaces
Smarttube's "APIs" in the retrieved data are internal application interfaces, not public library contracts meant for external consumption:
SearchTagsProvider— a small internal callback interface for search-tag lookups, with aResultsCallbackfor async results [common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/search/SearchTagsProvider.java:L7-L13], implemented byMediaServiceSearchTagProviderwhich wraps an RxJavaObservable-based content service [common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/search/MediaServiceSearchTagProvider.java:L13-L41].Videomodel class with customequals/hashCodelogic tailored to UI adapter behavior (e.g. avoiding duplicate list items) rather than general-purpose correctness [common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/data/Video.java:L236-L275], plus mutation-stylesync(...)methods that merge in fresh metadata from YouTube responses [common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/data/Video.java:L716-L755].- Error-handling logic embedded directly in a playback controller (
ErrorFixerController) that pattern-matches on raw HTTP-style error strings ("Response code: 429", "Exception in CronetUrlRequest", etc.) to decide runtime remediation like disabling subtitles or switching data sources [common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/playback/controllers/ErrorFixerController.java:L142-L181]. - The app also communicates with external third-party services (SponsorBlock, DeArrow, Return YouTube Dislike) as documented in its privacy policy, but these are consumed, not exposed, by the app [PRIVACY.md:L21-L26].
Key differences
| Aspect | real
Want to ask your own question?
Open chat for realm/realm-javaPublic Q&A. Generated by RepoPilot from the actual source of realm/realm-java. AI answers can be incomplete or stale — verify before relying on them.