Git Product home page Git Product logo

paraskp7 / sample-code-firebase Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 2.57 MB

This repository contains sample code. Its purpose being, to quickly demonstrate Android and software development in general, clean code, best practices, testing and all those other must know goodies.

License: Apache License 2.0

Java 100.00%
android android-architecture android-development butterknife dagger2 jacoco mvp-android rxjava2 static-analysis timber

sample-code-firebase's Introduction

Sample Code: Firebase

This repository contains sample code. Its purpose being, to quickly demonstrate Android and software development in general, clean code, best practices, testing and all those other must know goodies.

The below listed skills are the main focus:

  1. Android Support
    1. Constraint Layout (A ViewGroup which allows you to position and size widgets in a flexible way)
    2. Recycler View (A flexible view for providing a limited window into a large data set)
    3. Card View (A FrameLayout with a rounded corner background and shadow)
    4. Multi Dex (Patches the application context class loader in order to load classes from more than one dex file)
    5. Vector Drawables (In Android 5.0 (API Level 21) and above, you can define vector drawables, which scale without losing definition)
  2. Firebase
    1. Firebase Database (Store and sync data with our NoSQL cloud database. Data is synced across all clients in realtime, and remains available when your app goes offline)
  3. Database
    1. Realm (Realm is a mobile database: a replacement for SQLite & ORMs)
  4. Architectural Pattern
    1. Mosby MVP (Helper MVP library)
  5. Libraries
    1. Dagger (A fast dependency injector for Android and Java)
    2. Butter Knife (Bind Android views and callbacks to fields and methods)
    3. RxJava (A library for composing asynchronous and event-based programs using observable sequences for the Java VM)
    4. Event Bus (EventBus is a publish/subscribe event bus optimized for Android)
    5. Timber (A logger with a small, extensible API which provides utility on top of Android's normal Log class)
    6. Glide (A fast and efficient open source media management and image loading framework for Android)
    7. Lottie (A library that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile)
    8. Joda (A version of Joda-Time built with Android in mind)
  6. Code Quality
    1. Android Lint (The lint tool checks your Android project source files for potential bugs and optimization improvements for correctness, security, performance, usability, accessibility, and internationalization)
    2. Checkstyle (Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.)
    3. PMD (PMD is a source code analyzer)
    4. Findbugs (A program which uses static analysis to look for bugs in Java code)
    5. Jacoco (JaCoCo - Java Code Coverage Library)
  7. Tests
    1. Mockito (Most popular Mocking framework for unit tests written in Java)
    2. JUnit (A programmer-oriented testing framework for Java)
    3. AssertJ (A library providing easy to use rich typed assertions)
    4. Robolectric (Android Unit Testing Framework)
    5. Espresso (To write concise, beautiful, and reliable Android UI tests)

Setup

In order to build and experiment with this project you first have to create (or get) a google-services json file that will allow you to connect to the Firebase instance of your choice.

add google-services.json to app module

Usage

Use the below command to build the project in order to install it on an Android device for demonstration:

gradlew clean build -x check

Open an emulator or connect a physical device to experiment with the sample app, use the below command, which first uninstalls and then installs the sample app:

gradlew uninstallDebug | gradlew installDebug

Or faster yet and targeting a specific device (in our case an emulator)!

adb -s emulator-5554 uninstall com.hubrickchallenge.android | adb -s emulator-5554 install app\build\outputs\apk\debug\app-debug.apk

alt tag

Use this command in order to run the static code analysis for the project:

gradlew check -x test

Or even run the below commands to run a specific code quality tool in isolation:

gradlew lint
gradlew checkstyle
gradlew pmd
gradlew findbugs

Run the project unit tests using this command, Jacoco is included:

gradlew test
gradlew testDebugUnitTestCoverage

Open an emulator or connect a physical device to run the instrumentation tests using this command:

gradlew connectedAndroidTest

PS

I also hope this project will help others to quick understand and grasp all the listed technologies...

ENJOY YOU

sample-code-firebase's People

Contributors

paraskp7 avatar

Watchers

 avatar  avatar  avatar

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.