Giter Site home page Giter Site logo

git-push-hackathon's People

Contributors

aakira avatar halu5071 avatar kaelaela avatar ra1028 avatar shoheiyokoyama avatar

Stargazers

 avatar

Watchers

 avatar  avatar

git-push-hackathon's Issues

Design of this app

This is my etude.

Design

first I will list up libraries I will use and try to use

  • Retrofit
  • Rx
  • Dagger [try!] => gotcha!!
  • Architecture Component [try!]
  • Data Binding [try!]
  • moshi (&kotshi)
  • Stetho
  • Leak Canary
  • Timber
  • Support Library
  • Mockito
  • PowerMock
  • Robolectric

And I adopt Clean Architecture.
usecase package is (probably) my original. In Android-CleanArchitecture repository, usecase is, for example, GetUserDetail.java. I mean the usecase class has a just only one operation. However, in my project, usecase classes are small, and have basic CRUD. So my usecase classes have some operations.

Commit message since 25th Jan

rely on AngularJS DEVELOPERS

apply ProGuard

Overview

It is a first time to write ProGuard!!

  • Retrofit
  • OkHttp
  • Glide
    etc

create Login flow

Overview

implement Login flow

  • check AuthData on MainActivity
  • publish Intent to CustomTab
  • get access token

[Determined] UseCase&Presenter vs ViewModel

Overview

When I adopt Clean-Architecture, I would have used UseCase to operate Repository. However, after I learned MVVM (and Architecture Component, DataBinding), UseCase classes are redundant I think.

hmmm

TBD

Dependency Injection

Overview

implement a basis of DI, using Dagger2

AppInjector
  |
AppComponent - AppModule
  |- MainActivityComponent - MainActivityModule (Subcomponent)
  |- etc

Some response observable must contains retrofit2.Response

Overview

In some resources, I want to use pagination which needs Link header. So It must contains raw response.

  • events
  • (repository)

Pagination object must manage in some instance.

  • Events which contains Event objects as List have pagination object
  • EventUseCase manage pagination object

TBD

[UPDATED 2018/2/5]
After reading this book
Android Architecture Components has android.arch.paging Library (it is alpha version).
I do not know it exactly, but it may be useful. TBD

add Test Dependencies

Overview

add dependencies for test.
For example, the return value from Retrofit must be mocked up without network responses.

Fix AuthDataDataSource

Overview

when read blank value and convert Json via moshi, app crashed.

moshi can not convert blank to null

Fix AuthDataUseCase and AuthDataRepository

Overview

now AuthDataUseCase convert JSON to AuthData, but this is not desirable. AuthDataRepository (and the implementation class) have a responsibility to generate AuthData.

Solution

NowAuthDataRepository#get() returns String. However, from this issue, AuthDataRepository#get() returns AuthData?

Logout flow

Overview

  • assign null to authData on AuthDataUseCase
  • remove authData from SharedPreferences

Add domain I/F

CRUD on domain Layer

  • TokenRepository(I/F)
    • save, get, delete
  • EventRepository(I/F)
  • UserRepository(I/F)
    • get

add entity test

Overview

add entity test.
read json from resource directory.

add StringConvertorFactory

Overview

Now I use raw OkHttp to fetch access token, but it is redundant.
Need Retrofit convertor factory to get String data

Fetch feeds from api

Overview

ca-archived#8 (comment)
Roger!!

But I will use event API.

I know that I can fetch event data from https://github.com/:username in atom style after putting Accept: application/atom+xml header, but It is redundant.

because in Android (or iOS) program, atom style xml is not useful but JSON is a common way to represent some data from the server.

/users/:username/received_events

  • retrofit interface

Create custom json adapter for parsing Event payload

Overview

There are various payloads on event data, so moshi can not parse them by default.

I will create a custom json adapter for each payloads.
Fortunately, I have learned to make custom json adapter in my post

  • see type field
  • determine which instance moshi will convert

Cache event data on EventCache

Overview

cache event data on EventCache.kt of data layer.
It means event data exist Remote and Local.
EventDataRepository decide from which resource should read.

ready Entity

on domain layer

In this app, data layer does not have entity package, because both data and domain layer will use the same entities, and data layer can use entities on domain layer

  • User
  • AuthData
    TBD...

Add Test

basis of Dependency Injection

on presentation and data layer

  • data layer
    NetworkModule which provides okhttp, retrofit and retrofit service

  • presentation layer
    AppModule which provides context and concrete instance of Repository on data layer

ready for fetch Event data

Overview

  • add entity Event
  • enum EventType
  • each EventPayload

I know there is org.eclipse.egit.github.core, but that library use gson and some other redundant class contains, and some field is not enough. So I will not use the library

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.