Awesome Open Source
Awesome Open Source

TDC App

Sample app which access the TDC (The Developer's Conference) REST API.

In this sample I tried to follow the Clean Architecture principles and use some cool Android libraries.

The Application is divided in modules as displayed below:

ModalitiesList

  • UI contains all UI related classes (Activities, Fragments, Adapters, etc.). The dependency injection is also declared in this layer.
  • Presentation stores all view model classes, once this project is trying to follow the MVVM pattern.
  • Domain in this module are declared the application's use cases and the basic data classes used as DTO. This layer also declares the basic operations that must be provided by the application's repository.
  • Data defines a basic repository flow to access two data sources: a remote (to retrieve data from the sever); and local (for now, just to save bookmarked sessions).
  • Data Remote contains a implementation of a remote data source.
  • Data Local contains a implementation of a local data source.
  • Data Memory could be used as remote repository for development purposes (or if you don't have an API key, see the section ).

Screenshots

Events List

This screen lists all events organized by Global Code organized by date and showing the most recent on top.

EventList

Modalities List

The activities (e.g.: sessions, workshops, etc.) that will/were occur in the event are displayed in this screen grouped by date.

ModalitiesList

Session List

This screen display the sessions for a given modality sorted by time.

Sessionsist

Session details

Session details are shown in this screen, including the speaker and his mini-bio.

SessionDetails

Libraries

This project is written in Kotlin and it's using the following libraries:

Get started

This application were created using Android 3.3 Canary 2. To run this application, you must have a Client ID and Secret to access the TDC REST API. To get those information, access the Global Code web site, create an account and request your credentials. After that, create the apikey.properties file in the root's project directory and put your credentials as below:

apiClientId="<YOUR_CLIENT_ID>"
apiSecret="<YOUR_API_SECRET>"

But if want to test the app without real data (or you cannot have an API key), just make the following change in the PersistenceModule.kt file.

package br.com.nglauber.tdcapp.di
// ...
val persistenceModule = module {
    ...
    single {
        // Instead of this --> TdcRemoteDataSource(tdcWebService = get()) as RemoteDataSource
        InMemoryRepository() as RemoteDataSource // Use this one
    }
}

And that's it! You're good to go.

IMPORTANT! Credits!

This sample is based on the sample presented by Joe Birch in his course at caster.io.

Any feedback and/or PR's are appreciated! :)


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
kotlin (3,561
kotlin-android (329
mvvm (327
rxjava2 (219
clean-architecture (202
livedata (117
viewmodel (100
retrofit (94
room (88
architecture-components (64
lifecycle (57
unittest (44
mockito (35
koin (34