Image from https://www.manypixels.co/gallery/

Hi all!

Today I’d like to share with you how we can design a serverless app to be able to invoke third-party APIs outside of its native scope, without the need for a dedicated backend and its server management.

When it might be useful

Let’s suppose we have a mobile app written natively for Android and we’re about to roll out an iOS version. Excluding using some cross-platform technology, it would be useful to abstract the business logic from our native apps and having it available, to both, in a dedicated place.

For this, we might want to implement some (or all) of the following…


Image from https://www.manypixels.co/gallery/

Hi all!

Today I’d like to share with you how we can create a CRUD design for our apps’ access to (local) database resources.

Let’s assume we’re going to implement this in an E-Commerce Marketplace app.

Details

This article’s valid for any database provider, but, for this exercise, we’re going to use ObjectBox. I’m using it in my MapCrumbs app and am quite happy with it because it fulfills the requirements I usually have for a database:

  • Easy to implement and use
  • Good performance
  • Good support documentation

As for the coding part, we’re going to use Kotlin for this tutorial.

The…


Image from https://www.manypixels.co/gallery/

Hi all!

Today I’d like to share with you some examples of different types of OOP (Object-Oriented Programming) inheritance and where each might be useful to use.

Details

When talking about inheritance, I like to separate between what I call Structure inheritance (SI) from Functionality inheritance (FI). The first one, as the name suggests, is to what family (structure) a type belongs to, whereas the latter relates to what sort of abilities (functionalities) a type needs to have.

There are several types of inheritance, but we’re going to focus on the ones I find more useful:

  • Single inheritance — (SI)
  • Multilevel…


Image from https://www.manypixels.co/gallery/

Hi all!

Today I’d like to share with you how we can make use of polymorphism to prevent multiple (ugly and unmaintainable) switch/case and make our code more SOLID compliant.

When it might be useful

Let’s suppose we have a list of currencies that our program supports, and we’re representing them in a typical fashion: using an enum.

Now, for every currency available, we’ll have certain functionalities associated with it (getting its name, symbol, its value against another currency, etc).

We could be tempted to create a single type, with functions for each functionality and using a switch/case statement in every one of them.

Why avoid it

Even…


Image from https://www.manypixels.co/gallery/

Hi all!

Today I’d like to share with you how we can make use of the EventBus pattern, a subset of the Publish-Subscribe pattern, for decoupled communication between different components.

When it might be useful

This pattern can be a good approach when you want to send (publish) data from ComponentA and receive and react to it (subscribe) from ComponentB.

The best analogy I could think of for this was of a ticket machine providing you your ticket number - after you’ve ordered that delicious meal at your local fast-food chain restaurant -, and then presenting on a screen what ticket number holder can go…


Image from https://www.manypixels.co/gallery/

Hi all!

Today I’d like to share with you how we can make use of the Builder Pattern to get more code flexibility, which can be very useful when presented with certain technical challenges.

When it might be useful

This pattern can be a good approach when you have to create (assemble) an object that has one of these two structure types:

  • Mandatory properties + optional properties
  • Made entirely of optional properties

The best analogy I could think of for this was of a car assembly line. You can assemble it differently, one having an automatic transmission and another one having it manual (etc), but…


Image from https://www.manypixels.co/gallery/

Hi all!

Today I’d like to share with you how I use intents to launch some of the most popular navigations apps from my own Android app.

First of all, you should identify your own requirements, and ask yourself the following questions:

  • Do I want/need to implement navigation inside my app?
  • Is it ok if my app only redirects the user to other navigation specific apps?

If you find yourself in the first scenario, then perhaps this is not the tutorial for you, for that situation. But, if you need help implementing for the second one, then keep on reading.

The navigation apps


This is supposed to be an avatar of myself greeting you all

Hi all!

I’m sure this will not be anything you’ve never heard before…but social networks have the potential to be either incredible or the opposite.

For starters, I can say that I’ve never been a true social player, being more of an observer user, just doing some of these basic tasks:

  • Uploading some photos (only a few)
  • Using the messaging part of the social network
  • Putting likes to (almost) everything that amused/interested me

Having said that, I still managed to spend a lot of hours just, you know, scrolling through.

For quite some time, this felt right for me and…


Image from https://www.manypixels.co/gallery/

Hi all!

I recently had the challenge to add a React-Native (RN) app to an existing Android app.

While searching for any supporting documentation, I came to realize that everywhere I looked advised/instructed the developer to take the existing app and just put it inside a new/existing RN project.

This includes the official documentation from Facebook, when they say:

1. Set up directory structure

To ensure a smooth experience, create a new folder for your integrated React Native project, then copy your existing Android project to an /android subfolder.

And for many developers, I’m sure that’s an acceptable choice to…

Michael Ganchas

Software Developer at MillenniumBCP | Creator of MapCrumbs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store