|
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.
|
|
|
|
|
My non-UI code is cross platform (Win/Android) C#/.NET and my UI is platform specific (Win desktop / Android), and also written in C#.
/ravi
|
|
|
|
|
First of all 'App' is the sound someone makes when they try to hide a belch, not something that runs on a computer.
Anyway, working on microcontrollers and SoCs make writing crossplatform code impossible on one side and necessary on the other - the idea is to keep most of the logic separated from the hw through adequate layers... except that the logic of a firmware is at leats 50% managing its own hardware.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
|
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
The missing option is too obvious to be listed
|
|
|
|
|
I know no other platforms
|
|
|
|
|
|
Seriously! For who you write your "unvaluable programs"? Now many sales you have on every platform? (if you have any) Does your profit covers efforts on multiplatform? If you write GUI app, have you any valuable profit beyond Windows platform?
Answer all these questions and you quickly realize - nobody EXCEPT YOU needs this pathetic "multiplatform". Especially when you sacrifice features in favor of "works anywhere".
|
|
|
|
|
Android and iOS *is* multiplatforming.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Sad but true!
ed
|
|
|
|
|
Abstract everything, right? Working in standard C++ with the only-if-really-needed OS-specific parts being an own class (enter OSAL), differentiated by defines, is actually pretty fun! So far, never needed an OSAL in C# (SerialPort totes needs OS-specific abstractions in C++).
One question remains, where to put SDK-specific stuff not in standard, but technically not OS either (despite coming with the OS SDK) i.e. _getch()
|
|
|
|
|
Targeting just Windows, we have no worry about cross-platform stuff
|
|
|
|
|
I'm writing programs, for Windows, mostly in C#.
No "Apps".
so: missing option
|
|
|
|
|
I've worked on platform specific software, along with cross-platform projects. For some of the cross-platform work I did, we had individual specialists for each platform who would tweak and make the necessary adjustments that were platform specific (optimization, etc.) but otherwise we kept the code as generic as possible.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."
-- Marcus Brigstocke, British Comedian
|
|
|
|
|
which is the byline of the Lazarus/Pascal environment, IMNSHO the best kept secret in desktop (or mobile) development.
Dave H
|
|
|
|
|
When Java got introduced, its tagline, from what I remember was "Write Once, Run Anywhere". People would say that you just have to master Java, and there will be nothing else to learn.
Hard to say whether Java really lived to this promise.
|
|
|
|
|
I don't develop that kind of stuff.
|
|
|
|
|
I guess same here, but I honestly don't even know what they mean by "apps" nowadays. The word used to describe programs that run on iPhone, but I can't believe most people here develop those.
|
|
|
|
|
I am writing applications targeted to single platform. No cross-platform needed...
Amit Joshi
Value of the value is valued only if its value is valued.
|
|
|
|