---
title: "Discussion on \"When to use api over implementation.\" | Hashnode"
description: "Discussion on \"When to use api over implementation.\". Recently on my android adventures, I decided to split up a project at work into modules and make my life simpler😃.\nOne of my modules is a themes module that cuts across all modules providing the necessary themes, styles and colours to other componen..."
url: "https://hashnode.com/posts/when-to-use-api-over-implementation/5d89fbf0834924e9756a255b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [When to use api over implementation.](https://davidodari.hashnode.dev/when-to-use-api-over-implementation?utm_source=hashnode&utm_medium=feed)

Recently on my android adventures, I decided to split up a project at work into modules and make my life simpler😃. One of my modules is a themes module that cuts across all modules providing the necessary themes, styles and colours to other componen...

Sep 24, 2019 · davidodari.hashnode.dev  
Read the article

-   [#android-apps](https://hashnode.com/tag/android-apps)
-   [#android](https://hashnode.com/tag/android)
-   [#kotlin](https://hashnode.com/tag/kotlin)
-   [#java](https://hashnode.com/tag/java)
-   [#gradle](https://hashnode.com/tag/gradle)

## Written by

[David Odari](https://hashnode.com/@davidodari)

@davidodari · Düsseldorf, Germany

  
[View profile](https://hashnode.com/@davidodari)

Software Engineer & Android GDE

I enjoy all things Mobile and Software Engineering. I am currently a Software Engineer and Android Google Developer Expert based in Germany 🇩🇪 but from Kenya 🇰🇪, whose primary focus has been Mobile for the past 6 years. I share my experiences, the good, the bad, the ugly, and sometimes random tech talks :)

## Responses 1

Markdown supported · ⌘↵ to post

[Harun Wangereka](https://hashnode.com/@wangerekaharun)

[Sep 24, 2019](https://hashnode.com/posts/when-to-use-api-over-implementation/5d89fbf0834924e9756a255b/comment/5d8a35bb480c27195b861009)

One question.

Why would one prefer `api` over `implementation` ?

[David Odari](https://hashnode.com/@davidodari)

[Sep 25, 2019](https://hashnode.com/posts/when-to-use-api-over-implementation/5d89fbf0834924e9756a255b/comment/5d8a35bb480c27195b861009#reply-5d8b4708c587eecd750a4be9)

from my case I found it useful only when you need to expose a library to other modules,for example lets say a library like firebase ui built on top of other firebase libraries other than implementing all this libraries again while you can use api to expose them to other modules in the event you need to go beyond the abstraction

[Harun Wangereka](https://hashnode.com/@wangerekaharun)

[Sep 25, 2019](https://hashnode.com/posts/when-to-use-api-over-implementation/5d89fbf0834924e9756a255b/comment/5d8a35bb480c27195b861009#reply-5d8b49dbc587eecd750a4c8b)

Nice.I get it now.
