Android Clean Architecture example using MVP, Rx: RxJava, RxAndroid, Dagger 2, Data Binding, Retrolambda, Firebase Database, Firebase Auth, Firebase Messaging (FCM), Realm
This app demonstrates how to use Uncle Bob's Clean Architecture in practice, with MVP on presentation layer. App is based on this famous repository (thanks author for it). But for me, there were a lot of things that I wanted somehow to modify or improve, somewhere to simplify or to generify the code with creating Base-classes, somewhere to separate or move the code to other places etc. That's why I created this app and I will continue developing it and show, thus, how to apply this architecture approach on real projects.
See CHANGLELOG.md
The app, for now, allows to Sign in with Google using FirebaseAuth and to chat with other users across the FirebaseDatabase service. It is also possible to edit and delete your message. App provides offline data cache with Realm. Also user can edit his profile on appropriate screen. If user is not on a Dialog Screen or application is in background, the user will receive Push Notification message, which appear in Android Status Bar. By clicking on message notification, Dialog Screen will be opened for messaging.
Sign In |
Push Notification | Edit Profile |
---|---|---|
![]() |
![]() |
![]() |
Send/Edit/Delete Message |
Sign Out |
---|---|
![]() |
![]() |
Parcelablesmore easier.
Libraries for testing * JUnit * Mockito
PresentationLayer)
@AppScope- global scope (one instance of specific object per application)
@ViewScope- one instance of specific object per MVP-View. As an MVP-View next android classes can be used:
Activity,
Fragment,
View,
Service.
AppComponent- global component (use
@AppScope)
ViewComponent- uses
@ViewScope
AppModule- provides global application objects like
Schedulers,
Managersetc (included in
AppComponent).
RepositoryModule- provides
Repositoryobjects (included in
AppComponent).
CacheModule- provides
Cacheobjects (included in
AppComponent).
EntityStoreModule- provides
EntityStoreobjects (included in
AppComponent).
ViewModule- provides
MVP-View-related objects (included in
ViewComponent).
Copyright 2016 Ihor VitrukLicensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.