基于课程表的校园应用App平台设计与实现
摘 要
随着移动设备及移动互联网的迅速发展,手机成为人们获取信息的主要来源,为了师生在移动终端获取学校课程表、成绩、考试信息及校园综合信息,我们的团队设计开发实现了基于课程表的校园应用APP——汕大课程表。整合校园信息获取渠道,集聚人气,服务师生。目前该APP已在两个应用市场上线,稳定用户占学校人数70%以上,而据Umeng SDK统计结果,每天打开次数达到8000次以上。
汕大课程表APP主要包括三部分工作:后端设计与实现、iOS版APP的设计与实现、Android版APP的设计与实现,笔者设计实现了Android版汕大课程表APP。在数据储存设计中,依数据不同特性,采取不同存储模式:SharedPreferences、文件、数据库。在总体架构设计中,对 GUI层类用MVP(Model-View-Presenter)架构分层,结合使用Dagger2库通过依赖倒置方式进行MVP三层之间依赖注入工作,在MVP架构上通过使用Rxjava进行响应式编程,以处理MVP之间数据流。当确定好以上的基本架构时,再进行具体的模块分层,总体上划分为作用域模块、数据操作模块、适配器及代理实现模块、工具及组件模块、GUI功能模块,其中,GUI功能模块中的每一个UI界面分别含有VP层及其依赖注入相关类。GUI功能模块共有课程表、成绩查询、考试安排、流量验证、办公自动化、图书查询、校内邮箱、东门外卖、校内动态九个大类,其界面设计实现均遵从Material design规范。最后根据校内服务器、办公自动化、Bmob、图书馆网页这四类数据源各自的特性,分类进行具体的功能设计实现。
在以上设计实现中,为减少生成apk的体积,通过优化图片资源、选用代码较少的第三方库、开启代码混淆及使用微信资源混淆工具完成apk打包实现。
关键词:课程表;MVP;响应式;依赖注入;依赖倒置
The design and implementation of university applications based on syllabus
Abstract
With the rapid development of mobile devices and Internet, mobile phones become the main source of information for people to access.In order to allow teachers and students to get the school curriculum, grades, test information and campus information in the mobile terminal,our team designed and developed STU Curriculum, a campus APP based on curriculum.It integrates campus information access channels, gathers popularity as well as services teachers and students.At present, this APP has two applications in the market line, stable users accounted for more than 70% of the population of school.According to Umeng SDK statistical results, the number of times used per day more than 8000 times.
STU Curriculum mainly consists of three parts: the back-end design and implementation, design and implementation of iOS version APP, design and implementation of Android version APP,and I designed and implemented the Android version APP.In the data storage design, according to the different characteristics of data. We used different storage modes: SharedPreferences, files, database.In the overall architecture design,we used MVP (Model-View-Presenter) architecture to stratify the GUI layer and combined with the use of Dagger2 library,using the Inversion of Dependency to do the Dependency Injection between three layers of MVP.On the MVP architecture, response programming is implemented by using Rxjava,which is to handle the data flow between the MVP.When the above basic architecture is defined, the specific module hierarchy is then carried out.As a whole, it is divided into scope module, data operation module, adapter and agent implementation module, tool and component module, and GUI function module.Among them, each UI interface in the GUI function module contains the VP layer and its dependency injection related classes.There are nine major categories in the GUI function module : curriculum schedule, score inquiry, examination arrangement, traffic verification, office automation, book inquiry,school mailbox, East Gate take-out and campus dynamic new.Its interface design and implementation comply with the Material design specification.Finally, according to the characteristics of four kinds of data sources:campus server, office automation, Bmob and Library Web page,the specific functions are designed and implemented.
In the above design implementation, in order to reduce the volume of the generated APK, we optimized the picture resources, selected the third party libraries with fewer codes,