Java developer try Jetpack Compose for first time

Christopher Duran
5 min readApr 20, 2024

--

5 years using Java and now its time for Jetpack Compose.

Background

I’ve worked with international clients, and I guess I’m a full-stack developer because I’ve created projects using both web and mobile technologies, such as Node.js, Flask, Java, Flutter,React, Mongo, and more…

Recently, I received a notification from Google stating that my developer account for publishing Android apps would be deleted. This is because although I have experience developing mobile apps for clients, I have never uploaded my own app to my profile.

Also, I only had two days to create and launch my app, which happened to be my weekend, because the following day I needed to start working on a new project for an important client.

So I thought Okay, let’s do this.’ It’s time to dive into Jetpack Compose, one of the newest technologies recommended by Google for developing mobile apps.

And also, being an Android developer, I know it’s crucial to stay updated with new technologies.

Looking for some idea

I know that just to try out Jetpack Compose, I could create a Hello World, launch the app on Play Store, and solve my problem. However, I decided to truly learn how easy or hard it is to implement a basic feature using Jetpack Compose. I looked for some ideas, considering that I only had 2 days to do it, so it wasn’t possible to create an app with complex functions. Searching online, I found one idea that caught my attention: creating an app about learning cooking.

Why? Because, at least in the region where I live, men don’t enjoy cooking as much. And yes, it’s often assumed that men don’t like to cook because it’s traditionally seen as a task for women. However, sometimes it’s because men don’t have easy access to tools for learning to cook native meals. We recognize the need to change this perception.

So I asked myself, ‘Are there any apps available on the Play Store that showcase typical meals from my country in one app?

I did a search on the Play Store, and there was only one app available for it. I downloaded the app to see what it offers, and indeed, it provides a list meals native to my country. However, it seems that the developer is from another country, and what they did was simply duplicate the app, changing the name for each country.

My app needed to offer something new and make it feel more authentic to my country.

What’s new is my app offering?

To make my app interesting and different from the only app available that shows a list of meals native to my country, I decided to implement the following feature:

  1. Show videos on how to cook the meals.
  2. Keep updated prices of food and ingredients so users can plan what ingredients they need to buy or learn.

Technically, my app should to provide:

  1. Onboarding
  2. Bottom Navigation View
  3. List
  4. Images
  5. Searching
  6. Youtube video streaming
  7. Http Request
  8. Circle loader while server data is fetching
  9. Modal Bottom Sheet for some extra options 😉
  10. Shared Preference
  11. Share text for other chat apps to invite to download the app
  12. Notifications
  13. Email contact intent
  14. Internazionalization
  15. Services running in background

On the other hand, it is necessary:

  1. Create a nodejs server to provide data to the app and keep updated with new meals and prices.
  2. Use Firebase Hosting to deploy the server.
  3. Use Firebase messaging to send notification to the user.
  4. Develop my app using a comprensive structure dividing the code in packages like: components, screens, utils, etc…

Result

If you would like to test an app made with Jetpack Compose try:

Cocina Nica is the app I’ve developed to help people learn how to cook traditional meals from my country.

Cocina Nica was the result of two days of development using Jetpack Compose and Node.js, with the aim of helping people learn to cook traditional dishes from my country. I aimed to offer something new and unique on the Play Store, keeping product prices updated if you want to try cooking some recipes and helping you make a good choice.

Review

Was it really easy to create an app using Jetpack Compose as Google claims? The reality is… it depends on your development skills and experience.

Prior to this project, I was working on a personal project using Flutter. Perhaps for this reason, I didn’t find it so difficult to understand how complex Jetpack Compose is, as both use declarative programming. However, transitioning from Java to Jetpack Compose was quite a leap.

But for sure, creating apps using Java + XML, and noticing that you can create both the UI and functionality in a single file without ID linking, can be confusing the first time.

One of the most impressive things I experienced using Jetpack Compose is how fast the build process is. Sometimes, I only needed to wait three seconds to test the new build.

Conclussions

It’s essential for mobile app developers to stay updated. Don’t shy away from new technologies, or you’ll fall behind. This new declarative programming approach, gaining popularity with frameworks like Flutter or Jetpack Compose, looks awesome.

While reviewing my LinkedIn profile, I was surprised by the high demand for Android developers with skills in Kotlin and Jetpack Compose. Perhaps it’s becoming a reality that Java is being phased out.

🪙 You can buy my projects and support me on:

--

--