Silverlight 和 WPF 独立应用程序版本的数据访问技术

发布于 2024-07-08 06:39:10 字数 581 浏览 6 评论 0原文

我正在编写一个应用程序,它将是一个独立的 WPF 应用程序,也是一个可以作为 Silverlight 工作并托管在浏览器中的精简版本。 我希望 Silverlight 应用程序能够访问云中的数据。 WPF 应用程序需要针对本地数据库工作,但随后能够与同一云存储同步。

所以我需要以下场景才能工作。 Silverlight 直接针对存储在云中的数据进行工作。 WPF 应用程序针对本地数据库运行。 但是,WPF 应用程序能够在启动时转到云并获取最新版本,以防自上次运行 WPF 应用程序以来在线进行更改。 当用户完成 WPF 应用程序时,它可以再次将所做的更改同步到云。 这可以在 WPF 运行期间提供更好的性能,并且还允许您脱机运行它并在稍后有连接时进行同步。

实现此目的的最佳技术是什么? 我知道有一个同步框架、SQL Server 数据服务、ADO.NET 实体框架和 SQL Server Compact Edition 可以帮助数据访问,但我不确定它们是否可以一起工作来完成所呈现的场景。

我自己实现这一切吗? 大部分都是免费的,我只需要处理同步吗? 如果您对 Microsoft 数据访问技术有深入的了解,那么我将非常感谢您对设计的意见。

I am writing an applicaton that will be a standalone WPF application and also a cut down version that will work as Silverlight and so be hosted in browsers. I want the Silverlight application to access data from the cloud. The WPF application needs to work against a local database but then be able to sync with the same cloud storage.

So I need the following scenarios to work. Silverlight works directly against the data stored in the cloud. The WPF app works against a local database. But the WPF app has the ability when it starts up to go to the cloud and get the latest version in case of changes being made online since the last time the WPF app was run. When the user finishes on the WPF app it can then sync up the changes made to the cloud again. This allows better performance during WPF being run and also allows you to run it offline and sync up later when you have a connection.

What is the best technology available to do this? I know there is a Sync Framework, SQL Server Data Service, ADO.NET Entity Framework and SQL Server Compact Edition that help with data access but I am not sure if they can be made to work together to do the presented scenario.

Do I implement all this myself? Does most of it come for free and I only need to handle the syncing? If you have deep knowledge of the Microsoft data access technologies then I would appreciate your input on the design.

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

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

发布评论

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

评论(1

原野 2024-07-15 06:39:10

使用标准 SQL 服务器后端,您的场景会很容易。 :)

但是,我认为您的提议在很大程度上是可行的。 对于 WPF 应用程序并使用 SSDS 同步到云,您可以使用 Project Huron (即将下载“很快”)。 这将使您的 SSDS 数据与 WPF 客户端应用程序保持同步。

对于 silverlight 端,您可以使用 SSDS 的 REST api(或类似 SSDS Rest 的帮助程序库)。

因此,您不需要自己实现其中的大部分内容,但是每当您走上这样的道路时,一路上总会遇到很多小障碍。 玩得开心!

Your scenario would be easy with a standard SQL server backend. :)

However, I think what you're proposing is doable for the most part. For the WPF app and syncing to the cloud with SSDS you could use Project Huron (which has downloads coming "soon"). That would keep your SSDS data in sync with the WPF client apps.

For the silverlight side you could use the REST api of SSDS (or a helper library like SSDS Rest).

So you won't need to implement most of it yourself, but whenever you head down a road like this one there are always lots of little roadblocks to run into along the way. Have fun!

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