• Stars
    star
    226
  • Rank 176,514 (Top 4 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Movie searching using a Unidirectional State Flow pattern for Android

Movie search using a unidirectional state flow pattern

This is an attempt at coming up with a unidirectional state flow pattern that uses the concepts of patterns like Redux, Cycle.js, MVI etc.

Many of my contemporaries have already done amazing work in this area and I've drawn a lot of lessons and learnings from their work already:

I wanted to achieve the benefits of this pattern without introducing any new libraries or a new framework. How would one familiar with an MVVM model today leverage the principles/benefits of a unidirectional state/data flow? I hope to demo those concepts with this app.

usf_animation.gif "picture showing the USF animation"

The app is a simple movie search app. Clicking the movie result populates a history list. While this is not an extremely complex app, it isn't a silly Hello World one either, so the hope is that it'll cover regular use cases for a basic application.

I've also started meaninful test cases in the repo.

Setting up your OMDB API KEY

We use the wonderful OMDB api to fetch movie information.

There are quotas on this api, so please don't use mine :)

  1. Get an api key for OMDB here
  2. Add it to you local.properties file (which shouldn't be checked in to a VCS) like so:
# local.properties
OMDB_API_KEY="<API_KEY_GOES_HERE>"

For great movie recommendations, ping me @kau.sh (seriously, I watch a lot of movies).

I gave a talk at MBLT}Dev 2018 on how I went about building this app. Slides can be found here.

Getting Started

This project now uses ksp to reduce the boilerplate in wiring up a new feature. This PR has the details for how this change was made.

All that's needed is writing the implementation of your ViewModel so MyFeatureViewModelImpl: UsfViewModelImpl<E, R, VS, VE> and adding the @UsfViewModel annotation. Your ViewModel boilerplate code will be auto-generated.

Take a look at MSMovieViewModelImpl for the View Model logic and MSMovieActivity to see how the viewModel is invoked.

iOS app

I gave another talk at Mobilization IX showing how we can use the same concepts on iOS too and wrote my first iOS app to demonstrate these concepts - You can check that out here.

More Repositories

1

RxJava-Android-Samples

Learning RxJava for Android by example
Java
7,557
star
2

why_bump_android_minsdk

Why you should bump your Android app minsdk?
222
star
3

san-jose-theme

A custom Terminal & IntelliJ theme (inspired by PatMurrayDEV -> Apple's WWDC 2017 session slides)
63
star
4

jetbrains_env

Jetbrains (mostly Android Studio) customizations
40
star
5

henry-hugo

Henry: Hugo theme meant for a gorgeous reading experience and packed with features
SCSS
36
star
6

km-macros

KG's Keyboard Maestro Macros
Shell
28
star
7

henry-jekyll

Henry: Jekyll theme meant for a gorgeous reading experience and packed with features
SCSS
27
star
8

rem

Remme - No nonsense handling of your todos
Java
26
star
9

movies-usf-ios

Movie searching using a Unidirectional State Flow pattern for iOS
Swift
15
star
10

CoreTextUtils

Java
14
star
11

kotlin-scripts

some handy scripting using kotlin
Kotlin
11
star
12

RxJs-Web-Samples

RxJs samples very similar to RxJava-Android-Samples
JavaScript
7
star
13

CountdownApp

A simple countdown app
Java
4
star
14

xcode-11-theme

Custom dark and light themes similar to XCode 11
3
star
15

kg_alfred_extensions

KG's Alfred Extensions
3
star
16

tootbot

🐘 auto-toot bot to Mastodon. Parses a Json blog feed and posts to Mastodon saving status to a csv file.
Kotlin
3
star
17

Android-Retrolambda

All the goodness of J8 Lambdas now on Android (courtesy: retrolambda)
Groovy
3
star
18

octopress-kaush-blog

Kaushik Gopal's Personal Blog
CSS
3
star
19

firefox-userchrome

My userChrome.css
CSS
2
star
20

jekyll-docker-blog-deploy

Docker Image for "deploying" my jekyll blog - blog.jkl.gg
Ruby
2
star
21

Android-ImageCarousel

Android library project that makes it super simple to display a bunch of pictures from your app
Java
2
star
22

rxjava_runner

an RxJava command line helper
Java
2
star
23

Android-IcoButton

Custom view for Android that gives sensible easy buttons
Java
2
star
24

dotfiles

minimal dotfiles
Shell
1
star
25

cmusv_craft

http://journal.kaush.co/software-craftsmanship.html
Ruby
1
star
26

jekyll-docker-blog-build

Docker Image for deploying my jekyll blog - blog.jkl.gg
Dockerfile
1
star
27

try_git

1
star
28

playground-android

Template app that I use as a starting point for dependencies and clean linking/setup
Kotlin
1
star