A Golang Backend Challenge for an Android Developer
My experiences and projects as I share my journey from starting my career as an Android developer to developing backends with Golang in this article.
In 2016, our graduation project on indoor navigation for shopping malls, developed at Ankara Yıldırım Beyazıt University, was selected as the best project of the university. I thought, "Android is pretty cool, I'll continue with this," and from that day until January 2024, I pursued my career as an Android developer. As you know, frontend work is useless without backend - web services and APIs (Application Programming Interface). I won't go into the details of these; they are well-known topics and I don't want to make this post too long. 😊
Communication with the backend is always an important step for frontend developers, especially when collaborating with backend developers who haven't worked with mobile teams before. Despite this, we can't do without them; even in our tiny personal projects, we look for backend developers. Creating a database, writing, and publishing an API becomes a daunting task.
With the rise of AI in our lives and the disproportionate increase in learning resources, I decided not to be content with just knowing Android. With a job change in January, I took a break from developing native mobile apps with Kotlin and started a new job with a completely different stack of technologies.
Now, I'm a team leader, and we work on web technologies. As my responsibilities increased and our team is small, I want to showcase my problem-solving skills, learn everything, and even tackle functions in the database. We needed to write an API at work. Of course, I jumped at the opportunity, saying, "I'll handle it." I had the feelings I mentioned above; I thought, "I need to look into backend development now, it can't be that hard." The opportunity had come.
![](https://res.cloudinary.com/jerrick/image/upload/d_642250b563292b35f27461a7.png,f_jpg,q_auto,w_720/66809b4d777f91001d7facc9.png)
I had heard a lot about Golang, and without hesitation, I started developing with the help of AI. Within minutes, the API was ready. I never thought it could be completed so easily and quickly. Writing services, which had seemed like a huge issue in my mind for years, had now become as easy as Android. Of course, I still have great respect for large projects, but for a small project, developing a backend with Golang is much easier and faster.
During the 2024 Ramadan Bayram holiday, I wanted to further develop myself with Golang. I decided to revisit the running app project for our running team, Runarchy, which we had shelved due to not finding a volunteer backend developer. This project had been a sore spot for me since then.
In this software project, we planned to do the following:
· Mobile app
· An admin panel for data entry
· Approximately 25–26 REST API services, mostly CRUD, to be used in both the frontend and the admin panel
First, I started developing services for both the admin panel and the mobile apps. For the login functionality, I got help from Firebase. Within a few hours, my login service was ready and, thanks to the partnership between Golang, Heroku, and Git, it was already published on Heroku. In this process, I detailed how we managed user authentication with a data flow chart that you can see below:
![](https://res.cloudinary.com/jerrick/image/upload/d_642250b563292b35f27461a7.png,f_jpg,q_auto,w_720/66809b4d777f91001d7facca.png)
User Authentication Process: · The user attempts to log in to our mobile app by entering their email and password.
· The app sends a request to Firebase to check the user's existence and the accuracy of the credentials.
· If the user exists and the credentials are correct, Firebase sends an ID token, a temporary identity text of 926 characters, to the app.
· Our login service receives this ID token from the app and queries Firebase to see if there is a user associated with this token.
· Firebase sends a unique and immutable identity text for the user.
· Our service sends this user ID to the client, ensuring that all operations remain specific to the user.
I didn't see the need to store additional information like users' email addresses, but for a more comprehensive project, it might be necessary to store additional data such as login time, email address, and device information. The structure of the login service can be shaped according to such needs.
Golang was indeed as good as they said, even better. We had tried this project 4–5 years ago with a friend who was writing in Ruby on Rails (a web application development framework written in Ruby). The 25–26 services had overwhelmed him, and he abandoned the project midway and didn't even respond to my messages. The code he wrote in Ruby remained in a dusty corner on GitHub.
I had tinkered with this project written in Ruby, but I couldn't fully grasp the code structure. However, with the same project written in Go, knowing the purpose and function of each file clearly was a very different and enjoyable experience. Working in a language without boilerplate was a new experience for me. Of course, I won't go into a detailed comparison with Ruby because I'm not that competent, but feel free to come at me in the comments. 😊
My services were so ready within a day -some with their tests- that when a mobile app user recorded a run, if they added their shoes, the shoe mileage was automatically added to the data in the shoes table. This way, we recorded a crucial piece of data in the running world -the shoe lifespan. As someone who had spent years in Android, I couldn't believe it. The code was very simple, clean, readable, and understandable. Despite only dealing with Go for a few days, I could explain every part of my code in detail. I had never been so proficient in any project I had written in Android.
![](https://res.cloudinary.com/jerrick/image/upload/d_642250b563292b35f27461a7.png,f_jpg,q_auto,w_720/66809b4d777f91001d7faccb.png)
Dear native developers, as I mentioned in my previous posts, don't become slaves to technologies, languages, and libraries. See them as tools for producing software because you never know where or what state the technology or language you admire will be in five years…
Even though I liked Golang, Javascript, and Vue.js, I did miss encapsulation, BaseActivity, and Fragment. We'll get to those in other posts.
![](https://res.cloudinary.com/jerrick/image/upload/d_642250b563292b35f27461a7.png,f_jpg,q_auto,w_720/66809b4d777f91001d7faccc.png)
Stay with love and code…
About the Creator
Alparslan Selçuk Develioğlu
8+ years experienced Android Dev. Freshly a Software Team Leader. Colorful, confident personality, a fan of science fiction and fantasy works. An Ultratrail runner who runs in races 60+ kms
Enjoyed the story? Support the Creator.
Subscribe for free to receive all their stories in your feed. You could also pledge your support or give them a one-off tip, letting them know you appreciate their work.
Comments
There are no comments for this story
Be the first to respond and start the conversation.