Click here to Skip to main content
15,890,506 members

Survey Results

When writing an app, do you try and write a single, cross-platform app, or one app for each platform you target?

Survey period: 6 Dec 2021 to 13 Dec 2021

One codebase is nice. Using native features is nice. Making choices is hard. And obviously sometimes it depends on the project (so choose all that apply)

OptionVotes% 
A single, cross platform code base whenever I can27150.00
One application per platform16430.26
An app for multiple platforms, and special case apps for specific platforms10018.45
I use containers to bypass the whole issue509.23
My apps leverage other cross platform platforms (eg web applications, VMs)10319.00
I do something else (please fill us in!)6912.73
Respondents were allowed to choose more than one answer; totals may not add up to 100%



 
GeneralIf it can be portable, write it that way Pin
Owen Lawrence11-Dec-21 11:21
Owen Lawrence11-Dec-21 11:21 
It's just a matter of time before your platform is yanked out from under you. It might be many years, but it'll happen. Do you really want your entire career legacy discarded just because someone changed something you depended on? And how much fun is it to keep retooling your code whenever you suffer a mandatory compiler update?

So many times my bosses rejected portability as a concern (as they did with concurrency), only to have to turn away customers three years later that wanted our application on a different platform like our competitors offered. It's much more expensive to retrofit later than to start out that way, so expensive it usually doesn't happen.

If I can, I write portable code. In a large application there are often parts that will never be portable and have no need to be, but I wall off those parts from the rest of it, and when they're eventually excised they don't take down the whole thing. Code I wrote in the '90s is still being used (on multiple platforms).

I reduce my dependency on platforms by avoiding basic functions that are provided in 3rd party libraries "as a convenience", and use portable versions as much as possible. Keep the GUI layer as thin as possible by keeping business logic out of it. Never buy into a vendor's example code as the "right way". Pure math and other problem-space algorithms can almost always be portable, and it can be difficult enough that you never want to rewrite it just to avoid the library you shouldn't have relied on. Even graphics can be mostly portable if you're careful. Separate all hardware access into its own layer (if you can--and you almost always can).

Show some pride and write your code to last. Portability is one more tool to do that.
  • Owen -

AnswerShared + platform specific code Pin
Ravi Bhavnani10-Dec-21 17:26
professionalRavi Bhavnani10-Dec-21 17:26 
GeneralAgain with 'App' Pin
den2k888-Dec-21 21:58
professionalden2k888-Dec-21 21:58 
GeneralI code a WinForms app Pin
Marc Greiner at home8-Dec-21 10:16
Marc Greiner at home8-Dec-21 10:16 
GeneralMissing option: I code for one platform and one platform only Pin
Johnny J.8-Dec-21 2:48
professionalJohnny J.8-Dec-21 2:48 
GeneralRe: Missing option: I code for one platform and one platform only Pin
wmjordan9-Dec-21 14:33
professionalwmjordan9-Dec-21 14:33 
GeneralI also only write for one platform i.e. Windows desktop Pin
BernardIE53177-Dec-21 10:44
BernardIE53177-Dec-21 10:44 
Generalpossible option of one ring to rule them all! Pin
MarcusCole68337-Dec-21 3:55
professionalMarcusCole68337-Dec-21 3:55 
GeneralCrossplatform... FOR WHO?? Pin
Thornik7-Dec-21 2:44
Thornik7-Dec-21 2:44 
GeneralRe: Crossplatform... FOR WHO?? Pin
den2k888-Dec-21 21:55
professionalden2k888-Dec-21 21:55 
GeneralI only write for one platform. PinPopular
Slow Eddie7-Dec-21 2:36
professionalSlow Eddie7-Dec-21 2:36 
GeneralTo OSALs! Pin
Member 91670577-Dec-21 1:10
Member 91670577-Dec-21 1:10 
GeneralOne platform, One codebase PinPopular
Lorenzo Bertolino6-Dec-21 21:38
professionalLorenzo Bertolino6-Dec-21 21:38 
GeneralPrograms, not Apps PinPopular
M.Vo.6-Dec-21 20:09
M.Vo.6-Dec-21 20:09 
GeneralA mixed bag for me Pin
Erik Burd6-Dec-21 7:52
professionalErik Burd6-Dec-21 7:52 
GeneralWrite once, compile anywhere Pin
dhaxton6-Dec-21 5:06
dhaxton6-Dec-21 5:06 
GeneralBack in 1995 ... Pin
Amarnath S6-Dec-21 3:48
professionalAmarnath S6-Dec-21 3:48 
GeneralDoes not apply to me Pin
PIEBALDconsult6-Dec-21 2:23
mvePIEBALDconsult6-Dec-21 2:23 
GeneralRe: Does not apply to me Pin
Nemanja Trifunovic6-Dec-21 2:39
Nemanja Trifunovic6-Dec-21 2:39 
GeneralNo Cross-platform Pin
Amit Joshi CP6-Dec-21 0:23
Amit Joshi CP6-Dec-21 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.