简体   繁体   English

在WP7上创建脱机数据库应用程序 - 找到正确的方法

[英]Making offline database application on WP7 - find the right way

I need to build an offline database application on WP7. 我需要在WP7上构建一个脱机数据库应用程序。 App is simple - it's about making orders from our clients, then translate it to main server (MS SQL). 应用程序很简单 - 它是关于从我们的客户发出订单,然后将其转换为主服务器(MS SQL)。

Spend a days read about existing techologies - but I'am still confused. 花一天时间阅读现有的技术 - 但我仍然感到困惑。 Which is right for that project? 哪个项目适合该项目?

  1. Sync Framework. 同步框架。 Looking good, but as I understand - it provides single tables - no reference beetwen them. 看起来很好,但据我所知 - 它提供单表 - 没有参考beetwen他们。 All the references I have to build on client side. 我必须在客户端构建所有引用。 Sad. 伤心。

  2. Entity FrameWork on server side. 服务器端的实体FrameWork。 And I have no clue - what can I use on client side. 我不知道 - 我可以在客户端使用什么。 Is there a way to serialize entity object to Isolate Store, then restore it, and continue work with it? 有没有办法将实体对象序列化为隔离存储,然后还原它,并继续使用它? May be I can use Sync FrameWork, but scheme will become strange then - kinda one way.))) 可能我可以使用Sync FrameWork,但是方案会变得奇怪 - 有点单向。)))

  3. Working with WCF & XML - most simple for me. 使用WCF和XML - 对我来说最简单。 A lot of code and conversion, but in this case I understand the data flow. 很多代码和转换,但在这种情况下我理解数据流。 In other view - I already have app with pure SQL-queries. 在其他视图中 - 我已经拥有纯SQL查询的应用程序。 I wanna be advanced. 我想要先进。 )))) ))))

  4. Using ext. 使用分机 databases (siaqodb for example). 数据库(例如siaqodb)。 Which one? 哪一个? siaqodb suppots "Sync provider", but it doesn't support references beetwen objects - so I have to build them by myself? siaqodb支持“同步提供程序”,但它不支持引用beetwen对象 - 所以我必须自己构建它们? Any gain? 任何收益? I don't know. 我不知道。

Is there another way to build such apps? 有没有其他方法来构建这样的应用程序? Point it please. 请点好。

If this has to be done offline, then I would generally use something like: 如果这必须离线完成,那么我通常会使用类似的东西:

  • storing the minimal amount of the required data within isolated using a WP7 specific database like Sterling 使用像Sterling这样的WP7特定数据库存储隔离的最小数量的所需数据
  • using either a new REST or a new RIA/WCF service with objects/functions you define in order to provide the required data synchronisation 使用新的REST或新的RIA / WCF服务以及您定义的对象/函数,以便提供所需的数据同步

I think this is your option 3? 我想这是你的选择3?

I've never really liked automatic data synchronisation. 我从来都不喜欢自动数据同步。 I just find it easier to code the sync and deal with the error cases myself - this is especially the case if your wp7 client app uses quite a small footprint of data in relation to the larger main server db. 我发现自己更容易编写同步代码并处理错误情况 - 如果您的wp7客户端应用程序使用相对于较大主服务器数据库的相当小的数据,则尤其如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM