Silverlight和C ++或C ++到C#正在进行代码转换? [英] Silverlight and C++ or C++ to C# ongoing code conversion?
问题描述
我正在开发一个基于图形的产品,其中我想为iPhone,桌面操作系统/ X,Windows平板电脑,基于Silverlight的浏览器,Windows Mobile和Windows按照优先顺序生产版本。
I am working on a drawing-based product where I want to produce versions for iPhone, desktop OS/X, Windows Tablets, Silveright-based browser, Windows Mobile, and Windows in that order of priority.
对于GUI可移植性,经典的答案是保持核心在C + +和使用Cocoa / Objective-C或WPF / C#薄层。
For GUI portability, the classic answer is to keep the core in C++ and use Cocoa/Objective-C or WPF/C# thin layers.
但是,Silverlight使选择变得复杂。
However, Silverlight complicates the choices.
我不会有任何问题将我的代码迁移到C ++ / CLI和保持双代码基假的C ++ / CLI上下文关键字和一些司法搜索和替换^和%)。
I wouldn't have any problem migrating my code into C++/CLI and maintaining a dual code base (with some macros to fake the C++/CLI contextual keywords and some judicial search and replace for ^ and %).
从我能够到到目前为止,似乎不太可能在Silverlight中支持C ++ / CLI。
From what I've been able to find so far, it seems unlikely that C++/CLI will be supported in Silverlight. That leaves me with the options:
- 将v1.0 C ++源代码库一次性迁移到C#和持续并行维护
- 使用工具(建议请!)从C ++移植到C#,反之亦然,这是一个足够顺利的构建过程的一部分。
- Silverlight版本的架构分离,所以C ++逻辑保留在服务器上。对于性能影响,我有点不舒服。
任何人都可以提出替代方案,在Silverlight上提供关于C ++ / CLI的好消息,移植工具?我对任何一种语言都足够舒服,使C ++或C#我的主要语言为后端提供一个端口是可靠的。
Can anyone suggest alternatives, provide good news on C++/CLI in Silverlight or recommend porting tools? I'm sufficiently comfortable in either language to make C++ or C# my main language for the backend provided a port is reliable.
编辑:
查看范围的有形软件解决方案提供的产品,他们在转换器上的注释表明,将C#转换为C ++比将另一种方式。这是我的预期 - 它提出了一个有趣的想法,约束我的C ++风格是最不常见的OO分母。
Looking at the range of products offered by Tangible Software Solutions, their notes on the converters make it clear that converting C# to C++ is easier than the other way. That is as I expected - it raises interesting thoughts as to constraining my C++ style to be least-common-OO-denominator.
推荐答案
Silverlight版本的架构分离,所以C ++逻辑保留在服务器上。我对性能的影响有点不舒服。
Architectural separation of the Silverlight version so the C++ logic remains on a server. I'm a bit uncomfortable about the performance implications.
我会这样做。表演可能没有你想象的那么糟糕。
I'd do this. The performance is probably not as bad as you imagine.
这篇关于Silverlight和C ++或C ++到C#正在进行代码转换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!