The Perfect D&D Party for your Android Application

Rodrigo Vianna Calixto de Oliveira
CodandoTV
Published in
8 min readApr 3, 2023
https://www.rpgtavernadeferro.com/o-que-e-rpg-de-mesa/

This article is English version from the The Perfect D&D Party for your Application( Portuguese Version).

At the present time, when we are working on a software project, we know that the development of all things Mobile has been featuring increasingly demanding and fast deadlines. Keeping that in mind, I am going to introduce to you a case in which the product team wanted to create campaigns to improve engagement and show offers of plans in the app, therefore resulting in a global solution for different project situations and functions. Let’s go!

The development team thought that, for the initial solution of the campaign, they should use some pre-specified templates in the project. The information available would be delivered under a determined API pattern to populate the screen data and basically show some types of layouts to the final user.

However, this solution had limited views and there was no progress to be seeing. Since I’m experienced with projects using the Server Driven UI concepts, I thought about a different idea, following another direction. Also, I wanted to put into practice a solution I had in mind and that was more refined for dynamic flows (I’ll go deeper into that soon), resulting in 4 major pillars for success.

Why can’t we make customized screens coming from the API with actions that may open other flows, with all of that being tracked? And, of course, using components standardized by the company (Design System)?

Starting from this point, I’m gonna show you not only a solution but a 4-pillar adventure (Server Driven Ui, Navigation, Analytics, and Design System, which were bundled together and won this quest).

Now, let’s go on an Adventure!

Previously, it was mentioned that the Product Castle Count had requested a mission, which was to help the castle peasants (users) to find new supplies of resources (functionalities) and treasures (plan offers), and make them experience a better life, living in a happier castle (application).

The Paladin was called out to try to solve this situation since the proposal made would not meet all the needs of the kingdom (company). This is a huge challenge, right? So, the Paladin decided to hire a group of adventurers to make this expedition.

But, before that, to complete this quest, I need your contribution to create a magic potion to help our noble adventurers! The truth is that one ingredient is missing for the potion, which is readers subscribing to my YouTube channel. After they subscribe, the potion will be complete and they will have more chances to achieve their mission goals with success.

The Great Weapon Master (Server Driven UI)

http://rpgmassacre.blogspot.com/2013/02/dicas-de-interpretacao-parte-3-guerreiro.html

Based on the Server Driven UI concept, The Great Weapon Master is a feat that presents all versatilities and the power of adaptation during the most adverse times, relying upon an endless range of weapons, therefore stating that, with his talents, he may be anything, anywhere. Also, since he is always on the front line, he will be protecting his allies (who can increase even more his power).

I have previously worked with and developed this solution. It basically means to use a RecyclerView with multiple types of items, in which each ViewType will be a component. To do this, we need to use as a basis a concept known as ViewRender, which is a way to simplify data entry to convert it into a legible type for our adapter that will be subsequently depicted on our screen. After that, I created version 2.0 of the solution, called Dynamic Views, which is responsible for the mechanism that dynamically shows any screen elements.

If you want to know more about the talents of this master, I wrote an article explaining how to use the Dynamic Views library.

The Undeterred Wizard (Navigation)

https://twitter.com/patopapao/status/971814332051935233?lang=es

The Undeterred Wizard, with all its magic, can transport its allies to different parts of the kingdom/dungeons/forest with a blink of an eye, making them arrive faster to their destination. He represents the fact that, in mobile projects, the navigation between screens is often required, whether through internal flows or from external links redirected to your application, which are known as Deep Link.

The initial idea was to create a library to make the use of Deep Links easier in the project and there is a reason for that: when we are working with Android development, there is a specific issue, which is to access unrelated screens in a module project.

Also, the use of internal and external deep links in a large-scale project is a practice even more employed as a resource that enhances not only the project, but the product itself. Because of that, the solution is basically mapping the project’s front doors in 3 steps:

step 1:

  • Register the application name, that is, the entry door for all registered routes (scheme);
  • Map all routes (authority);
  • Create objects for each functionality that has its own authority, path, and stack screen;

step 2:

  • Create your routes (DeeplinkRouteProcessor) according to the screens that will be shown, that is, each screen of your application will open an Activity;

step 3:

  • The library gathers all of this information and makes a search to the deep link passed through the authority, identifying this object and bringing the route created by DeeplinkRouteProcessor with its Activity and stack of Activities(if any), therefore creating Intents to open the screen with its entire stack.

If you want to know more about its talents, I wrote an article explaining how to use the DeeplinkRouter library.

The Hunter Ranger (Analytics)

https://br.pinterest.com/pin/646125877762690161/

Known as The Information Hunter Ranger, her abilities involve tracing back and forward the paths she did pass through and the ones she will walk now and in the future; with this skill her party never gets lost. She uses mental connections to nature to understand the intentions of any animal (NewRelic, Analytics, and so on) and transmits all the information obtained to her allies.

This solution has also generated a library, that is a place in which the metrics libraries are centered (NewRelic, Analytics, and so on), and that works as a delegate, that is, it directs events to each specific library. In this case, the solution creates an abstraction for each external library, turning the classes predefined by type of monitoring into the entry point; after that, the metrics library the event is being directed to is then identified. It is not only a versatile solution, but it enables the use of several types of customizations in an organic way, that can be understood by the lib.

If you want to know more about her skills and fellow animals, you’re gonna have to wait a little bit since her article is still under training and will only be published after the Ranger passes to the next level.

The Knowledge Domain Cleric (Design System)

https://br.pinterest.com/pin/3448137205973777/

The Knowledge Domain Cleric uses her knowledge to guide her allies according to the doctrine (documentation) of the kingdom, raising up her sun symbol to use her transmutation magic and change the warrior’s weapons during the fight. Also, she evangelizes the entire kingdom with her religion, channeling her divinity and showing that they do not have to worry about working repeatedly in something that her god already provides.

She is based on the Design System, which is a unified system that employs standards and components established by the company. The Cleric has a collection of components that must be reusable for determined products, going way further instead of limiting to some components; she also creates the company’s visual identity and some benefits can be perceived through this action, such as:

  • Optimization of the development time of the teams that are implementing screens;
  • Decreased duplicate project components;
  • Reuse of codes since the entire component structure is already done;

However, to make things work correctly, it is necessary to create a collaborative culture in the company, in which everyone is involved in this process and helps create documents, new solutions, and new components.

Party formation for this quest (Flow Chart):

Results obtained with a sample:

Example of DynamicView publishing a Toast with the Analytics events
Example of DeeplinkRouter

Let’s celebrate at the Tavern!

https://www.dungeonsolvers.com/2018/05/18/party-composition/

This solution is actually not limited to campaigns; it has been expanded to other types of functionalities that require the use of these 4 pillars, and I have observed great outcomes and increased speed for the teams when they use it.

That’s it, guys. With this article, I wanted to make an analogy that was a little different from what we usually see, and soon there will be other adventurers on new missions! Wait and see… You can tell me below what you think about this approach.

If you want to know more technically about the party members:

Ranger -> in process;

Cleric -> no technical references will be shown;

I welcome comments and suggestions. You can make them below or contact me through LinkedIn or https://flow.page/rviannaoliveira.

--

--