Silverlight 和 C++ 或 C++ 到 C# 的持续代码转换?

发布于 2024-07-12 19:59:04 字数 946 浏览 5 评论 0原文

我正在开发一个基于绘图的产品,我希望按照优先级顺序为 iPhone、桌面 OS/X、Windows 平板电脑、基于 Silveright 的浏览器、Windows Mobile 和 Windows 生成版本。

对于 GUI 可移植性,经典的答案是保留 C++ 核心并使用 Cocoa/Objective-C 或 WPF/C# 薄层。

然而,Silverlight 使选择变得复杂。

将我的代码迁移到 C++/CLI 并维护双代码库(使用一些宏来伪造 C++/CLI 上下文关键字以及一些司法搜索和替换 ^ 和 %)不会有任何问题。

从我到目前为止找到的来看,似乎不太可能Silverlight 将支持 C++/CLI。 这给我留下了选择:

  1. 将 v1.0 C++ 源代码库一次性迁移到 C# 并持续并行维护
  2. 使用工具(请推荐!)从 C++ 实时移植到 C#,反之亦然,这足够顺利构建过程的一部分。
  3. Silverlight 版本的体系结构分离,因此 C++ 逻辑保留在服务器上。 我对性能影响有点不舒服。

任何人都可以提出替代方案、提供有关 Silverlight 中 C++/CLI 的好消息或推荐移植工具吗? 如果端口可靠,我对这两种语言都足够熟悉,可以将 C++ 或 C# 作为我的后端主要语言。

编辑: 看看有形软件解决方案提供的产品范围,他们对转换器的注释清楚地表明,将 C# 转换为C++ 比其他方式更容易。 正如我所期望的那样——它引发了一些有趣的想法,将我的 C++ 风格限制为最不常见的 OO 分母。

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.

For GUI portability, the classic answer is to keep the core in C++ and use Cocoa/Objective-C or WPF/C# thin layers.

However, Silverlight complicates the choices.

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 %).

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:

  1. Once-off migration of a v1.0 C++ source base into C# and ongoing parallel maintenance
  2. Live porting with a tool (recommendations please!) from C++ to C# or vice-versa, which is sufficiently smooth to be part of a build process.
  3. Architectural separation of the Silverlight version so the C++ logic remains on a server. I'm a bit uncomfortable about the performance implications.

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.

Edit:
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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

流年里的时光 2024-07-19 19:59:10

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文