王帆 张俊杰 欧阳琳
摘 要:Windows8应用商店开发是微软的一个全新开发技术,本文详细介绍了一款基于win8的天气新闻类应用在开发过程中的设计思路,用到的相关技术:如何使用API,如何提取动态网页中的数据,如何根据动态改变的温度值绘制出正确的温度曲线。应用最终的成功开发表明,设计达到了最初的预期要求,并且对类似应用的开发与研究起了较好的借鉴作用。
关键词:Windows8应用商店开发;使用API;提取网页数据;绘制动态温度曲线
中图分类号:TP311.5 文献标识码:A
Abstract:The development of WINDOWS8 app store is a brand new technology of Microsoft. This paper introduces a weather news application based on win8 in the process of developing the design train of thought.The use of related technologies:How to make use of API?How to extract data from dynamic Web page?How to plot correct temperature curves according to the mutable temperature values.The ultimate success of the exploring application manifests that this design has met the expected requirements and has offered successful experiences for other similar explorations and researches.
Keywords:the development of Windows8 app store;make use of API;extract data from web page;plot mutabletemperature curves
1 引 言(Introduction)
微软新的操作系统Windows8已经发布了,它拥有更为精美的界面设计,操作也更简单快捷,
受到了一定范围的关注[1]。用户可以在win8应用商店里下载不同种类的应用,比如我们最常用的:天气新闻类。在这类应用当中,我们可以发现有许多应用只是集合某个优点,显得太过于单一而难以被用户接受,或者说功能设计起来有点冗余,普通用户甚至不清楚应用的某些功能的具体目的。针对以上情况,本文提出了此类应用在开发过程中的设计思路,用到的相关技术以及难点所在,志在为广大win8爱好者提供学习平台以及为行内入门朋友分享开发经验。
2 应用主体框架(Application main framework)
由直角坐标系可以看到,在y轴方向,温度越高,坐标点离原点越远。现在就高温区域进行分析,首先要建立一个概念:在高温区域50—150的点其实都是一个相对的概念,比如现在获得的一组数据最大值是36℃,最小值是20℃,这两点会描述在50—150,不妨假设是(30,110)和(130,140);……