DEV Community

Discussion on: Just port a Golang game to Android

Collapse
 
krusenas profile image
Karolis

I actually explored similar strategy once and it was "okay" but it was far from a good android app.
Recently I have tried a bit different approach and was super happy with it:

  • App frontend written in Dart + Flutter. Dart seemed very familiar after Go and didn't even have to read language docs to actually write it. Flutter was also familiar after working with React/Vuejs (state management).
  • App backend (logic, storage) was written in Go as I am most comfortable writing GO.
  • Connecting frontend to backend via a JSON RPC, basically got a thin shim between the languages written in Java that I could write once and not modify ever. For example have a look at this: github.com/adieu/flutter_go.

Pros:

  • Flutter is a superior framework to anything I have ever seen for mobile.
  • Writing backend in Go seems safe and nice

Cons:

  • I would probably just go all-in and write the app fully in Dart but since I already had lots of code in Go that I could reuse for the app, it didn't make sense for me at that time.