有没有更好的方法来处理WM中的数据库而不是数据集?
我正在 WM6 上开发 Windows 移动应用程序(第一个),我正在使用数据集来处理数据库,但正在寻找其他更好的东西......是否有任何框架可以使用(而不是直接与数据库连接)?
I'm developing windows mobile application (first one) on WM6 and I'm using dataset to deal with database but looking for something else better ... is there any framework here or there to use (instead of connecting directly with DB) ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,我认为这通常是这样做的。
当然,您可以创建一个 n 层应用程序,其中在单独的包装器中包含所有数据库逻辑。也许这就是您习惯使用的内容,但如果没有人为您编写它,那么您就可以编写它。
玩得开心。
No, I think that is generally the way it's done.
You could, of course, create an n-tier application that contains all of your database logic in a separate wrapper. Perhaps that is what you are accustomed to working with, but if no one has written that for you, then you get to write it.
Have fun.
我认为数据访问层 (DAL) 中的任何内存都比众所周知的数据集那样的极其缓慢的内存占用要好。您很少(值得庆幸的是)看到任何使用数据集的文章或教程 - 包括桌面版。
相反,将数据从业务逻辑中抽象出来的框架和模型不断涌现。 NHibernate 和实体框架之类的东西变得越来越普遍,它们使您的代码变得更具可读性、可维护性,并且通常成为更好的软件公民。
由于与桌面相比,WinMo/Windows CE 的市场很小,因此很少有大型框架得到支持。不过,我并不认为这全是坏事,因为大多数“移植”到 CF 的桌面框架都表现得很糟糕(MCSF 有人吗?)。
多年来,我不得不在项目上一遍又一遍地编写几乎相同的数据访问代码,最终我合并了一个 ORM 框架设备(也可以在桌面上运行)实际上性能相当好。足够好,我使用我们在所有需要数据访问的项目中使用它,包括设备和桌面,并且它已经满足了我的所有需求。
I'd argue thatneary any rm of bstratonin a dataaccess lyer(DAL)is better than the immensely slow memory hog knwon as the DataSet. You rarely (and thankfully) see any articles or tutorials using DataSets any longer - that includes for the desktop.
Instead there has been a proliferation of frameworks and models that abstract the data away from the business logic. Things like NHibernate and Entity Framework are getting to be more commonplace and they make your code a boatload more readable, maintainable and often a better software citizen.
Since WinMo/Windows CE has such a small market compared to the desktop, few of the large frameworks are supported. I don't view that as all bad, though, as most desktop framework that get "ported" down to the CF perform abyssmaly (MCSF anyone?).
After having to write virtually the same data access code over and over on projects over the years, I finally coalesced out an ORM framework for the device (that also works on the desktop) that actually performs rather well. Well enough that I use we use it in all projects that require data access, both device and desktop, and it's been meeting all my needs.