Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not sure if you understood the "native yet crossplatform" part.

I'm not talking about native code, I'm talking about a native looking UI. In other words, Win32 on Windows, GTK/Qt on Linux, etc. Instead of Electron or QML.

Obviously you don't need to rewrite the backend unless you're an idiot. But in some applications, the frontend part is huge.



Sure I did, hence why I mentioned it needs to be done from day one.

The whole set of abstraction modules, need to be properly defined so that the whole architecture is able to use the best patterns from each platform without feeling a kludge.

How do you think many of us wrote portable software across Atari, Amiga, Acorn, Mac and PC?

One needs to abstract platform concept's like opening files into a modular API that accepts only the application relevant parameters, then provide an implementation using the platform specific UI toolkit.

It was harder to do with the Assembly applications, due to the hardware differences, but it was still possible to keep some code for those that shared the same processor architecture.

Still using a similar modular approach. Here using macro assemblers was a big help.


I still don't see how this is going to protect you from writing native code for all platforms. You can have all the abstractions you want, at some point you need to code to the native toolkit. The code that actually gets a window or button on screen, or receives (rather than processes) the input events.

In case it isn't clear: Qt Widgets (and WxWidgets) did this for you. You could literally compile a native looking and feeling app for the major platforms from an identical C++ codebase.


Qt emulates the platform L&F hence why Mac users "love it".

Also Qt doesn't do this for any mobile OS. You are expected to do it yourself with QML. The Quick Controls only cover the mostly used ones and still don't do iOS or UWP themes.

Yes you need to write platform specific code, but it makes use of the native UI, not emulating it, and after a while you have your in house framework, so it is not like you are writing from scratch every time.

This is the approach taken from Dropbox or Microsoft, for example.


Also Qt doesn't do this for any mobile OS. You are expected to do it yourself with QML.

Right, that's the "did this" part. It no longer works.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: