menu

SpecFM

A network of designers and developers making the best podcasts, blogs, and resources for designers and developers.

Channels
# All channels
view-forward
# General
view-forward
# Assemble
view-forward
# Design
view-forward
# Design Details
view-forward
# Design Systems
view-forward
# Developer Tea
view-forward
# Does Not Compute
view-forward
# Fragmented
view-forward
# Framework
view-forward
# Immutable
view-forward
# inspect
view-forward
# Jobs
view-forward
# Layout
view-forward
# Music
view-forward
# Orthogonal
view-forward
# Programming
view-forward
# Reactpodcast
view-forward
# Research
view-forward
# Runtime
view-forward
# show-n-tell
view-forward
# Specifics
view-forward
# Swift Unwrapped
view-forward
# Toolsday
view-forward
# Typography
view-forward
Team

155: Naming conventions for RxJava Observables

March 12, 2019 at 3:24pm

155: Naming conventions for RxJava Observables

March 12, 2019 at 3:24pm
The Android community has come to use Rx pretty heavily but surprisingly there hasn't been any one convention that's won, when it comes to how we name our functions that return Observables. getUser(), user(), userUpdates() ? In this mini-episode dutifully does the yak-shaving for you and discusses what some options are and what the community has been gravitating towards.
Enjoy.

Shownotes

Upday's convention:

Options

// option 1
fun getUser(): Single<User>
// yuck
// option 2
fun user(): Observable<User>
// but what does this mean?
// option 3
fun user(): Single<User>
fun userUpdates(): Observable<User>
// or
fun userStream(): Observable<User>
// this is looking good
// option 4 (upday style)
fun userOnce(): Single<User>
fun userStream(): Observable<User>
fun userOnceAndStream(): Observable<User>
Stay tuned for a future episode, where we discuss more details and more complicated cases to handle (like emitting a list of user, policies for fetching the first user as quickly as possible etc.).
Also #FinishNotation.

Sponsors 🙏

Contact

No messages yet