173 reputation
5
bio website bretkuhns.com
location Westlake, OH
age 28
visits member for 2 years, 11 months
seen Oct 1 at 13:06

Oct
1
awarded  Commentator
Oct
1
comment How to setup the c++ rule of three in a virtual base class
@JanHudec, there's a third solution that sits between the two you presented: type erasure. Using something like Boost.TypeErasure's "concepts-based polymorphism" through any, you can use concept constraints without having to use template functions everywhere.
Oct
14
awarded  Scholar
Oct
14
accepted Can WinRT really be used at just the boundaries?
Oct
14
comment Can WinRT really be used at just the boundaries?
As @alexcohn pointed out, if the core functionality is heavy enough at the time that I decide to go cross platform, then it will be worth wrapping portable code with platform specific layers. Otherwise, I'll just rewrite the code and use test suites to verify behavior across different platforms (where appropriate).
Oct
14
comment Can WinRT really be used at just the boundaries?
I agree. I started the project targeting WinRT, but knowing Android/iOS would be attractive platforms to port to, which prompted this question. I've since decided to write specifically against WinRT only. If the project itself draws a crowd, I'll worry about porting (or rather, rewriting to another platform) then.
Oct
12
awarded  Nice Question
Oct
10
comment Can WinRT really be used at just the boundaries?
@alexcohn That sounds more like a bronze bullet to me... thanks for the article!
Oct
9
comment Can WinRT really be used at just the boundaries?
@alexcohn Right, and that makes perfect sense. I asked the question with my fingers crossed that there was some silver bullet I was missing to reduce the glue code between standard C++ and C++/CX. I haven't seen any better way, so I've since taken it for what it is. Can't blame me for hoping to reduce the amount of glue ;-)
Sep
7
comment Can WinRT really be used at just the boundaries?
@GlenH7 Perhaps the only way to keep your application code consistent across platforms is to write your own platform abstraction layer, but those layers will end up being what I was trying to avoid in the first place. It's simply moving the problem around with a layer abstraction to isolate things. Perhaps helps, but in the end you're still doing the work.
Sep
7
comment Can WinRT really be used at just the boundaries?
@GlenH7, I believe comments have mostly answered this for me. I had reached the same conclusion, but was hoping someone had a more clever idea in mind. In general, things are just the way they are. You can do your best to isolate portions of your code, but for the most part you will end up needing to rewrite platform-specific portions of the code (such as in the ViewModel examples above).
Aug
7
comment Can WinRT really be used at just the boundaries?
Good point. It seems the only reasonable way to get my models' data to and from the view would be with a ViewModel layer for each platform.
Aug
7
awarded  Student
Aug
7
comment Can WinRT really be used at just the boundaries?
I thought of that, but each VM effectively turns into a WinRT wrapper around my standard C++ models. Plus all the ViewModel code becomes specific to WinRT.
Aug
7
asked Can WinRT really be used at just the boundaries?
Jan
19
awarded  Supporter