Skip to content

[RFC] Android-centric package structure #65

@omo

Description

@omo

What if we have rx.android.views, rx.android.context... instead of r.a.observables r.a.observables, etc?

Currently we are forced to make some internal classes public just because they are under separate packages. If we have r.a.views for example, ViewObservable and depending operators can fit into the single package. This allows those internal classes to have package-local visibility, without blowing up the number of classes in a single package.

Also, I feel this is more scalable than existing package structure. As we turn various Android APIs into reactive style, each package will become more crowded and less structured. The Android-centric package hierarchy doesn’t have that problem. After all, what RxAndroid care is about Android, not generic Rx abstraction.

We can move some major classes including AndroidObservables to the top level packages (rx.android) for convenience. The class can be a facade to more focused classes. For example, bindActivity() could just wrap (hypothetical) ActivityObservable#bind().

Although I’m not that confident this works well, some variations of package structure is probably worth considering before 1.0 release. I’d like to hear what you think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions