Mobile App with Flutter for frontend and node js for backend
In this blog post, i am updating my journey of coding first production android flutter application. Due to the terms of my employer i cannot share the exact name of my application, but i can talk about the selection of the techstack and my way of implementing it.
I dont want to sound generic and biased against any framework, but i had more problems implementing major tasks requirement setup by the company's project manager. Not because i hated programming in dart but as an javascript and typescript developer being forced to make it in dart programming language made the entire coding experience a chore which i did not like. HOT TAKE -> Dart feels like a brainchild of java and javascript. I would much prefer react native over flutter, but i had to deal with the cards i was being dealt with.
Making the backend (The fun part)
Technologies Used
Backend Language - Node js
I had been given an ubuntu vps for the node process, and to reverse proxy i have used nginx proxy manager. Previously i had trouble setting up typescript with node js, it was actually the best way to develop an node application, which was to code out it in typescript and build it out in javascript. For a very long time i have been thinking about using Golang because of the things i can do with Go but not with typescript (maybe i could have if given a sophisticated amount of time), but at that time due to the stricter deadline i made up my mind to use node js and express.
Setting Up the Frontend (The painful part)
Flutter + Dart + Clean Architecture Codebase.
‘The Dependency Rule’, which says that “source code dependencies can only point inwards. Nothing in an inner circle can know anything at all about something in an outer circle”. - Uncle Bob.
This might have been the most easiest part after deciding to go with Clean Architecture and Mockito for testing. I started creating the usecases and entities. Whereas i would not have put this much thought on any other react native app, as it was my first time tangling with dart and flutter. I was starting to get a hang of it. One thing i realised that the flutter devtools was much better and helpful than react native's flipper (There might be better ways to debug rather than built in react native's preffered devtools). This project in the end made me thank the effectiveness of clean architecture which helped me to deliver this project within before my deadline. Even though being more verbose it was fun putting every piece of business and application logics layers as the puzzle of something greater.
One thing i would agree that flutter for User Interface is amazing the availablity of the premade components unlike the ui component libraries in react native. After this project it still felt like flutter was more focused towards android as it felt snappy, but in IOS the performance seriously dropped. I think flutter has already fixed this, but from my experience i would prefer React Native because i would love to code in the same language as my backend and in react native i felt more free and not limited to some design architectures to produce good apps unlike flutter.