3 ms·
Knowing that each API is slightly different there are two paths you could take. An MVC like approach where everything platform specific is sectioned off in the
by stonemetal 15y ago
Knowing that each API is slightly different there are two paths you could take. An MVC like approach where everything platform specific is sectioned off in the view and just have totally different views for each platform. The second is use the dependency inversion principle, and build a layer that abstracts the underlying api away then depend on your abstraction instead of the underlying API. Either way you end up writing 70%-80% of the code once, and 20%-30% of the code three times. Not great but it beats writing 100% of the code 3 times.
Is C# the right language to do that in, maybe, maybe not but it is an option.