Droidcon India 2014

Droidcon India’s fourth edition

Effective patterns for communication between application components

Submitted by Achin Kumar (@contactachin) on Wednesday, 22 October 2014

videocam_off

Technical level

Intermediate

Section

Workshops

Status

Submitted

Vote on this proposal

Login to vote

Total votes:  +33

Objective

Learn how to establish efficient communication between components of an application, involving various patterns and their pros, cons and ideal use cases.

Description

Communication Pattern here is about passing message between components within an android application. Components can be Activities, Services, Fragments, Helper classes and so on. In an application with a large number of such components, it’s quite tricky to make them talk to each other without violating good practices.

In this workshop I’ll be demonstrating about different approaches that can be taken to establish this communication. Starting with a prevailing(wrong) practice of keeping references across components to call methods on, I would move ahead keeping components loosely coupled, describing Interface based communication and various implementations of Event Bus. Will be demonstrating the upsides and downsides of these approaches and their ideal use-cases.

Requirements

  1. Basic development experience on android framework.
  2. Basic android development setup.

Speaker bio

Android application developer with more than 3 years of experience, working with Vinsol, based in New Delhi.

I’ve worked on a number of UI intensive applications and have got an inclination towards UI innovation. I keep trying to compose new UX patterns. Application architecture is another thing I keep brainstorming around.

I’m an opinionated blogger. You can checkout few of my writeups
http://vinsol.com/blog/2014/09/15/advocating-fragment-oriented-applications-in-android/
http://vinsol.com/blog/2014/09/19/transaction-backstack-and-its-management/
http://vinsol.com/blog/2014/09/15/advocating-fragment-oriented-applications-in-android/
Got a mention in Android Weekly
http://androidweekly.net/issues/issue-121

I’m looking forward to share my experiences and meet other Android devs out there.

Links

Comments

  • 1
    Achin Kumar (@contactachin) Proposer 4 years ago

    Effective Communication Patterns in Android.

    Problem Statement

    Android applications are composed of various components which constantly need to communicate with each other. Ideally, this communication-channel should be laid out during initial development phase. But often with live apps, this communication channel gets messed up.
    There are a few options available for this inter-component communication, and a developer should be able to pick up the best one in order to keep things clean and maintainable.

    Flow of Workshop

    I’ll be coving the following points along with a Git repo with Tags for each step.

    1. What are these application components and why they need to communicate
    2. What is tight coupling? Its cons and how developers usually involve it.
    3. What is Loose coupling? Its benefits.
    4. Conventional approach to loose-coupling: Interfaces. Its downside and ideal use case
    5. Concept of MessageBus: pub-sub pattern.
    6. BroadcastReceiver based MessageBus using FluffyEvents. Its pros and cons.
    7. Event based MessageBus using Annotation driven “Otto” and Convention driven “GreenRobot’s EventBus”

    Take Away

    A clear view of various communication patterns and the good practices around them. A comparative insight into these patterns would let a developer be fluent with establishing an efficient communication channel during the architecture phase.

  • 1
    Achin Kumar (@contactachin) Proposer 4 years ago

    Kindly go through this blog post. Consider it an outline of my workshop.
    http://vinsol.com/blog/2014/11/04/communication-patterns-for-application-components/

  • 1
    Achin Kumar (@contactachin) Proposer 4 years ago

Login with Twitter or Google to leave a comment