• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2014, Vol. 36 ›› Issue (09): 1829-1834.

• 论文 • 上一篇    下一篇

Windows Phone数据访问技术研究

刘黎志1,2,陈传波3   

  1. (1.武汉工程大学智能机器人湖北省重点实验室,湖北 武汉 430205;
    2.武汉工程大学计算机科学与工程学院,湖北 武汉 430205;3.华中科技大学软件学院,湖北 武汉 430074)
  • 收稿日期:2012-11-06 修回日期:2013-04-24 出版日期:2014-09-25 发布日期:2014-09-25
  • 基金资助:

    武汉工程大学智能机器人湖北省重点实验室开放基金(HBIR201006)

Research of Windows Phone data access technology         

LIU Lizhi1,2,CHEN Chuanbo3   

  1. (1.Hubei Province Key Laboratory of Intelligent Robot,Wuhan Institute of Technology,Wuhan 430205;
    2.School of Computer Science and Engineering,Wuhan Institute of Technology,Wuhan 430205;
    3.School of Software Engineering,Huazhong University of Science and Technology,Wuhan 430074,China)
  • Received:2012-11-06 Revised:2013-04-24 Online:2014-09-25 Published:2014-09-25

摘要:

在移动互联网时代,必须有效解决智能终端设备如何访问关系数据库中的数据问题。Windows Phone 给出的解决方案是,首先利用对象关系映射技术为关系数据库建立实体对象模型;然后使用REST风格的WCF数据服务封装实体对象上下文,Windows Azure可作为发布该服务的载体;最后遵循开放式数据协议的规范查询及操作数据。对相关技术进行了较深入的研究,并使用MVVM模式给出了一个具体的实例,论证了该方案的可行性。由于智能终端可以通过开放数据协议访问和操作部署在Windows Azure中的WCF数据服务,结果以XML的形式返回,从而使得Windows Phone数据访问的模式可以扩展到使用其它操作系统的智能终端平台,如Android、IOS等。

关键词: Windows Phone, WCF数据服务, 表示状态转换, 开放数据协议, MVVM模式

Abstract:

The problem of how smart device can efficiently access data stored in relational data base must be solved in the era of mobile Internet. Windows Phone provides a solution. Firstly, an entity data model is constructed based on a corresponding relational database by using ORM technology. Secondly, the object context of the entity data model is encapsulated by a REST WCF Data Service, which is deployed by Windows Azure. Finally, data is queried and handled according to the specification of open data protocol. These technologies are discussed and an example is given by combining MVVM pattern, which proves the solution is feasible. Because smart device can access and manipulate WCF Data Service deployed in Windows Azure through Open Data Protocol and return results by XML, the Windows Phone data access pattern can be extend to other smart device platforms with different operating systems such as Android and IOS.

Key words: Windows Phone;WCF data service;representational state transfer(REST);open data protocol;MVVM(Model-View-View Model) pattern