arrow icon
REGISTER

ReasonML for JS developers

2018-12-14
Download your copy of the
Ultimate Guide to React Native Optimization

blog content

Need help with Performance Optimization? 
hire us
Need help with Super app development
hire us
Need help with React Native?
hire us
Need help with migration to React Native?
hire us
Our React Native EU Conference is back
register nowlearn more

Let me ask you a few questions.

Are you a JavaScript developer? 
Are you annoyed by every <rte-code>undefined is not an object<rte-code>? 
Do you think static type checking makes your code slightly better? 
Currently, there is a hype for a ReasonML. Do you want to be on the bleeding edge?
Do you want to learn a new functional language? 
Are you tired of fixing production bugs?

If you answered yes to at least one of them you should stay with me for the next 10 minutes!

What is <cyan>ReasonML<cyan>

ReasonML is a statically typed functional language. It bases on OCaml — a language created over 20 years ago. Reason combines the experience of OCaml (especially in the matter of types) and a fresh look with nice syntax similar to JavaScript. What is also important — it was built to be easily understandable for us — JS developers. Yeey!

ReasonML logo

Why the heck my JavaScript soul should even look at ReasonML?

Good question. There are two main reasons. The first you will get to know after reading this article. The second is because you can. And you can because reason compiles extremely fast to JavaScript. Readable JS. It’s possible thanks to BuckleScript — OCaml/ReasonML compiler which transforms your Reason code into JavaScript. So in the end, you have JS code, which you can use wherever you would use classic JS — in the browser, in node.js or in React Native application. What’s also great is that you can still use your JavaScript tooling! Your favorite <rte-code>npm<rte-code> libraries are at your fingertips. The only thing you need are bindings to them and you’re ready to go. But this is a topic for a completely different article.

Tip: you can try all of the examples below in a sketch.sh. Just copy the example, paste it there, hit <rte-code>cmd+s<rte-code> (<rte-code>ctrl+s<rte-code>) and voila. You should know the right shortcut chain. It is what most of the developers (especially me) do at the daily basis — <rte-code>cmd+c<rte-code> <rte-code>cmd+v<rte-code> <rte-code>cmd+s<rte-code> ;)

Variables

Below you can find the same fragment of code written in JS (first example) and ReasonML (second example).

JS

ReasonML

Looks similar, right? Although there are two differences under the hood — in Reason there is only<rte-code>let<rte-code> keyword and that every variable is immutable which means you cannot change the value of the already created variable.

Tip: variables in Reason are immutable but you can bind totally new value to a variable with the same name. So <rte-code>let myVar<rte-code> in two different lines in the same scope isn't anything weird.

Types

Right now you are probably wondering why there are no type definitions in reason example above. Though you read a few seconds earlier that it is statically typed language. You’re right, I just forgot to mention that it is also extremely smart. Reason infers your types from your code so in most of the cases you don’t have to worry about them.

Of course, if you want you can specify types just like you do with <rte-code>flow<rte-code> or <rte-code>TypeScript<rte-code> - by adding semicolon proceeded with the type name after the variable name.

JS + flow — type definition

Reason — type definition

In Reason you can find most of the primitive types you probably already know:

  • string — <rte-code>let val: string = "Hi";<rte-code> (<rte-code>string<rte-code> in Flow)
  • int — <rte-code>let val: int = 12;<rte-code> (<rte-code>number<rte-code> in Flow)
  • float —<rte-code> let val: float= 12.2;<rte-code> (<rte-code>number<rte-code> in Flow)
  • bool — <rte-code>let val: bool = true;<rte-code> (<rte-code>boolean<rte-code> in Flow)
  • char — <rte-code>let val: string = 'a';<rte-code> (<rte-code>string<rte-code> in Flow)

Tip: in ReasonMLdifferent types require different operators. For example <rte-code>+<rte-code> operator in JS could concatenate strings, add floats or integers. In Reason, you have to use <rte-code>++<rte-code> for strings, <rte-code>+<rte-code> for integers and +. for floats. You can finde more information here: https://reasonml.github.io/docs/en/integer-and-float

Objects (aka records)

In JS to group some data we use plain objects. In Reason it’s very similar, see examples below.

JS

ReasonML

Nothing new here except that in Reason you have to define the type before you create an “object”. To do this you have to use <rte-code>type<rte-code> keyword and inside curly braces list all fields and their types. The syntax is familiar but there are more differences under the hood. The first difference is a name. What you see in the snippet is called a Record. The second difference is a fact that Reason’s records are immutable. You cannot reassign a field of an already created record. What you can only do is to create it in exactly the same shape as its type and then use it, nothing more.

Tip: Mutating records is forbidden but like in JS you can create a new record based on existing one using spread operator.

Functions

You probably use arrow functions on your daily basis. In ReasonML it is the only way to create a function.

JS — function which adds two numbers

ReasonML — function which adds two numbers

The difference here — <rte-code>return<rte-code> keyword. In ReasonML everything is an expression. So the last line in each scope will be returned — <rte-code>return<rte-code> is not needed.

