• Stars
    star
    1,119
  • Rank 41,531 (Top 0.9 %)
  • Language
    Java
  • Created over 8 years ago
  • Updated over 7 years ago

Reviews

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

Repository Details

An MVP Dribbble client for Android Mobile, Tablet, Wear and TV.

Bourbon

Build Status Android Arsenal ![Sidebar] (https://img.shields.io/badge/Sidebar-06%2F05%2F2016-orange.svg)

Get it on Google Play!

Bourbon Header

Bourbon is a simple Dribbble client built for Android Mobile, Wear and TV (it's also optimised for tablets). It was built as an experiment for sharing code through a common-code module when using an MVP architectural approach.

Structure


Bourbon uses a CoreCommon module to share code amongst the different application packages, you can see from the long list below that this allows us to re-use a lot of the code for our app! The CoreCommon modules contains:

  • BourbonApplication - This is a standard Android application class that I’ve simply re-used for each of the application modules. This essentially uses Dagger to set up our ApplicationComponent and Timber for logging purposes.

  • Data Models - Seeing as our application modules are all going to be displaying the same data, it makes sense for them to share the Data Models. There are only 4 (minimal) models used in the application (Shot, User, Comment, Image) but sharing them in this module makes it easier to maintain them if they change at any point.

  • DataManager - The DataManager class acts as a middle-man for communication with the BourbonService. Again, the application modules all access the same data so sharing the DataManager is just logical.

  • BourbonService - The BourbonService states the endpoints and manages the retrieval of data from them. So as above with the DataManager, the behaviour is the same across application modules.

  • Dagger Injection Components and Modules - Seeing as we now know our three application modules use the same DataManager, BourbonService etc - it only makes sense to also share the logic related to Dagger injection. If you look at the injection package, you’ll see that there are several classes declaring components and modules, meaning that the same dependancies can be injected across the applications.

  • Base Presenter and MvpView - Bourbon uses base classes for Presenters and MvpViews that should be used when created new classes of these kinds. For this purpose, using them through the CoreCommon module ensures that all classes are extending or implementing the same base classes - this again also reduces code duplication.

  • BrowseMvpView & BrowsePresenter - The Browse screen for each of our application modules behaves in exactly the same way. A list of shots is retrieved and that list if displayed to the user - however, showing / hiding progress indicators, making an API request and correctly displaying with any empty / error states to the user. This means that the Presenter classes will contain the same logic and the MvpView interfaces will define exactly the same interface methods. Fir this reason it makes sense for both the BrowseMvpView & BrowsePresenter to be kept in the CoreCommon module so that these classes only need to be defined once to be shared across our application modules.

  • ShotMvpView & ShotPresenter - The same applies to the screens used to display Shot Details. The class and interface used to handle the display of content on the screen, so we share the ShotMvpView and ShotPresenter through the CoreCommon module.

  • Colors, String & Dimension files - Bourbon has specific branding colors, so this isn’t going to change across it’s applications modules. The same also goes for the Strings used throughout the application, there are also some Dimension values that also hold true to this. Because of this, I’ve placed these values in resource files in the CoreCommon module — meaning that they can be shared across the application modules. Now if any of these colors or Strings needs to be changed, I only have to do it once!

  • TestDataFactory - The TestDataFactory is a class used to construct dummy data models that are used in both the Unit and Instrumentation tests. For this purpose this class exists in the CoreCommon module, which is where the AndroidTestCommon module can access this class from.

  • Unit Tests - Because the classes requiring unit test are found in the CoreCommon module, the Unit Tests can also be found here. A separate package contains tests for the DataManager and Presenter classes defined in the CoreCommon module.

Features


You can read more about bourbon here, but here's a quick look at the current features of the application:

Browse Shots

The user can browse the latest 20 shots on their mobile, tablet, wear or TV device:

Browse Screenshots

On these screens, we also account for error states:

Error Screenshots

and lets not forget about empty states either:

Empty Screenshots

Shot Details & Comments

Upon selecting a shot the user can view a shots image alongside any comments for that shot, as shown below:

Detail Screenshots

Comments on Wear and TV are also displayed, just in a different manner due to the nature of the devices:

Comments Screenshots

Coming Soon

I wanted to write about and ship this once V1 was finished, but soon I plan on:

  • Implementing animations / motion events for transitioning views and screens
  • Add user profile screens
  • Pagination when browsing shots
  • And anything else I think of...

Requirements

  • Android SDK.
  • Android 5.0 (API 21) .
  • Android SDK Tools
  • Android SDK Build tools 23.0.2
  • Android Support Repository
  • Android Support libraries

Building

To build, install and run a debug version, run this from the root of the project:

./gradlew app:assembleDebug

Testing

To run the Unit Test found in the CoreCommon module, run the following command from the root of the project:

./gradlew corecommon:testDebugUnitTest

As mentioned the the structure section above, each of the instrumentation tests are split into a seperate module. You can run the instrumentation tests for these modules by running the commands below from the root of the project:

To run instrumentation tests for mobile:

./gradlew mobile-androidTest:connectedAndroidTest

To run instrumentation tests for wear:

./gradlew wear-androidTest:connectedAndroidTest

To run instrumentation tests for TV:

./gradlew tv-androidTest:connectedAndroidTest

More Repositories

1

animate

An application demoing meaningful motion on Android
Java
3,117
star
2

Android-Boilerplate

Android Boilerplate project using RxJava, Dagger 2, Espresso, Mockito + more!
Java
1,871
star
3

MVVM_Hacker_News

Android MVVM experiment project using the official Data Binding library
Java
881
star
4

ComposeAcademy-Playground

Playground project for the Jetpack Compose APIs
Kotlin
868
star
5

Vineyard

Vine client for Android TV
Java
725
star
6

minimise

Minimise app built using kotlin multiplatform
Kotlin
427
star
7

Tabby

A demo application for the new Android Custom Tabs support library
Java
414
star
8

Constraints

Sample application for the new Android ConstraintLayout
Java
326
star
9

LeanbackCards

Extended set of content cards for Android TV applications.
Java
294
star
10

Notifi

A demo app for the new Android N notification features
Java
199
star
11

AndroidTvBoilerplate

Android TV Boilerplate Project
Java
185
star
12

ComposeAcademy

Website providing snippets and examples for Jetpack Compose on the Android platform
SCSS
181
star
13

GithubTrending

An Android project for the Caster.io course on clean architecture
Kotlin
175
star
14

FlutterOAuth

A Flutter OAuth package for performing user authentication for your apps.
Dart
173
star
15

WatchTower

A sample application created to test, explore and demonstrate the Proximity Beacon API
Java
144
star
16

Mondroid

A simple Mondo client for Android
Java
134
star
17

BottomNavigationViewSample

A sample app for the new Bottom Navigation View from the Design Support library
Java
134
star
18

HackerNewsReader

Modern Hacker News reader with a Material Design look!
Java
113
star
19

Aware

A playground for the new Google Awareness API
Java
99
star
20

PublicSpeaking

A collection of my abstracts and other stuff related to public speaking
86
star
21

Pickr

A sample application demoing the Google Play Services Place Picker and Autocomplete
Java
85
star
22

Voice

A simple Flutter project demonstrating tailored native experiences
Dart
69
star
23

Android-Q-Playground

A playground for new Android Q features
Kotlin
54
star
24

MvpBoilerplate

An MVP Boilerplate to save me having to create the same project over from scratch every time! :)
Java
46
star
25

Tide

Unsplash client built using Flutter
Dart
36
star
26

KoinDemo

A demo app for the Koin Caster.io course
Kotlin
35
star
27

BrailleBox

A BrailleNews reader built with AndroidThings
Java
26
star
28

PictureInPicturePlayground

A playground for the new Android N Picture-in-Picture mode
Java
25
star
29

adoptr

Jetpack Compose Android Dev Challenge
Kotlin
21
star
30

ChordAssist

Kotlin
20
star
31

FootballFace

Android Wear watch faces for your favourite American Football team
Java
17
star
32

Compose-Navigation-Sample

Quick sample based on Compose + Navigation component
Kotlin
16
star
33

Hilt_Course

Code for the Hilt Course on Caster.io
Kotlin
13
star
34

Fret

A guitar chord tutor for google actions
JavaScript
13
star
35

HashTrack-Public

A flutter application to track hashtags for Twitter and Instagram
Dart
11
star
36

Attendee-Android

A conference app for Android built using Firebase
Kotlin
8
star
37

ComposeTv

Kotlin
7
star
38

Resources-for-Allyship

A personal list of article, books etc that I have read / watched which have helped me learn more around diversity and inclusion
6
star
39

flutter-bitrise

Dart
6
star
40

firebase_auth_multiplatform

Kotlin
5
star
41

sqlbrite_demo

A simple demo application for the SqlLite library by Square
Java
5
star
42

Fireside

Sample project for Firebase Remote Config Caster.IO lesson
Java
5
star
43

Androidx_webview_sample

Kotlin
3
star
44

Reactemon

A React-Native Pokedex for Android/iOS
JavaScript
3
star
45

Bastion

Kotlin
2
star
46

Hashtrack-ios

Hashtag tracker for iOS
Swift
1
star