Skip to content

feat: FirebaseObservableMap #539

@jpventura

Description

@jpventura

I was not sure if I should PR this feature or discuss here first.

ObservableMap as a facade to event listeners

Basically I would like to know if we could provide a feature for hide read and write operations behind an ObservableMap. So all we would have to do to access data would be:

// Remote updates immediately send you your view
map.addOnMapChangedCallback(mUserChangedCallback);

// Non blocking operation to update database
Task<User> task = map.create(user);

// Local up-to-date cache
User user = map.get(primaryKey);

Relevant Code:

A detailed description is available at Stack Overflow and a working code at my repository fork.

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