Tip: You can commit <rte-code>{<rte-code> brackets for function with only one line of code inside — just like in JS (suprise)

Tip 2: You can define the types of function arguments by adding <rte-code>:TypeName<rte-code> after the each argument name. Although it’s not required in most of the cases.
Example: <rte-code>let add = (a: int, b: int) => a + b;<rte-code>

Tip 3: You can also add labels to your arguments and call the function using argument’s labels instead of its order. They’re called labeled arguments and you can find more information about them here: https://reasonml.github.io/docs/en/function#labeled-arguments

Sequences of data

To start our discussion about sequences of data please look at the examples below.

JS — List

ReasonML — List and Array

At first, JS and Reason versions look almost the same but in ReasonML example you can see two different syntaxes — one with <rte-code>[<rte-code> and another with <rte-code>[|<rte-code>. The first one is called a<rte-code>List<rte-code> and the second one is an <rte-code>Array<rte-code>. For us — JS enthusiasts — it looks a bit overcomplicated. Why differentiate Lists and Arrays? The answer is simple. Lists are immutable and fast at prepending items. You will probably use it for dynamic data structures. List of TODOs for TODO app will be a good place for using them.
Arrays are mutable (you can mutate each item), fast at random access & updates. If you’re looking for a JS-like experience and don’t have to add new items to array it’s the best choice for you.

When it comes to iterating over List or Array there are more differences between JS and Reason. Look for example at a simple<rte-code> map<rte-code>:

JS — Iterating over an array

ReasonML — Iterating over an array

In JavaScript we have Array prototype with a bag of methods we can call directly on an array instance. There’s no such thing in ReasonML. But we have <rte-code>Array<rte-code> and <rte-code>List<rte-code> modules. Both are very similar and with an even bigger bag of useful functions like <rte-code>map<rte-code>, <rte-code>length<rte-code> or <rte-code>sort<rte-code>.

Tip: Accessing List items might be a little bit confusing at the first time so I recommend to start with an Array, learn more about pattern matching and recursion in Reason and than go back to Lists — https://reasonml.github.io/docs/en/list-and-array#list

Modules

This will become a little bit crazy — But this is the level of craziness that everybody likes ;) Let’s compare JS with ReasonML by creating two similar modules that contain simple <rte-code>add<rte-code> function.

JS — basic module

ReasonML — basic module

First weirdness… There is no exporting in Reason. Each and every one of your files will become a module with the same name as the file.

Let’s move to the example of consuming the module. Imagine that we have file <rte-code>App<rte-code> directly in <rte-code>src/<rte-code> directory and we want to use add function from <rte-code>AddModule<rte-code> file in <rte-code>src/utils/<rte-code>. Here is how it looks like:

JS —using simple module

ReasonML — using simple module

Did I just forget to import the module in ReasonML example? No! No export — no import, easy. In ReasonML you can use your modules by using their names (in our example the filename). But what is more important — a location of the module doesn’t matter. You probably noticed in the example that <rte-code>AddModule<rte-code> file is in a different location than the<rte-code>App<rte-code> and we still were able to use it by simply calling its name. Pretty awesome, right? Just please remember to be careful with filenames to protect yourself from a name clashing.

Because using <rte-code>ModuleName<rte-code>. Everytime you want to use some modules function could be problematic ReasonML allows you to open the whole module for a specific scope. It basically means that you can make the content of a module visible inside some block of code — for example for the whole other module. To do this you have to type<rte-code>open ModuleName;<rte-code> at the beginning of a scope. So if you have some file (<rte-code>Math.re<rte-code>) with an add function inside and do <rte-code>open Math<rte-code>; at the beginning of another file you will be able to do <rte-code>add(1, 2)<rte-code> without any prefixes.

Tip: Be aware that opening modules globally could easily break your code. Situation when the module you’re opening has a function with the same name as some of yours functions or variables is more than possible. In those cases you can open module only locally. For example if you want to create a list with a few results of add function you can do the following: <rte-code>AddModule.[add(1, 2), add(2, 3), add(2, 4), add(2, 5)];<rte-code> You can find more details in the official ReasonML documentation or here.

Variants

Imagine you have some blogging app abd you want to keep information about user review under every post. You would like to have three simple choices: <rte-code>Bad<rte-code>, <rte-code>Neutral<rte-code> and <rte-code>Awesome<rte-code>. Code which checks if the review is “not bad” could look like this:

JS — variants/enums/options

ReasonML — variants

Except for type definitions, both examples look very similar. The difference is that JS version is more error-prone. Each typo in the review name could cause a few hours of bug fixing. If you do the same typo in ReasonML compiler will tell you that you have a bug even before you start testing it.

But that’s not all. Imagine you want to keep some explanation text for the Bad option. Normally you would keep the data as a separated variable but ReasonML variants have one additional ability — constructors.

JS — adding the review with additional data

ReasonML — adding the review with additional data (aka Variant Constructors)

The thing you see above is called a constructor. It’s a way to store some data inside a variant. This is an ideal way to store different types of data. Do you want to accept strings, integers or floats in some variable? Just create a variant: <rte-code>type data = Text(string) | Int(integer) | Fl(float);<rte-code>.

Tip: In a single variant, you can store more than one value. You can, for example, do the following: <rte-code>Point(float, float)<rte-code>.

Pipeline operator — chaining function calls

Calling function with the result of another function is something we do very often. Currently, in JS there is no better way than nesting function calls or assigning function result to some variable and than passing it to another one. In ReasonML there is a special operator that makes our lives easier — pipeline operator. You’ve probably heard this name before because it is quite common in other languages than JS. We even have a tc39 proposal with it.

JS — function calls chain

Well in Reason we already have it!

ReasonML — function calls chain

Like you see above we can use <rte-code>|><rte-code> to pass value on the left side of operator to the function on the right as its last argument. Extremaly simple syntax which makes the code much clearer.

Another great use case for the pipeline operators is the usage of modules like Array or List. When you were reading the paragraph about Lists you probably wondered how advanced use case would look like. In JavaScript it’s simple. Because we have a lot of useful methods on different object prototypes we can easily chain them. So this is a normal thing in JavaScript: <rte-code>array.filter(…).map(…)<rte-code>. Few of you probably remember the times when chaining <rte-code>jQuery<rte-code> selectors and functions were the most important part of every front-end developer’s life. It’s natural and clean but it’s not possible in ReasonML… but don’t worry, we have a pipeline operator… God bless the pipeline operator.

Below you can see the example of an advanced array modifying. The code filters out the 0 from an array, multiplies each value and converts it to a string.

JS — chaining Array prototype functions

ReasonML — chaining Array module function using pipe operator

Thanks to pipeline operator our ReasonML code looks almost the same as JS one. And what is more important there are no magic creatures like object instancesprototypes or <rte-code>this<rte-code>. There are just simple functions.

Pattern matching

If you’ve already heard some good opinions about ReasonML the most common thing that everybody loves about the language is Pattern Matching. What is it exactly? Pattern matching is like JS switch-case but on steroids.
Below we have an example of a function which returns some feedback for users after they left a review (we will use variants from the previous example).

JS — Switch statement (little brother of Pattern matching)

ReasonML — Pattern matching

It is just a switch statement but prettier (no<rte-code>break<rte-code> or <rte-code>return<rte-code> keywords) , right? So, why everybody loves it so much? Look closer to the line with <rte-code>Bad<rte-code> variant. We just destructured it and assigned the value from <rte-code>variant<rte-code>constructor to <rte-code>comment<rte-code> variable. For those who don't know, destructuring is a way for easy extracting nested values of some variable - In ReasonML it could be a <rte-code>Record<rte-code>, an <rte-code>Array<rte-code> or for example a <rte-code>Variant constructor<rte-code> and it works exactly the same as in JS. We used destructuring of a Variant in pattern matching so analogically we can do it for any other type. We can match values in a very specific way and while doing it we can assign those values to variables — that’s why it’s called “Pattern Matching”. We match some patterns in our value.

Let’s see a little bit more exhaustive example of this powerful feature. After that, I hope you will either love Pattern matching or decide to spend more time with it ;)

ReasonML — advanced Pattern matching example

Just imagine how nested <rte-code>if<rte-code> statements hell would look like in JS after you implement the same logic… If you are brave enough here you can see an example.

Tip: Of course this is not everything. Maybe do you want to add some additional check to some of your matched values? Using when keyword you can do something like that: <rte-code>| { name, phone, age } when age > 20 => “Matched every person above 20!”<rte-code>.

Tip2: There is also one nice thing. Reason compiler will warn you if you won’t cover all cases from the Variant. Goodbye unhandled cases.

There are more parts of ReasonML

We went through the most interesting parts of ReasonML but there are much more — tuples, fast pipe operator, promises, advanced function currying, Objects, mutations, JS interop, native compilation etc.

To learn more I encourage you to look at some amazing tutorials, articles, or podcasts made by amazing people in the community:

If you liked the language after reading this article there is a homework for you — play a little with ReasonML, learn it, do something small and then conquer the world with it.

Author:
Jakub Kłobus
Software Developer working at Callstack since the very beginning. After mastering web, he moved to React Native. Responsible for leading Delivery Team and technical recruitment. A fan of leadership as a partnership.
arrow icon
MORE posts from this author
The super app landscape

What are super apps?

arrow-down

Super apps are multipurpose platforms that integrate a wide range of services and features to answer diverse user needs, all within a single mobile interface. Comprised of modular mini apps that users can activate at their convenience, super apps are the software equivalent of Swiss army knives that deliver a powerful mobile-first experience.

Super apps act as a one-stop shop for customers, allowing them to perform everyday tasks like shopping, paying bills, communicating, and more, all in one place. They’re a powerful tool for businesses looking to captivate users with what Mike Lazaridis, Blackberry founder who coined the term in 2010, defined as a “seamless, integrated, contextualized and efficient experience.”

A good example of such an all-round experience is WeChat, a multipurpose app developed in China. Its core features include messaging, localization, a search engine, a news feed, payments, loans, public services, transportation, and housing – and that’s by no means a finished list. It shouldn’t be surprising that the number of active users on WeChat is estimated to reach 1.102 billion by 2025.

What do super apps offer?

arrow-down

Super apps are made to meet the modern-day demand for smooth, convenient, all-encompassing mobile experiences. What makes them stand out, however, is the way they’re built and how they work. 

Ordinary mobile products offer a variety of features within a single application. Super apps, on the other hand, operate as a platform to deliver modular mini apps that users can activate for personalized experiences. The things that account for the super quality in super apps include:

  • range of services – while a mobile application typically serves a single purpose, a super app aims to be the only piece of software a user needs to perform a variety of actions across services or even industries, like Grab, WeChat, or Gojek.
  • all-in-one toolkit – traditional suites of applications released by tech giants like Google or Microsoft require users to switch between products to access different services. Super apps, on the other hand, shorten the customer journey by allowing users to achieve different goals within a single ecosystem without downloading multiple digital products.
  • data sharing – as opposed to ordinary apps that collect data related to a specific purpose only, super apps gather and process much more user data. While this may raise privacy and security concerns, properly-handled data sharing between respective services is a safe way to ensure an even smoother user experience.
  • financial services – there are limitless combinations of services that super apps may offer, from messaging, social networking, and e-commerce to transportation and health. However, as the examples of Gojek’s GoPay or WeChat Pay within WeChat Wallet show, built-in payment is one of the most prevalent. Super app users are usually required to provide their payment information only once for cross-service transactions – and they don’t need to leave the app to finalize the payment.

What’s the global landscape of super apps?

arrow-down

Ever since the launch of WeChat in 2011, super apps have been on the rise. There has been a notable difference between the emerging and developed economies’ approach to this kind of digital products, though. 

Super apps have taken emerging markets by storm. Among the most notable all-in-one applications released in the last decade are Southeast Asia's leading platforms Grab and MoMo, Latin America-based Rappi, Middle East’s first super app Careem, and WhatsApp, which started turning into a super app in Brazil by launched in-app business directory and shopping features. There are a few reasons why super apps have been booming in developing countries:

  • mobile-first nations – the emerging economies didn’t experience the desktop revolution the same way the developer markets did. Only once smartphones hit the market did they get to easily access the internet, which made many Asian nations mobile-first consumers and contributed to the wide adoption of super apps.
  • unbanked population – a large percentage of unbanked populations was the issue that the emerging economies have struggled with for a long time. To give you an idea, in 2018, over 220 million adults in China, 190 million in India, and 99 million in Pakistan didn’t have a bank account. With financial services often lying at their core, super apps allow users to access their assets and make purchases through mobile devices.
  • regulators’ support – governments in emerging economies have been supporting super apps to drive technological advancement together. For example, WeChat’s been subsidized by the Chinese government since its creation in 2011, while Jakarta entered into a partnership with Grab, Gojek, and other local startups to accelerate the launch of the capital’s smart city project. 

While super apps have been proliferating across emerging markets, they’ve been struggling to gain traction in the West. Among the reasons why are:

  • consumers’ concerns with data security and privacy,
  • rigid data sharing and antitrust laws,
  • cut-throat competition between existing players in most verticals.

What does the super app market look like now, and how will it evolve?

arrow-down

As of early 2023, 68% of the world’s population uses a mobile phone. Over the past year, the community of mobile users grew by 168 million individuals, and over 92% of all consumers use a mobile device to access the internet. These trends make the future look bright for businesses behind all sorts of mobile applications, including super apps, and translate into some promising numbers:

  • In 2022, the global super apps market size was valued at 61.30 billion U.S. dollars and was expected to expand at a compound annual growth rate of 27.8% until 2030. 
  • Gartner predicts that by 2027, over half of the population will be using multiple super apps daily, and their adoption will take place on both personal and enterprise levels. 
  • The survey conducted by statistics bureaus of the US, UK, Germany, and Australia estimated the number of potential day-one users for super apps is estimated to reach 98 million, which would result in an estimated 3.25 trillion U.S. dollars in annual spending on a super app by early-adoption users.

Super apps are widely adopted in Asia, the Middle East, Latin America, and Africa, but developed economies aren’t exempt from this global tech trend. The key to success in the US and Europe is to understand the distinctive needs and qualities of the Western markets. Having that in mind, Deloitte proposed the following direction for super apps in developed countries:

  • Having an established brand with developed user trust will make the organization’s entry into the super app ecosystem smoother, which seems promising for medium businesses and enterprises.
  • While banking and insurance-related features are indispensable in super apps, social media, ride-share, and payment companies are more likely to succeed in the Western market.
  • Unlike in the emerging economies, in the West, it seems unlikely to have one dominant super app; instead, we’re more likely to witness the rise of vertical-specific super apps, which means more opportunities for business growth.
  • Western super apps won’t aim to oust traditional mobile apps, and their competitive advantage is more likely to rely on giving users the ability to “manage fewer accounts, transact faster through consistent payments, save money using loyalty and rewards, and experience a better product enabled by cross-service insights and advice.”
  • Bearing in mind data privacy concerns, super apps targeted at the developed economies’ consumers will likely be more transparent about data use, and their functioning may require closer collaboration with regulators on the business's side.
  • The US and Europe won’t focus on the B2C market alone; we’re likely to witness there the emergence of more B2B super apps that will drive value “through data-driven insights, automated advice, and seamless integration of businesses’ platforms into a single workspace.”
Business impact of super apps

What are the business benefits of super apps?

arrow-down

Super apps have dominated emerging markets, and it’s only a matter of time before their popularity grows in the West. If you’re still wondering if your organization should jump on the super app bandwagon, consider the following business benefits:

  • increased customer acquisition – compared to traditional mobile applications, super apps offer a much wider range of services that cater to the needs of diverse audiences, which translates into a bigger potential user base. As your super app grows, it’s also possible to convert the existing users into consumers of a new service at practically zero cost, much like Gojek did.
  • improved user engagement – providing consolidated services in one place and consistently expanding the offering with new features gives you more touchpoints for interaction with users and makes it easier to keep them engaged. In the words of Dara Khosrowshahi, Uber’s CEO, “when we see customers using more than one product, their engagement with the platform more than doubles.” All of that boils down to bigger profits.
  • business stability and sustainable growth – this benefit relates to the ones we’ve already discussed, but it’s worth paying special attention to it due to the current economic landscape. Super apps embrace vertical growth by encouraging a shift from a product to a platform mindset. Offering a range of services may help your business survive when a given vertical suffers from an unexpected breakdown, as was the case with travel during the pandemic. 
  • increased revenue – services within the super app ecosystem can be provided by either you as the app owner or the third-party partners. Opening up your space to various retailers lets you monetize your product easily.
  • faster bug fixing – you can release fixes and improvements Over The Air (OTA), which means no hassle with Google Play or App Store review processes. Thanks to super app configuration, mini apps can download and install updates instantly without rebuilding the whole app.
  • team independence and development efficiency – while developing super apps in separate repositories, the host of the super app provides the necessary tools and infrastructure. The teams can work independently, which results in faster development, fewer code conflicts, and increased ownership in product teams.
  • security despite users’ concerns with data privacy, a super app is a sandbox where developers can play without breaking anything. You can build an environment where you mock some sensitive parts of your codebase. As a result, the environment is more secure, and external providers can move faster and contribute features to your app.

What makes super apps popular with users?

arrow-down

Super apps collectively have over 2.4 billion active users all over the world. Their enormous popularity in the B2C market can be attributed to:

  • ability to coordinate different aspects of everyday life in one place,
  • convenience and engaging experience without the need to learn how to use multiple apps,
  • time and storage saving resulting from having one user profile and downloading a single app for all services,
  • minimized risk of losing sensitive information when switching between service providers.

These benefits speak to those who haven’t yet had a chance to use a super app. According to a report by PYMNTS and PayPal, seven in ten global consumers express interest in a solution allowing them to manage payments and other everyday activities through a centralized tool. There’s much untapped potential in the developed economies, so why not be among the first to unlock it?

What are the concerns and challenges that come with super apps?

arrow-down

While super apps offer numerous benefits to both businesses and consumers, they come with some serious challenges as well:

  • data privacy – the multitude of services available within super apps is actually a mixed blessing for many users, especially in the West. Having heard hundreds of stories about data privacy abuse and data breaches from big tech companies, consumers are hesitant to share all their personal data with a single service provider, even if it comes with invaluable benefits.
  • regulatory issues – as a result of data privacy infringements, regulators around the world are implementing laws to further protect personal data and restrict sharing of user data between service providers. Another challenge for businesses behind super apps may be the competition legislations adopted in developed economies.  
  • user experience – in terms of UX, the main challenge for the teams behind the mini apps that make the super app is to strike a balance between consistency and uniqueness. On the one hand, the consistent look and feel account for a positive user experience, drive adoption and retention, and foster a sense of safety. On the other, super apps by definition are made to cater to the diverse needs of heterogeneous audiences, all at once. As each demographic segment interacts with digital products differently, the question remains how to maximize usability without overcomplicating the user experience.
Super apps and your organization

What does moving into the super app ecosystem mean for your organization?

arrow-down

Digital products are not developed in a vacuum. The way they’re designed and operate depends on many factors, one of which is communication between the development team. 

As stated by Melvin E. Conway: "Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure." In simple words, Conway’s law means that the organizational structure is often mirrored in software design. For example, large corporations still using legacy technologies are much more likely to build stiff monoliths – and so their product reflects the organizational concerns more than the actual user needs.

A tool to tackle this issue is the reverse Conway maneuver, according to which the desired software architecture is what affects the organizational structure, not the other way round. This way, teams are capable of building digital products optimized for changing user requirements and business objectives, just as is the case with super app development.

The super app approach has a profound impact on how you organize the work of your developers. It enables respective teams to independently develop and deploy parts of the host application as mini apps and gives more room for third-party contributions. The way the super app architecture influences team composition and the development process is a great example of the reverse Conway law in practice.

What should you consider when choosing a super app development partner?

arrow-down

Hiring a tech partner to build your super app can be a real money and time-saver. It takes the burden of internal recruitment from you if you lack in-house expertise in this area and opens up possibilities for upskilling. When looking for a reliable super app development company, we advise looking for the following qualities:

  • experience building super apps – it may sound obvious, but checking if the tech partner’s portfolio includes projects like yours is key. Super apps are a special kind of mobile applications, so the software development company of your choice should know its way around building mini apps and integrating them into whole ecosystems. If you’re wondering about our experience, check out how we improved the performance of MoMo’s super app and mini apps by migrating their architecture to Re.Pack
  • consultancy approach – what sets a good tech partner apart from ordinary outsourced teams is proactivity in matching tech solutions with your needs. You should be looking for a company that’s eager to take a closer look at your current product and situation first, without assessing it as good or bad, but focusing on the potential for improvement. Only once the tech partner understands your pain points and objectives better can they suggest a bespoke mix of technology and solutions. 
  • going beyond development – stepping into the super app ecosystem is not a purely technical choice; it also entails a certain degree of organizational change. That’s why the right tech partner should be able to outline the product roadmap and propose relevant changes to processes, workflows, and peopleware.
  • knowledge-sharing – if your in-house team doesn’t have much experience building super app ecosystems, it might be a good idea to look for a tech partner whose developers will share their specialist knowledge with your squad. This will make the long-term development work more efficient and lay the foundations for sustainable business growth.

At Callstack, we’ve got super app development skills and a business-oriented proactive approach. Get in touch with us, and let’s find out how we can help your business succeed with the next big super app.

Super app development in practice

What are key tech considerations for super app development?

arrow-down

The unique experience that super apps offer comes with some special development considerations. Here’s a brief overview of the main factors, which you can read more about in the tech FAQ:

  • tech stack – there’s no one-size-fits-all solution to building a robust and sustainable super app, so you can go for native or cross-platform development, depending on your needs and capabilities. Our experience shows that choosing React Native and Re.Pack means optimal user experience and the ability to leverage code splitting for streamlined development and simplified management of your super app.
  • consistent performance – whether you’re in charge of all services or you’re cooperating with a third-party partner, all functionalities within your super app should have equal operating speed and effectiveness, even on low-end devices and in the low-speed internet environment.
  • user-friendly design – the abundance of features can be overwhelming unless you minimize the friction with a consistent design. To captivate the users, your super app’s design should be visually appealing yet clean and intuitive, especially if you’re planning to win the hearts of Western users, who are accustomed to straightforward navigation and minimalist design.
  • security ensuring user safety should be a priority for every tech business; however, with super apps storing all personal information in one place, their creators should put in even more effort to prevent security breaches. The precautions your development team can take include pen tests, 2FA, code obfuscation, data encryption, and more.

What approach to super app development can you adopt? 

arrow-down

Digital products come in all shapes and sizes, which is why the common answer to many questions in software development is “it depends”. Super app development is no different, as depending on your preferences, you can choose from the following approaches:

  • Native Android application with Feature Delivery
  • Native iOS application with WebViews
  • Cross-platform React Native application with Metro
  • Cross-platform React Native application with Webpack and Re.Pack

At Callstack, though, we recommend going for the latter because it proves to be the most beneficial. Compared to other tools and solutions available on the market, Re.Pack allows you to enjoy:

  • reusable features
  • smaller JS bundle size
  • OTA updates of on-demand features
  • time and cost-effective development experience
  • ability to leverage third-party contributions

If you’re wondering how it works in practice, we encourage you to check out our super-app-showcase.

What exactly is Callstack’s super-app-template?

arrow-down

Our super-app-showcase is a repository demonstrating how to structure a super app when working with Re.Pack and Module Federation to achieve the best business results. It highlights various solutions and best practices developers can employ to tackle challenges and streamline the super app development process. 

The super-app-showcase comprises:

  • the host app, which is the main container for the micro-frontends,
  • the shell app, which functions like a blueprint of the host app with shared dependencies,
  • a few mini apps, each dedicated to a single service booking, shopping, dashboard, and news – the latter being stored in a separate repository. 

You can learn more about the architecture and the intricacies of the template from the case study published on our blog.

How does super app development with Callstack's super-app-template influence your team’s work and developer experience?

arrow-down

By definition, a super app is built as a platform “to deliver a mini apps ecosystem that users can choose from to activate for consistent and personalized app experiences.” This modular approach allows a large development team to split into smaller squads, each focused on a respective mini app, and enables third-party contributions to be seamlessly integrated into the final product. 

When implemented right, such a workflow may lead to greater flexibility, independence, and development speed. Among the steps to optimize developer experience in the super app setup, there are:

  • creating and exposing a sandbox environment that closely resembles your host app, like the shell app in our super-app-showcase,
  • if need be, creating an SDK that contains common and repeatedly used elements,
  • organizing the codebase into a monorepo, which is an optional step.

Using Re.Pack and our super-app-template to build your super app makes the application of these tips in developers’ work much easier.

The super app landscape
Business impact of super apps
Super apps and your organization
Super app development in practice

What are super apps?

arrow-down

Super apps are multipurpose platforms that integrate a wide range of services and features to answer diverse user needs, all within a single mobile interface. Comprised of modular mini apps that users can activate at their convenience, super apps are the software equivalent of Swiss army knives that deliver a powerful mobile-first experience.

Super apps act as a one-stop shop for customers, allowing them to perform everyday tasks like shopping, paying bills, communicating, and more, all in one place. They’re a powerful tool for businesses looking to captivate users with what Mike Lazaridis, Blackberry founder who coined the term in 2010, defined as a “seamless, integrated, contextualized and efficient experience.”

A good example of such an all-round experience is WeChat, a multipurpose app developed in China. Its core features include messaging, localization, a search engine, a news feed, payments, loans, public services, transportation, and housing – and that’s by no means a finished list. It shouldn’t be surprising that the number of active users on WeChat is estimated to reach 1.102 billion by 2025.

What do super apps offer?

arrow-down

Super apps are made to meet the modern-day demand for smooth, convenient, all-encompassing mobile experiences. What makes them stand out, however, is the way they’re built and how they work. 

Ordinary mobile products offer a variety of features within a single application. Super apps, on the other hand, operate as a platform to deliver modular mini apps that users can activate for personalized experiences. The things that account for the super quality in super apps include:

  • range of services – while a mobile application typically serves a single purpose, a super app aims to be the only piece of software a user needs to perform a variety of actions across services or even industries, like Grab, WeChat, or Gojek.
  • all-in-one toolkit – traditional suites of applications released by tech giants like Google or Microsoft require users to switch between products to access different services. Super apps, on the other hand, shorten the customer journey by allowing users to achieve different goals within a single ecosystem without downloading multiple digital products.
  • data sharing – as opposed to ordinary apps that collect data related to a specific purpose only, super apps gather and process much more user data. While this may raise privacy and security concerns, properly-handled data sharing between respective services is a safe way to ensure an even smoother user experience.
  • financial services – there are limitless combinations of services that super apps may offer, from messaging, social networking, and e-commerce to transportation and health. However, as the examples of Gojek’s GoPay or WeChat Pay within WeChat Wallet show, built-in payment is one of the most prevalent. Super app users are usually required to provide their payment information only once for cross-service transactions – and they don’t need to leave the app to finalize the payment.

What’s the global landscape of super apps?

arrow-down

Ever since the launch of WeChat in 2011, super apps have been on the rise. There has been a notable difference between the emerging and developed economies’ approach to this kind of digital products, though. 

Super apps have taken emerging markets by storm. Among the most notable all-in-one applications released in the last decade are Southeast Asia's leading platforms Grab and MoMo, Latin America-based Rappi, Middle East’s first super app Careem, and WhatsApp, which started turning into a super app in Brazil by launched in-app business directory and shopping features. There are a few reasons why super apps’ have been booming in developing countries:

  • mobile-first nations – the emerging economies didn’t experience the desktop revolution the same way the developer markets did. Only once smartphones hit the market did they get to easily access the internet, which made many Asian nations mobile-first consumers and contributed to the wide adoption of super apps.
  • unbanked population – a large percentage of unbanked populations was the issue that the emerging economies have struggled with for a long time. To give you an idea, in 2018, over 220 million adults in China, 190 million in India, and 99 million in Pakistan didn’t have a bank account. With financial services often lying at their core, super apps allow users to access their assets and make purchases through mobile devices.
  • regulators’ support – governments in emerging economies have been supporting super apps to drive technological advancement together. For example, WeChat’s been subsidized by the Chinese government since its creation in 2011, while Jakarta entered into a partnership with Grab, Gojek, and other local startups to accelerate the launch of the capital’s smart city project. 

While super apps have been proliferating across emerging markets, they’ve been struggling to gain traction in the West. Among the reasons why are:

  • consumers’ concerns with data security and privacy
  • rigid data sharing and antitrust laws
  • cut-throat competition between existing players in most verticals.

What does the super app market look like now, and how will it evolve?

arrow-down

As of early 2023, 68% of the world’s population uses a mobile phone. Over the past year, the community of mobile users grew by 168 million individuals, and over 92% of all consumers use a mobile device to access the internet. These trends make the future look bright for businesses behind all sorts of mobile applications, including super apps, and translate into some promising numbers:

  • In 2022, the global super apps market size was valued at 61.30 billion U.S. dollars and was expected to expand at a compound annual growth rate of 27.8% until 2030. 
  • Gartner predicts that by 2027, over half of the population will be using multiple super apps daily, and their adoption will take place on both personal and enterprise levels. 
  • The survey conducted by statistics bureaus of the US, UK, Germany, and Australia estimated the number of potential day-one users for super apps is estimated to reach 98 million, which would result in an estimated 3.25 trillion U.S. dollars in annual spending on a super app by early-adoption users.

Super apps are widely adopted in Asia, the Middle East, Latin America, and Africa, but developed economies aren’t exempt from this global tech trend. The key to success in the US and Europe is to understand the distinctive needs and qualities of the Western markets. Having that in mind, Deloitte proposed the following direction for super apps in developed countries:

  • Having an established brand with developed user trust will make the organization’s entry into the super app ecosystem smoother, which seems promising for medium businesses and enterprises.
  • While banking and insurance-related features are indispensable in super apps, social media, ride-share, and payment companies are more likely to succeed in the Western market.
  • Unlike in the emerging economies, in the West, it seems unlikely to have one dominant super app; instead, we’re more likely to witness the rise of vertical-specific super apps, which means more opportunities for business growth.
  • Western super apps won’t aim to oust traditional mobile apps, and their competitive advantage is more likely to rely on giving users the ability to “manage fewer accounts, transact faster through consistent payments, save money using loyalty and rewards, and experience a better product enabled by cross-service insights and advice.”
  • Bearing in mind data privacy concerns, super apps targeted at the developed economies’ consumers will likely be more transparent about data use, and their functioning may require closer collaboration with regulators on the business's side.
  • The US and Europe won’t focus on the B2C market alone; we’re likely to witness there the emergence of more B2B super apps that will drive value “through data-driven insights, automated advice, and seamless integration of businesses’ platforms into a single workspace.”

What are the business benefits of super apps?

arrow-down

Super apps have dominated emerging markets, and it’s only a matter of time before their popularity grows in the West. If you’re still wondering if your organization should jump on the super app bandwagon, consider the following business benefits:

  • increased customer acquisition – compared to traditional mobile applications, super apps offer a much wider range of services that cater to the needs of diverse audiences, which translates into a bigger potential user base. As your super app grows, it’s also possible to convert the existing users into consumers of a new service at practically zero cost, much like Gojek did.
  • improved user engagement – providing consolidated services in one place and consistently expanding the offering with new features gives you more touchpoints for interaction with users and makes it easier to keep them engaged. In the words of Dara Khosrowshahi, Uber’s CEO, “when we see customers using more than one product, their engagement with the platform more than doubles.” All of that boils down to bigger profits.
  • business stability and sustainable growth – this benefit relates to the ones we’ve already discussed, but it’s worth paying special attention to it due to the current economic landscape. Super apps embrace vertical growth by encouraging a shift from a product to a platform mindset. Offering a range of services may help your business survive when a given vertical suffers from an unexpected breakdown, as was the case with travel during the pandemic. 
  • increased revenue – services within the super app ecosystem can be provided by either you as the app owner or the third-party partners. Opening up your space to various retailers lets you monetize your product easily.
  • faster bug fixing – you can release fixes and improvements Over The Air (OTA), which means no hassle with Google Play or App Store review processes. Thanks to super app configuration, mini apps can download and install updates instantly without rebuilding the whole app.
  • team independence and development efficiency – while developing super apps in separate repositories, the host of the super app provides the necessary tools and infrastructure. The teams can work independently, which results in faster development, fewer code conflicts, and increased ownership in product teams.
  • security despite users’ concerns with data privacy, a super app is a sandbox where developers can play without breaking anything. You can build an environment where you mock some sensitive parts of your codebase. As a result, the environment is more secure, and external providers can move faster and contribute features to your app.

What makes super apps popular with users?

arrow-down

Super apps collectively have over 2.4 billion active users all over the world. Their enormous popularity in the B2C market can be attributed to:

  • ability to coordinate different aspects of everyday life in one place,
  • convenience and engaging experience without the need to learn how to use multiple apps,
  • time and storage saving resulting from having one user profile and downloading a single app for all services,
  • minimized risk of losing sensitive information when switching between service providers.

These benefits speak to those who haven’t yet had a chance to use a super app. According to a report by PYMNTS and PayPal, seven in ten global consumers express interest in a solution allowing them to manage payments and other everyday activities through a centralized tool. There’s much untapped potential in the developed economies, so why not be among the first to unlock it?

What are the concerns and challenges that come with super apps?

arrow-down

While super apps offer numerous benefits to both businesses and consumers, they come with some serious challenges as well:

  • data privacy – the multitude of services available within super apps is actually a mixed blessing for many users, especially in the West. Having heard hundreds of stories about data privacy abuse and data breaches from big tech companies, consumers are hesitant to share all their personal data with a single service provider, even if it comes with invaluable benefits.
  • regulatory issues – as a result of data privacy infringements, regulators around the world are implementing laws to further protect personal data and restrict sharing of user data between service providers. Another challenge for businesses behind super apps may be the competition legislations adopted in developed economies.  
  • user experience – in terms of UX, the main challenge for the teams behind the mini apps that make the super app is to strike a balance between consistency and uniqueness. On the one hand, the consistent look and feel account for a positive user experience, drive adoption and retention, and foster a sense of safety. On the other, super apps by definition are made to cater to the diverse needs of heterogeneous audiences, all at once. As each demographic segment interacts with digital products differently, the question remains how to maximize usability without overcomplicating the user experience.

What does moving into the super app ecosystem mean for your organization?

arrow-down

Digital products are not developed in a vacuum. The way they’re designed and operate depends on many factors, one of which is communication between the development team. 

As stated by Melvin E. Conway: "Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure." In simple words, Conway’s law means that the organizational structure is often mirrored in software design. For example, large corporations still using legacy technologies are much more likely to build stiff monoliths – and so their product reflects the organizational concerns more than the actual user needs.

A tool to tackle this issue is the reverse Conway maneuver, according to which the desired software architecture is what affects the organizational structure, not the other way round. This way, teams are capable of building digital products optimized for changing user requirements and business objectives, just as is the case with super app development.

The super app approach has a profound impact on how you organize the work of your developers. It enables respective teams to independently develop and deploy parts of the host application as mini apps and gives more room for third-party contributions. The way the super app architecture influences team composition and the development process is a great example of the reverse Conway law in practice.

What should you consider when choosing a super app development partner?

arrow-down

Hiring a tech partner to build your super app can be a real money and time-saver. It takes the burden of internal recruitment from you if you lack in-house expertise in this area and opens up possibilities for upskilling. When looking for a reliable super app development company, we advise looking for the following qualities:

  • experience building super apps – it may sound obvious, but checking if the tech partner’s portfolio includes projects like yours is key. Super apps are a special kind of mobile applications, so the software development company of your choice should know its way around building mini apps and integrating them into whole ecosystems. If you’re wondering about our experience, check out how we improved the performance of MoMo’s super app and mini apps by migrating their architecture to Re.Pack
  • consultancy approach – what sets a good tech partner apart from ordinary outsourced teams is proactivity in matching tech solutions with your needs. You should be looking for a company that’s eager to take a closer look at your current product and situation first, without assessing it as good or bad, but focusing on the potential for improvement. Only once the tech partner understands your pain points and objectives better can they suggest a bespoke mix of technology and solutions. 
  • going beyond development – stepping into the super app ecosystem is not a purely technical choice; it also entails a certain degree of organizational change. That’s why the right tech partner should be able to outline the product roadmap and propose relevant changes to processes, workflows, and peopleware.
  • knowledge-sharing – if your in-house team doesn’t have much experience building super app ecosystems, it might be a good idea to look for a tech partner whose developers will share their specialist knowledge with your squad. This will make the long-term development work more efficient and lay the foundations for sustainable business growth.

At Callstack, we’ve got super app development skills and a business-oriented proactive approach. Get in touch with us, and let’s find out how we can help your business succeed with the next big super app.

What are key tech considerations for super app development?

arrow-down

The unique experience that super apps offer comes with some special development considerations. Here’s a brief overview of the main factors, which you can read more about in the tech FAQ:

  • tech stack – there’s no one-size-fits-all solution to building a robust and sustainable super app, so you can go for native or cross-platform development, depending on your needs and capabilities. Our experience shows that choosing React Native and Re.Pack means optimal user experience and the ability to leverage code splitting for streamlined development and simplified management of your super app.
  • consistent performance – whether you’re in charge of all services or you’re cooperating with a third-party partner, all functionalities within your super app should have equal operating speed and effectiveness, even on low-end devices and in the low-speed internet environment.
  • user-friendly design – the abundance of features can be overwhelming unless you minimize the friction with a consistent design. To captivate the users, your super app’s design should be visually appealing yet clean and intuitive, especially if you’re planning to win the hearts of Western users, who are accustomed to straightforward navigation and minimalist design.
  • security ensuring user safety should be a priority for every tech business; however, with super apps storing all personal information in one place, their creators should put in even more effort to prevent security breaches. The precautions your development team can take include pen tests, 2FA, code obfuscation, data encryption, and more.

What approach to super app development can you adopt? 

arrow-down

Digital products come in all shapes and sizes, which is why the common answer to many questions in software development is “it depends”. Super app development is no different, as depending on your preferences, you can choose from the following approaches:

  • Native Android application with Feature Delivery
  • Native iOS application with WebViews
  • Cross-platform React Native application with Metro
  • Cross-platform React Native application with Webpack and Re.Pack

At Callstack, though, we recommend going for the latter because it proves to be the most beneficial. Compared to other tools and solutions available on the market, Re.Pack allows you to enjoy:

  • reusable features
  • smaller JS bundle size
  • OTA updates of on-demand features
  • time and cost-effective development experience
  • ability to leverage third-party contributions

If you’re wondering how it works in practice, we encourage you to check out our super-app-template.

What exactly is Callstack’s super-app-template?

arrow-down

Our super-app-template is a repository demonstrating how to structure a super app when working with Re.Pack and Module Federation to achieve the best business results. It highlights various solutions and best practices developers can employ to tackle challenges and streamline the super app development process. 

The super-app-template comprises:

  • the host app, which is the main container for the micro-frontends
  • the shell app, which functions like a blueprint of the host app with shared dependencies
  • a few mini apps, each dedicated to a single service booking, shopping, dashboard, and news – the latter being stored in a separate repository. 

You can learn more about the architecture and the intricacies of the template from the case study published on our blog.

What does the super app How does super app development with Callstack template influence your team’s work and developer experience? look like now, and how will it evolve?

arrow-down

By definition, a super app is built as a platform “to deliver a mini apps ecosystem that users can choose from to activate for consistent and personalized app experiences.” This modular approach allows a large development team to split into smaller squads, each focused on a respective mini app, and enables third-party contributions to be seamlessly integrated into the final product. 

When implemented right, such a workflow may lead to greater flexibility, independence, and development speed. Among the steps to optimize developer experience in the super app setup, there are:

  • creating and exposing a sandbox environment that closely resembles your host app, like the shell app in our super-app-template,
  • if need be, creating an SDK that contains common and repeatedly used elements,
  • organizing the codebase into a monorepo, which is an optional step.

Using Re.Pack and our super-app-template to build your super app makes the application of these tips in developers’ work much easier.

Bundle React Native apps using Webpack features

Discover Re.Pack – a Webpack-based toolkit that allows you to build a React Native app with the full support of the Webpack ecosystem.

learn more

More posts from this category

Ensure your React components perform as intended as your app grows

Discover Reassure - our open-source library that allows you to run performance tests measuring the average rendering time of the in-app components.

business benefits

Performance Optimization

To stay competitive, you need a high-performing app. Improving React Native performance can bring your company many business and tech benefits. To learn more about it, check the page entirely dedicated to React Native Performance Optimization. Discover a real-life example of React Native optimization we performed for Aaqua, a Singaporean platform that enables global users to share their passion through groups.

Bundle React Native apps using Webpack features

Discover Re.Pack – a Webpack-based toolkit that allows you to build a React Native app with the full support of the Webpack ecosystem.

business benefits

Why React Native?

Building an all-in-one platform can bring your company a lot of business and tech benefits like seamless UX experience, global reach, brand growth just to name a few. To learn more about the benefits of using React Native to develop super apps, check out the MoMo case study. Where we helped improve app's performance by migrating architecture to Re.Pack.

stay tuned

Subscribe to our newsletter

You may unsubscribe from these communications at any time. For details see the Privacy Policy.