Cross Platform Apps the Hard Way – Part 1: The Idea

Nowadays, there are many different ways to build a cross-platform app, including React Native, Xamarin, and Flutter, to name a few. These each come with their own pros and cons, but they all serve the same purpose: allowing you to create “native” cross-platform apps relatively painlessly and cheaper than building out native apps specific to each platform.

What I intend to explore through this series of blog posts is not “how can I make a cross-platform app the easiest possible way?”, but rather “how can I make a cross-platform app in the most robust possible way?” I’m not looking for shortcuts or easy-ways-out, and I want to see just how much logic for the app I could share between multiple platforms. In order to keep things interesting, I’m going to start with just Android, and eventually branch out to iOS, but I want to take things a step further and port the app over to a desktop platform using the same underlying code and only rewriting the UI layer each time.

Naturally, there are several languages one could use given the constraints I’ve defined, but I want my code to last. I’m aiming for the longest usability, so I don’t want to worry about the language evolving too much and rendering my code obsolete or so old that it’s painful to refactor. As such, my language of choice is C. I’m hoping C will give me the greatest amount of flexibility and control over the implementation details so that I can bring the internal libraries I write to any new platform with just the addition of the UI logic in the native language for the given platform and minimal C bindings in the event that I’m working with a language I haven’t previously worked with. If I’m being totally honest I’m also looking for an excuse to work with C a bit more so this is knocking out two birds with one stone 😛

I don’t imagine this will be quick nor painless so I won’t make any guarantees for how often I’ll post an update, but I’ll try to write something up any time I run into something interesting. Additionally, I’ll keep the code open source so that I can get some feedback from the community and share my findings! Here’s to not taking the easy way out!

Disclaimer: I don’t mean to diminish the work done by developers of other cross-platform frameworks like Flutter, React Native, or Xamarin, nor am I implying that their jobs are easy. Development with these frameworks are all as respectable as development in any other domain. At the end of the day, we’re all just trying to solve problems with computers.