Please login or sign up to post and edit reviews.
155: Naming conventions for RxJava Observables
Publisher |
Spec
Media Type |
audio
Categories Via RSS |
Education, 
Technology
Publication Date |
Mar 11, 2019
Episode Duration |
00:21:27

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
// yuck

// option 2
fun user(): Observable
// but what does this mean?

// option 3
fun user(): Single
fun userUpdates(): Observable
// or
fun userStream(): Observable
// this is looking good

// option 4 (upday style)
fun userOnce(): Single
fun userStream(): Observable
fun userOnceAndStream(): Observable

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

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.

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
// yuck

// option 2
fun user(): Observable
// but what does this mean?

// option 3
fun user(): Single
fun userUpdates(): Observable
// or
fun userStream(): Observable
// this is looking good

// option 4 (upday style)
fun userOnce(): Single
fun userStream(): Observable
fun userOnceAndStream(): Observable

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

This episode currently has no reviews.

Submit Review
This episode could use a review!

This episode could use a review! Have anything to say about it? Share your thoughts using the button below.

Submit Review