This article is the 13th day of Android Beginner Advent Calendar 2018.
About a month after the first Android development, The following story was raised at the company.
** The app you are developing is legacy, so let's renew the structure! **
So, I summarized the results of researching and studying for the past two months in a sample app. Based on this, what kind of structure will be made? We plan to have a conversation within the team on how to change it.
Win Android studio 3.2.1 Windows10 Home Version:1803
Mac Android studio 3.2.1 Mac OS Mojave 10.14.1
--Use the following design patterns MVVM
--Use the following libraries
It does not mean that it will be the production code as it is It is just a sample for discussion within the team.
――The app you are currently developing in business is too god Activity (Fragment) --Activity (Fragment) inheritance hell ――It's too tightly coupled to write a test
The app can't keep up with the life cycle and often dies. I want to be relieved.
The samples on the net are all the codes that are premised on using kotlin and RetroLambda. For those who only use Java 1.7 but want to use RxJava. (Of course I want to use kotlin, but in reality it is difficult in terms of cost and quality ...)
The story of studying! But the purpose is not to study, so For the time being, I would be happy if there is something that I can understand, something that works, and something that I can study with my current knowledge.
I would be happy if I could get Masakari from a strong Android engineer. The architecture and way of thinking are self-taught, so I would like to know if there is a good mechanism.
--Is it better to use Repository pattern to wrap data source (file, DB)? So far, it's only sqlite, and I'm wondering if it's okay to leave it in the room. Maybe it's not too painful to switch ... I also feel that if it is too much from the beginning, it will become rigid.
--I don't understand the convenience of dagger2 and can't use it. I studied a little and asked at the Mokumokukai, I don't know how happy it is to use it ... You just don't realize you're in trouble? I would be happy if there was specific source code.
--The existence of problems with other functions has not been verified. It has not been verified whether this mechanism is good for billing function, GoogleMap embedding, camera function, etc. I feel like it's going to happen, and I think it's okay to proceed, I want to verify it first if possible.
The source is from the following Github. https://github.com/fortegp05/SampleAndroidApps
--Asynchronous communication function (RxJava2 (RxBus), RxAndroid) Ability to search and list Github repositories Ability to search and list connpass events (Api is heavy and often times out)
--SQLite operation by room Ability to save data in SQLite Ability to retrieve and display data from SQLite
--Linking View and ViewModel with Data Binding
--Implementation of Navigation Drawer
--Test implementation --Unit test --UI test
--Further modernization --kotlin --Using RetroLambda --Enhancement --Make the part that passes an arbitrary character string bidirectional with Data Binding when searching --Real-time search --Get the next data when scrolling the RecyclerView --Added SQLite operations --Update
From the next time, I will output what I did while actually giving a code example. Next, I plan to challenge the explanation of asynchronous processing by RxJava.
Recommended Posts