桌面应用程序重用网站功能

发布于 2024-10-01 07:21:59 字数 452 浏览 1 评论 0原文

我们正在实现一些通过 asp.net Web 服务公开的业务功能。

在现阶段,需要用户界面来保证其安全性,我们将在现有的桌面应用程序中实现它(它是 MFC C++ 应用程序,但我们正在考虑集成一些 WinForms/Wpf 组件)。

在不久的将来,我们计划将当前的桌面应用程序替换为网站版本(将是 asp.net 网站,或者可能是 Silverlight 应用程序)。因此,我想在网站上实现一次 UI,然后以某种方式从桌面应用程序中重新使用它。

我说得够清楚吗?

有什么办法可以做到这一点吗?

当然,我现在可以实现 Web 服务并从桌面应用程序使用它,并在需要时从 Web 应用程序重新使用它......但我希望有更好的方法来做到这一点。

欢迎任何想法!

PS 一个选项可以是由我们的桌面应用程序显示的 asp.net 网页。桌面应用程序将仅用作浏览器(不添加任何附加功能)。

We are implementing some business functionality that it exposed through the asp.net web service.

At the current stage user interface is required for some peace of it and we are going to implement it inside of already existing desktop application (it is MFC C++ application, but we are considering to integrate some WinForms/Wpf components).

In the nearest future we plan to replace current desktop application with a web site version (it will be asp.net web site, or PROBABLY Silverlight application). Therefore, I would like to implement UI once on the web site and just re-use it in some way from desktop application.

Am I clear enough?

Is there any way to do that?

For sure, I can implement web service and use it from desktop application right now and re-use it from web application when it will be required... But I hope there is a better way to do that.

Any thoughts are welcome!

P.S. An option can be asp.net web page that is displayed by our desktop application. Desktop app will serve as a browser only (without adding any additional functionality).

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

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

发布评论

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

评论(3

泅人 2024-10-08 07:22:00

嗯……你基本上已经有了答案。如果您可能要使用 Silverlight,并且当前的桌面应用程序是用 WPF 和 XAML 构建的,那么您的转换速度将会快得离谱。否则,您必须像构建任何其他网站一样构建所有内容 - 网站的 div 和 CSS,以及桌面的设计器 resx。

Well... you basically already have your answer. If you're probably going to use Silverlight, if the current desktop app is build in WPF and XAML, you'll make the conversion ridiculously quickly. Otherwise, you'll have to build everything like you would any other website - divs and CSS all the way for the site, and designer resx's for the desktop.

梅倚清风 2024-10-08 07:22:00

除非客户付费让您编写和维护应用程序的冗余版本,否则不要这样做。只需编写 Web 应用程序的新部分,将它们包装起来,然后就可以称其为好。

如果您可以这样做,我建议您也跳过集成步骤。如果您最终要扔掉代码,那么总体成本会更低。

使用您想要的任何技术。如果您不使用客户端框架来实现它,则您将不受任何特定平台的限制。另一方面,如果您使用现有的客户端框架(例如 Silverlight),并使用良好的代码设计实践(例如 MVVM),则单元测试可能会更容易。

Unless a customer is paying you to write and maintain redundant versions of your app, then don't do it. Just write the new pieces of the web app, wrap them, and call it good.

If you can do so, I recommend you simply skip the integration step, as well. If you're going to throw the code away eventually anyhow, then it's less cost overall.

Use whatever technology you want. If you implement it using no client side framework, you wouldn't be bound to any particular platform. On the other hand, if you use an existing client-side framework (such as Silverlight), and use good code design practices (like MVVM), it might be easier to unit test.

感受沵的脚步 2024-10-08 07:22:00

我的想法应该与简单的 HTML UI 实现完美配合,该实现将通过 CHtmlView 控件从桌面应用程序“浏览”。

老实说,我并没有尝试实现它(任务被推迟了一段时间)。

My idea should perfectly work with simple HTML UI implementation that will be "browsed" from desktop application through the CHtmlView control.

To be honest, I didn't try to implement that (task was postponed for some time).

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