Potential way to do almost-cross-platforms GUIs

Is well know the problem of try to do a cross-platform GUIs. But in the other end, the necessity to do that have increased with the arrival of mobile and the emergence of OSX as a viable target for commercial apps.

Is kind of ironic that is easier to port a full 3d-game but a “simple” business app is a huge undertaking :slight_smile:

The key, IMHO, is decouple some tasks (kind of separate “back-end” UI from “front-end” UI).

We can do “partial/almost” cross-platform UI, if we think that some stuff can actually cross cleanly:

A big chunk of the logic is totally cross-platform and “only” need to adapt the render of controls. This way of working allow to work with pure objects for the model and the view without actually commit to exactly what is the view UI. Instead, is delegated to the “update” side. It can totally be just in-memory, testeable object.

  • Dispatching, events and similar stuff, that is not visual. This need a bridge but I don’t think will be complicated.

Then finally, the rest can be fully native:

  • Controls

  • Drawing

  • Animations

  • Call to native libs

This mean that we build components instead of a class hierarchy and is possible to swap what is a “control”, like, from HTML to iOS Views without moving the rest of the logic.


The big question is what to use for coding this. I’m using .net but wish to have something more low-level. I know swift and it could work for other targets (Java, .NET, native) with elements.

Wish to have a coding partner to do this :slight_smile:

This is a fairly complex subject with so many options. From custom drawing (like you suggest) to using existing libraries per platform (imo, the best option); but the really tricky part as ever will be to put it together. Personally I’m fond of an approach like Eto: https://github.com/picoe/Eto or libUI https://github.com/andlabs/libui approach. Just don’t have time to do it :slight_smile:

No, I don’t suggest custom drawing… instead is using existing libraries!.

Ah. Must have misunderstood it (the yoga layout thing seemed to imply it to me)