4 ms·
To date, the best solution to this problem that I have seen is to write all your core code in a shared library using something like C++, and then hooking it up
by saagarjha 8y ago
To date, the best solution to this problem that I have seen is to write all your core code in a shared library using something like C++, and then hooking it up to a thin layer of completely native, platform-specific code for the UI. It’s fast, lightweight, looks good, and requires minimal extra code if you do it right.
- ashsys 8y agoShameless plug: https://github.com/AshampooSystems/boden https://github.com/AshampooSystems/boden We are working on providing exactly that thin native wrapper in modern C++ without much bloat.
- zerr 8y agoAre you associated with https://www.ashampoo.com https://www.ashampoo.com ?
- ashsys 8y agoYes we are a subsidiary of https://www.ashampoo.com https://www.ashampoo.com
- holy_city 8y agoDo you guys plan on supporting desktop apps or are you sticking with mobile?
- ashsys 8y agoFor the first release we are sticking with Mobile, but Desktop is "next on the list". ( And there is rudimentary macOS support right now )
- slezyr 8y agoI can make a GUI in Qt and it will work on android, but I developed a simple time and there was a huge problem. When device goes to sleep it don't runs any code in background and I couldn't play or do anything on timeout. Does your framework solves any problem?
- deleted 8y ago[deleted]
- happyweasel 8y agoMVP (Model View Presenter) is one approach to decouple the UI from the interaction logic to achieve that goal. Only the view implementation has to be platform specific. The viewmodel is also shared among platforms.
- Cthulhu_ 8y agoIs that the pattern React implements? I've seen it being used for mobile and VR for example, but IIRC you need to use different components for those targets. I do recall someone replacing the renderer output from HTML to err, text or XML I believe.
- simion314 8y agoIt is still a lot of work if you need advanced things then the basic widgets. Thinks where usually you need to extend existing widgets like you want an advanced datagrid/table with sortable/dragable columns, with custom item renders for some columns (like a chart widget for the Trends column). In this advanced cases you will need to create custom widgets for each platform, hope that all platform have the advanced datagrid widget(if not you will have to create it) etc. For simple apps your solution works, and you could also make a CLI app too.
- PorterDuff 8y agoExactly. There's GUIs and there's GUIs. When I've looked at libraries, I always consider how you'd implement the Visual Studio interface with them.
- afturner 8y agoRight. Things like trees, multiple windows, theming, advanced components (with deep composition), collection views, etc. These are the real use cases for a library like this, but no such thing exists apart from Gtk and friends.
- simion314 8y agoExactly, and I see people that will say you can do X with html/css and js but when you look at that example is full of bugs(for corner cases), missing features(like missing essential events), are not efficient etc. If you look at a mature GUI library advanced widget you will see how many events and thing supports and how many bugs were reported because there are many corner cases that need handling. I worked a lot with Flex4 I loved the fact that the widgets were optimized, you could have a list or tables with 1 million items and it would not affect performance. In Web I see the pattern where you use a lot of pages, you show like 12 results and you have the user hit Next and Next when you could have fitter a lot or even all the results on a large page, especially if is all text
- tonyedgecombe 8y agoI think this is the best option but for most it's still a lot of work. I spend far more time on the UI code of my applications than I do on the model or domain specific parts.