[go: up one dir, main page]

CN106990966A - Mobile terminal cross-platform Development Framework and development approach based on front end frame - Google Patents

Mobile terminal cross-platform Development Framework and development approach based on front end frame Download PDF

Info

Publication number
CN106990966A
CN106990966A CN201710208240.4A CN201710208240A CN106990966A CN 106990966 A CN106990966 A CN 106990966A CN 201710208240 A CN201710208240 A CN 201710208240A CN 106990966 A CN106990966 A CN 106990966A
Authority
CN
China
Prior art keywords
mobile terminal
operating system
end frame
mobile
mobile device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710208240.4A
Other languages
Chinese (zh)
Inventor
黄刘生
辛贺
徐宏力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN201710208240.4A priority Critical patent/CN106990966A/en
Publication of CN106990966A publication Critical patent/CN106990966A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45529Embedded in an application, e.g. JavaScript in a Web browser
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of mobile terminal cross-platform Development Framework based on front end frame, including:Using performance and Business Logic:Basic page layout, network request packet, data loading, page navigation exploitation are carried out by front end frame, and carry out business logic processing, web page files are compiled into;HTML rendering layers:The analysis result of webpage is passed through by calculating, imposition layout by browser, called on mobile device interface, color applying drawing to user interface;Mobile device API, for the data interaction between HTML rendering layers and mobile terminal operating system hardware capability, there is provided the mobile device API of access;Mobile terminal operating system platform;Engineering to completion is packed, the installation file that can be run according to the mobile terminal operating system generation of identification under corresponding system.The development efficiency of mobile software can be improved, shorten the construction cycle, it is cost-effective.

Description

基于前端框架的移动端跨平台应用开发框架及开发方法Mobile terminal cross-platform application development framework and development method based on front-end framework

技术领域technical field

本发明属于移动端跨平台应用开发技术领域,具体地涉及一种基于前端框架的移动端跨平台应用开发框架及开发方法。The invention belongs to the technical field of mobile terminal cross-platform application development, and in particular relates to a mobile terminal cross-platform application development framework and a development method based on a front-end framework.

背景技术Background technique

随着网络技术的不断发展,尤其是移动互联网技术的发展,人们已经离不开移动终端设备,人们可以随时随地地通过手机从互联网获取信息和服务,截至2017年1月22日,中国网民数为6.88亿人,其中手机网民数为6.20亿人,手机上网人群占比为90.1%,由此可见移动终端设备在人们的生活中所具有的重大意义,移动端设备已经成为一个人赖以生存的一个重要工具,而移动互联网技术的发展也成为了一个国家科技创新能力发展的重要指标。如果在6亿手机用户这样一个重大的消费群体上建立一个平台,使之广泛应用到企业、商业、普通用户之中,肯定可以创造惊天动地的奇迹。With the continuous development of network technology, especially the development of mobile Internet technology, people have become inseparable from mobile terminal equipment. People can obtain information and services from the Internet through mobile phones anytime and anywhere. As of January 22, 2017, the number of Chinese Internet users 688 million people, of which 620 million are mobile Internet users, accounting for 90.1% of the population using mobile phones. This shows the great significance of mobile terminal devices in people's lives. Mobile terminal devices have become a means of survival for a person. An important tool for mobile Internet technology, and the development of mobile Internet technology has also become an important indicator of the development of a country's scientific and technological innovation capabilities. If a platform is established on such a major consumer group as 600 million mobile phone users, and it is widely applied to enterprises, businesses, and ordinary users, it will surely create earth-shattering miracles.

在移动互联网发展过程中,涌现出了很多手机操作系统,这其中以苹果的IOS系统、谷歌的Android系统、微软的WindowsPhone系统尤为出众,截至2016年第二季度,这三款手机操作系统的市场占有率已经达到了99.7%。目前一款移动端应用软件的开发基本都是基于这三个平台的,由于这三种操作系统的软件开发是基于不同的编程语言的,所以要开发出适配这三种系统的软件,就要编写三份不同的代码来带到最终目的。这就大大提高了软件开发和维护的工作难度,这时如果要研究出一种跨平台的移动端软件开发平台就至关重要。During the development of the mobile Internet, many mobile phone operating systems have emerged, among which Apple's IOS system, Google's Android system, and Microsoft's WindowsPhone system are particularly outstanding. As of the second quarter of 2016, the market share of these three mobile phone operating systems Occupancy rate has reached 99.7%. At present, the development of a mobile application software is basically based on these three platforms. Since the software development of these three operating systems is based on different programming languages, it is necessary to develop software that adapts to these three systems. To write three different pieces of code to bring it to the end. This greatly increases the difficulty of software development and maintenance. At this time, it is very important to develop a cross-platform mobile software development platform.

目前移动端应用分类主要有三种:Native应用、Web应用、Hybrid应用。Native应用主要指使用特定平台开发语言所开发的应用,Web应用主要采用统一标准的HTML、JavaScript、CSS等Web技术开发,通过不同平台的浏览器访问来实现跨平台。Native应用开发的不足在于,不同手机操作系统的应用软件是独立开发的,开发者需要编写多套针对特定手机平台的代码,而Web应用在性能上和用户体验上与原生手机应用有着很大的差距。Hybird应用主要是弥补以上两者开发模式的不足的产物,使用前端技术来开发应用的页面,调用Native的代码来完成业务逻辑的编写。Currently, there are three main categories of mobile applications: Native applications, Web applications, and Hybrid applications. Native applications mainly refer to applications developed using a specific platform development language. Web applications are mainly developed using unified standard HTML, JavaScript, CSS and other Web technologies, and are accessed through browsers on different platforms to achieve cross-platform. The disadvantage of native application development is that the application software of different mobile phone operating systems is developed independently, and developers need to write multiple sets of codes for specific mobile phone platforms, while web applications have great differences with native mobile phone applications in terms of performance and user experience. gap. The Hybrid application is mainly a product that makes up for the shortcomings of the above two development modes. It uses front-end technology to develop application pages, and calls Native code to complete the writing of business logic.

发明内容Contents of the invention

针对当前移动软件开发需要区分不同手机操作系统的问题,本发明目的是:提供了一种基于前端框架的移动端跨平台应用开发框架及开发方法,本发明框架采用的是Hybrid模式的应用开发方法,采用分层设计模式,界面采用前端技术开发,通过中间层插件调用原生应用的硬件相关功能,以完成手机应用软件的开发。本发明应用到移动软件项目开发中,可以大大提高移动端软件的开发效率。Aiming at the problem that the current mobile software development needs to distinguish different mobile phone operating systems, the purpose of the present invention is to provide a mobile terminal cross-platform application development framework and development method based on the front-end framework. The framework of the present invention adopts the application development method of the Hybrid mode , adopts a layered design mode, the interface is developed using front-end technology, and the hardware-related functions of the native application are called through the middle layer plug-in to complete the development of the mobile phone application software. When the invention is applied to the development of mobile software projects, the development efficiency of mobile terminal software can be greatly improved.

本发明的技术方案是:Technical scheme of the present invention is:

一种基于前端框架的移动端跨平台应用开发框架,包括:A mobile cross-platform application development framework based on the front-end framework, including:

应用表现与业务逻辑层:通过前端框架进行基本的页面布局、网络请求数据、数据加载、页面导航开发,并进行业务逻辑处理,编译成网页文件;Application performance and business logic layer: carry out basic page layout, network request data, data loading, page navigation development through the front-end framework, and perform business logic processing and compile it into a web page file;

HTML渲染层:通过浏览器将网页的解析结果经过计算、排版布局、调用移动设备接口,渲染绘制到用户界面上;HTML rendering layer: through the browser, the parsing results of the webpage are calculated, typed and laid out, and the mobile device interface is called, and then rendered and drawn on the user interface;

移动设备API,用于HTML渲染层与移动端操作系统硬件功能间的数据交互,提供访问的移动设备API;Mobile device API, used for data interaction between the HTML rendering layer and the hardware functions of the mobile operating system, providing access to the mobile device API;

移动端操作系统平台;对完成的工程进行打包,根据识别的移动端操作系统生成可在相应系统下运行的安装文件。Mobile operating system platform; package the completed project, and generate installation files that can run under the corresponding system according to the identified mobile operating system.

优选的,所述HTML渲染层与移动端操作系统硬件功能间的数据交互包括,生成交互插件,通过交互插件向移动设备发送信息,移动设备接收信息后将原生代码的执行结果以JSON对象的形式发送至HTML渲染层。Preferably, the data interaction between the HTML rendering layer and the hardware functions of the mobile terminal operating system includes generating an interactive plug-in, sending information to the mobile device through the interactive plug-in, and after receiving the information, the mobile device converts the execution result of the native code in the form of a JSON object Sent to the HTML rendering layer.

优选的,所述交互插件包括接口文件和交互模块,所述接口文件用于识别移动端操作系统,所述交互模块,通过AJAX发送请求,实现数据交互。Preferably, the interaction plug-in includes an interface file and an interaction module, the interface file is used to identify the operating system of the mobile terminal, and the interaction module sends a request through AJAX to realize data interaction.

本发明还公开了一种基于前端框架的移动端跨平台应用开发方法,包括以下步骤:The present invention also discloses a mobile terminal cross-platform application development method based on the front-end framework, comprising the following steps:

S01:通过前端框架进行基本的页面布局、网络请求数据、数据加载、页面导航开发,并进行业务逻辑处理,编译成网页文件;S01: Perform basic page layout, network request data, data loading, page navigation development through the front-end framework, and perform business logic processing, and compile it into a web page file;

S02:通过浏览器将网页的解析结果经过计算、排版布局、调用移动设备接口,渲染绘制到用户界面进行功能调试,通过交互插件与移动端操作系统硬件功能进行数据交互;S02: Through the browser, the analysis results of the webpage are calculated, typesetting and layout, calling the mobile device interface, rendering and drawing to the user interface for function debugging, and performing data interaction with the hardware function of the mobile terminal operating system through the interactive plug-in;

S03:对完成的工程进行打包,根据识别的移动端操作系统生成可在相应系统下运行的安装文件。S03: Package the completed project, and generate an installation file that can run under the corresponding system according to the identified mobile operating system.

优选的,所述步骤S02中,在网页上调试功能性代码时,当发生网络请求时,构建跨域请求转接工具,通过跨域请求转接工具将本地请求转接到真实的URL地址。Preferably, in the step S02, when debugging the functional code on the web page, when a network request occurs, a cross-domain request transfer tool is built, and the local request is transferred to the real URL address through the cross-domain request transfer tool.

与现有技术相比,本发明的优点是:Compared with prior art, the advantage of the present invention is:

(1)在本发明的框架上,软件开发人员只需关注前端代码的实现,无需考虑不同移动端操作系统的差异性,即可完成移动端应用的开发,在此平台上开发的软件可以同时适配于Android、IOS、Windows Phone、以及网页。(1) In the framework of the present invention, software developers only need to pay attention to the realization of the front-end code, and can complete the development of mobile terminal applications without considering the differences of different mobile terminal operating systems. The software developed on this platform can be simultaneously Compatible with Android, IOS, Windows Phone, and web pages.

(2)在本发明框架上,一款应用的开发只需编写一份代码,无需区分移动端操作系统平台,大大缩短了软件开发的生命周期,提高了开发效率,节约的软件开发的人力成本以及不同客户端间的人员管理成本。(2) On the basis of the framework of the present invention, only one code is required for the development of an application, and there is no need to distinguish between mobile operating system platforms, which greatly shortens the life cycle of software development, improves development efficiency, and saves labor costs for software development And the cost of personnel management among different clients.

(3)本发明的框架中与设备相关的功能是以插件形式手动添加,无需进行审批,这些功能可以一直留存在Native工程中重复利用和完善。(3) The device-related functions in the framework of the present invention are manually added in the form of plug-ins without approval, and these functions can always be retained in the Native project for reuse and improvement.

(4)本发明框架的开发高内聚、低耦合,系统相对稳定,亦可对框架进行定制化开发,增加了框架内部构造的灵活性。(4) The development of the framework of the present invention has high cohesion and low coupling, and the system is relatively stable. The framework can also be customized and developed, which increases the flexibility of the internal structure of the framework.

附图说明Description of drawings

下面结合附图及实施例对本发明作进一步描述:The present invention will be further described below in conjunction with accompanying drawing and embodiment:

图1为本发明框架架构图;Fig. 1 is a framework diagram of the present invention;

图2为在本发明框架上构建的手机应用软件工程结构图;Fig. 2 is a mobile phone application software engineering structural diagram constructed on the framework of the present invention;

图3为本发明框架各个模块间的关系图。Fig. 3 is a relationship diagram among various modules of the framework of the present invention.

具体实施方式detailed description

以下结合具体实施例对上述方案做进一步说明。应理解,这些实施例是用于说明本发明而不限于限制本发明的范围。实施例中采用的实施条件可以根据具体厂家的条件做进一步调整,未注明的实施条件通常为常规实验中的条件。The above solution will be further described below in conjunction with specific embodiments. It should be understood that these examples are used to illustrate the present invention and not to limit the scope of the present invention. The implementation conditions used in the examples can be further adjusted according to the conditions of specific manufacturers, and the implementation conditions not indicated are usually the conditions in routine experiments.

实施例:Example:

一种基于前端框架的移动端跨平台应用开发框架,如图1所示跨平台框架设计为四层架构体系:分别为应用表现与业务逻辑层、HTML渲染层、移动设备API以及手机操作系统平台,其中:A cross-platform mobile application development framework based on the front-end framework. As shown in Figure 1, the cross-platform framework is designed as a four-layer architecture system: application performance and business logic layer, HTML rendering layer, mobile device API, and mobile phone operating system platform ,in:

应用表现与业务逻辑层:根据图3移动端跨平台框架架构图所示,此层结构主要用于解决软件应用的功能模块研发以及业务逻辑的处理,此层主要使用前端框架AngularJS2来完成代码的编写,编写完成的工程入口为index.html,即生成一个可运行的网页,通过CSS来控制网页格式,通过Typescript来完成业务逻辑处理。涉及到手机功能的页面根据Cordova插件中定义的JavaScript方法名来调用原生代码,将原生代码的处理结果以JSON格式接收,显示到页面上,完成数据交互。Application performance and business logic layer: According to the cross-platform framework diagram of the mobile terminal in Figure 3, the structure of this layer is mainly used to solve the development of functional modules of software applications and the processing of business logic. This layer mainly uses the front-end framework AngularJS2 to complete the code Writing, the entry of the completed project is index.html, which generates an operational webpage, controls the webpage format through CSS, and completes business logic processing through Typescript. The pages related to mobile phone functions call the native code according to the JavaScript method name defined in the Cordova plug-in, receive the processing result of the native code in JSON format, display it on the page, and complete the data interaction.

HTML渲染层:在每个移动设备上设置WebView组件,通过此组件,Android工程和IOS工程可以加载应用表现与业务逻辑层生成的网页,此功能是通过Cordova.loadUrl(string url)方法来实现的,方法中的url为应用表现与业务逻辑层中的index.html的存放地址,通过此方法将网页的入口文件加载到WebView中,WebView组件的内置浏览器负责将页面的解析结果经过计算、排版布局、调用移动设备接口,渲染绘制到用手机户界面上。HTML rendering layer: set the WebView component on each mobile device. Through this component, the Android project and IOS project can load the webpage generated by the application performance and business logic layer. This function is realized through the Cordova.loadUrl(string url) method , the url in the method is the storage address of index.html in the application performance and business logic layer. Through this method, the entry file of the web page is loaded into the WebView, and the built-in browser of the WebView component is responsible for calculating and typesetting the analysis results of the page Layout, call the mobile device interface, render and draw on the user interface of the mobile phone.

移动设备API:本层主要功能是中间桥梁的作用,通过本层可实现HTML渲染层与手机操作系统硬件功能间的交互,具体的交互方式是通过Cordova插件来实现的,插件是通过新建Cordova项目来实现JavaScript与原生代码的交互,在Cordova项目中的配置文件中定义方法名以供JavaScript代码调用,本平台主要实现Android和IOS工程与JavaScript的通信,通信入口函数为cordova.exec(success,error,service,action,[message]),exec的参数内容分别为方法执行成功的回调、失败的回调、执行的服务名称、执行动作和传递的参数,在原生代码中使用execute(success,error,service,action,[message])方法接收exec方法中的内容,根据action的具体动作进行不同的操作,并将原生代码的执行结果以JSON对象的形式回传给JavaScript中的方法。从而实现JavaScript与原生代码的双向通信。Mobile device API: The main function of this layer is the role of an intermediate bridge. Through this layer, the interaction between the HTML rendering layer and the hardware functions of the mobile phone operating system can be realized. The specific interaction method is realized through the Cordova plug-in, which is created by creating a Cordova project To realize the interaction between JavaScript and native code, define the method name in the configuration file in the Cordova project for JavaScript code to call. This platform mainly realizes the communication between Android and IOS projects and JavaScript. The communication entry function is cordova.exec (success, error , service, action, [message]), the parameters of exec are the method execution success callback, failure callback, execution service name, execution action and passed parameters, use execute (success, error, service , action, [message]) method receives the content in the exec method, performs different operations according to the specific actions of the action, and returns the execution result of the native code to the method in JavaScript in the form of a JSON object. This enables two-way communication between JavaScript and native code.

移动端操作系统平台:移动端跨平台框架中开发的移动端应用最终要安装到此平台,此平台包括Android和IOS。软件以安装包的形式下载的移动端操作系统中,无差异化的运行于各个操作系统中,最终实现跨平台。Mobile operating system platform: The mobile applications developed in the mobile cross-platform framework will eventually be installed on this platform, which includes Android and IOS. In the mobile operating system downloaded in the form of an installation package, the software runs in each operating system without differentiation, and finally realizes cross-platform.

本实施例以手机为例对基于前端框架的移动端跨平台应用开发方法进行说明,具体步骤如下:In this embodiment, a mobile phone is taken as an example to describe a method for developing a mobile cross-platform application based on a front-end framework, and the specific steps are as follows:

步骤1:构建手机操作系统的工程项目,此工程用于编译手机安装程序包,此工程包括Android工程和IOS工程,工程目录结构包括www文件和CordovaBox文件,www文件存放编译器编译过后的网页前端源代码以及插件配置文件,CordovaBox文件存放与手机平台相关的资源文件以及具体的功能性插件,Android工程采用传统的编译方式Gradle工具来完成安卓程序的打包,并发布到谷歌应用市场,供用户下载,IOS工程采用XCode工具来完成应用程序的打包,并上传到苹果应用商店。Step 1: Construct the project of the mobile phone operating system. This project is used to compile the mobile phone installation package. This project includes Android project and IOS project. The project directory structure includes www file and CordovaBox file. The www file stores the front end of the webpage compiled by the compiler Source code and plug-in configuration files, CordovaBox files store resource files related to the mobile phone platform and specific functional plug-ins, Android projects use the traditional compilation method Gradle tool to complete the packaging of Android programs, and publish them to the Google application market for users to download , The IOS project uses the XCode tool to complete the packaging of the application and upload it to the Apple App Store.

步骤2:使用Ionic框架新建项目,编写网页文件,完成基本的页面布局、网络请求数据、数据加载、页面导航开发。本步骤主要任务是通过前端流行的开发框架AngularJS来完成网页内容的开发,开发出的网页与传统网页的主要差别是网页中会有对手机基本功能的调用,其他方面与电脑端的网页开发并无区别,手机功能的调用通过Cordova插件来完成数据交互,将手机端的执行结果通过JSON格式的数据返回给页面。Step 2: Use the Ionic framework to create a new project, write webpage files, and complete basic page layout, network request data, data loading, and page navigation development. The main task of this step is to complete the development of web content through the popular front-end development framework AngularJS. The main difference between the developed web page and the traditional web page is that the web page will call the basic functions of the mobile phone, and other aspects are not the same as web development on the computer side. The difference is that the call of the mobile phone function uses the Cordova plug-in to complete the data interaction, and returns the execution result of the mobile terminal to the page through the data in JSON format.

步骤3:将步骤2中开发完的代码编译成浏览器上可识别的JavaScript代码于www文件中,并将此文件移动到步骤1中的工程中。Step 3: Compile the code developed in step 2 into JavaScript code recognizable by the browser in the www file, and move this file to the project in step 1.

步骤4:在步骤2中新建的项目下,编写可调用移动设备API的交互插件,插件文件主要内容为plugin.xml配置JavaScript调用手机native代码的接口,src文件存放各个手机操作系统平台的具体功能代码,例如拍照功能、相册功能、状态栏、键盘等手机基本功能。Step 4: Under the newly created project in step 2, write an interactive plug-in that can call the mobile device API. The main content of the plug-in file is plugin. Code, such as camera function, photo album function, status bar, keyboard and other basic mobile phone functions.

步骤5:在网页上调试功能性代码时,当发生网络请求时,由于是在本地发送请求的,所以会有跨域请求的问题,就需要在本地构建发送跨域请求的转接工具,将本地请求转接到真实的URL地址。Step 5: When debugging functional code on a web page, when a network request occurs, since the request is sent locally, there will be a cross-domain request problem, so it is necessary to build a transfer tool for sending cross-domain requests locally. The local request is forwarded to the real URL address.

步骤6:步骤1与步骤2中的工程综合在一起就构成了完整的基于前端框架的移动端跨平台框架,二者的结合需要项目中部分文件的整合,代码的拷贝使用本框架自有的工具gulpfile.ts。Step 6: The projects in step 1 and step 2 are combined to form a complete mobile cross-platform framework based on the front-end framework. The combination of the two requires the integration of some files in the project, and the copy of the code uses the framework's own toolsgulpfile.ts.

步骤7:构建gulpfile.ts文件,将步骤1中的www文件拷贝到步骤2中的根目录下,gulpfile文件亦可更改真机调试工作中的主机地址,防止手动更改带来错误。Step 7: Build the gulpfile.ts file, and copy the www file in step 1 to the root directory in step 2. The gulpfile file can also change the host address in the real machine debugging work to prevent errors caused by manual changes.

步骤8:将整合后的步骤1中的工程进行打包,生成在手机操作系统上可安装的安装文件,完成项目的正式上线。Step 8: Package the integrated project in step 1, generate an installation file that can be installed on the mobile phone operating system, and complete the official launch of the project.

如图2所示的工程结构,在此工程结构中实现报销软件的开发工作,实施步骤如下:The project structure shown in Figure 2, in this project structure to realize the development of reimbursement software, the implementation steps are as follows:

(1)在实施例的开发过程中,首先开发前端页面及业务逻辑处理,Page中包括Provider、Pipe和Component。Provider中处理网络请求,从网络上以HTTP的方式发送请求,获取数据。Pipe格式化页面中的显示内容,Component提供常用的公共组组件,提高代码复用性。(1) In the development process of the embodiment, the front-end page and business logic processing are firstly developed, and the Page includes Provider, Pipe and Component. Provider processes network requests, sends requests from the network in HTTP, and obtains data. Pipe formats the display content on the page, and Component provides commonly used public group components to improve code reusability.

(2)ShareService为页面提供特定的公共服务,ShareService中定义具体的服务而不实现,只定义接口,实现页面与业务层的分离。(2) ShareService provides specific public services for pages. ShareService defines specific services but does not implement them. It only defines interfaces to realize the separation of pages and business layers.

(3)通过Ionic-app-scripts工具,将使用前端技术开发的页面布局以及业务逻辑编译为手机操作系统WebView能够识别的JavaScript代码。(3) Through the Ionic-app-scripts tool, the page layout and business logic developed using front-end technology are compiled into JavaScript codes that can be recognized by the mobile operating system WebView.

(4)使用Gulp来将步骤(3)编译后的代码拷贝到Android和IOS工程的WWW目录下,完成盒子工程的构建,在此盒子工程中编译运行相应软件,打包出安装到手机操作系统的安装包,安装在不同手机操作系统上。(4) Use Gulp to copy the code compiled in step (3) to the WWW directory of the Android and IOS projects, complete the construction of the box project, compile and run the corresponding software in this box project, and package and install it on the mobile phone operating system. The installation package is installed on different mobile phone operating systems.

上述实例只为说明本发明的技术构思及特点,其目的在于让熟悉此项技术的人是能够了解本发明的内容并据以实施,并不能以此限制本发明的保护范围。凡根据本发明精神实质所做的等效变换或修饰,都应涵盖在本发明的保护范围之内。The above examples are only to illustrate the technical conception and characteristics of the present invention, and its purpose is to allow people familiar with this technology to understand the content of the present invention and implement it accordingly, and cannot limit the protection scope of the present invention. All equivalent changes or modifications made according to the spirit of the present invention shall fall within the protection scope of the present invention.

Claims (5)

1. a kind of mobile terminal cross-platform Development Framework based on front end frame, it is characterised in that including:
Using performance and Business Logic:Basic page layout, network request packet, data are carried out by front end frame to add Carry, page navigation is developed, and carries out business logic processing, is compiled into web page files;
HTML rendering layers:The analysis result of webpage is passed through by calculating, imposition layout by browser, mobile device interface is called, Color applying drawing is in user interface;
Mobile device API, for the data interaction between HTML rendering layers and mobile terminal operating system hardware capability, there is provided access Mobile device API;
Mobile terminal operating system platform;Engineering to completion is packed, can be according to the generation of the mobile terminal operating system of identification The installation file run under corresponding system.
2. the mobile terminal cross-platform Development Framework according to claim 1 based on front end frame, it is characterised in that institute The data interaction stated between HTML rendering layers and mobile terminal operating system hardware capability includes, generation interaction plug-in unit, is inserted by interaction Part is sent out the implementing result of primary code after sending information, mobile device receive information to mobile device in the form of JSON objects Deliver to HTML rendering layers.
3. the mobile terminal cross-platform Development Framework according to claim 2 based on front end frame, it is characterised in that institute Stating interactive plug-in unit includes interface document and interactive module, and the interface document is used to recognize mobile terminal operating system, the interaction Module, is sent by AJAX and asked, realize data interaction.
4. a kind of mobile terminal cross-platform development approach based on front end frame, it is characterised in that comprise the following steps:
S01:Basic page layout, network request packet, data loading, page navigation exploitation are carried out by front end frame, and Business logic processing is carried out, web page files are compiled into;
S02:The analysis result of webpage is passed through by calculating, imposition layout by browser, mobile device interface, color applying drawing is called Function debugging is carried out to user interface, data interaction is carried out with mobile terminal operating system hardware capability by interaction plug-in unit;
S03:Engineering to completion is packed, and can be run according to the mobile terminal operating system generation of identification under corresponding system Installation file.
5. the mobile terminal cross-platform development approach according to claim 1 based on front end frame, it is characterised in that institute State in step S02, when debugging feature code on webpage, when occurring network request, build cross-domain request adapter tool, lead to Cross cross-domain request adapter tool and local request is transferred to real URL addresses.
CN201710208240.4A 2017-03-31 2017-03-31 Mobile terminal cross-platform Development Framework and development approach based on front end frame Pending CN106990966A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710208240.4A CN106990966A (en) 2017-03-31 2017-03-31 Mobile terminal cross-platform Development Framework and development approach based on front end frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710208240.4A CN106990966A (en) 2017-03-31 2017-03-31 Mobile terminal cross-platform Development Framework and development approach based on front end frame

Publications (1)

Publication Number Publication Date
CN106990966A true CN106990966A (en) 2017-07-28

Family

ID=59414619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710208240.4A Pending CN106990966A (en) 2017-03-31 2017-03-31 Mobile terminal cross-platform Development Framework and development approach based on front end frame

Country Status (1)

Country Link
CN (1) CN106990966A (en)

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107783761A (en) * 2017-09-13 2018-03-09 阿里巴巴集团控股有限公司 A kind of interface construction method, device and equipment
CN108228155A (en) * 2017-12-26 2018-06-29 江苏润和软件股份有限公司 EasyApp Mobile Developments platform and development approach
CN108762805A (en) * 2018-05-07 2018-11-06 武汉斗鱼网络科技有限公司 A kind of Hybrid Development Frameworks and frame design method based on Cordova and Typescript
CN109284096A (en) * 2018-08-22 2019-01-29 深圳点猫科技有限公司 A kind of automated construction method and electronic equipment of programming project
CN109284107A (en) * 2018-08-03 2019-01-29 北京城市网邻信息技术有限公司 Application program configuration method, device, computer equipment and readable storage medium storing program for executing
CN109284093A (en) * 2018-10-26 2019-01-29 深圳易嘉恩科技有限公司 Cross-platform Development Framework and its implementation based on front-end technology
CN109542400A (en) * 2018-11-23 2019-03-29 四川长虹电器股份有限公司 Cross-platform development approach based on front-end technology stack
CN109729145A (en) * 2018-11-28 2019-05-07 国云科技股份有限公司 Functional module differentiation display method based on multi-cloud platform
CN109871202A (en) * 2018-12-12 2019-06-11 江苏中威科技软件系统有限公司 A kind of mobile terminal apply mixed developing method and frame
CN109901827A (en) * 2019-03-13 2019-06-18 厦门美图之家科技有限公司 Using exchange method, device, electronic equipment and readable storage medium storing program for executing
CN110020274A (en) * 2017-08-21 2019-07-16 北京国双科技有限公司 Page returning method and device under browser environment are applied in mixing
WO2019196227A1 (en) * 2018-04-10 2019-10-17 平安科技(深圳)有限公司 Platform integration method and apparatus, and computer device and storage medium
CN110347383A (en) * 2019-06-28 2019-10-18 深圳市中农易讯信息技术有限公司 The front end development approach and device of cross-platform desktop application
CN110580147A (en) * 2018-06-07 2019-12-17 阿里巴巴集团控股有限公司 application program development method and device
CN110673835A (en) * 2019-08-15 2020-01-10 广州南洋理工职业学院 Dynamic assembly type development system, method, computer and computer program
CN110691136A (en) * 2019-09-29 2020-01-14 广州华多网络科技有限公司 Data interaction method and device, electronic equipment and storage medium
CN110704136A (en) * 2019-09-27 2020-01-17 北京百度网讯科技有限公司 Rendering method of applet component, client, electronic device and storage medium
CN110737468A (en) * 2018-07-19 2020-01-31 北京路上创客技术服务有限责任公司 executable program cross-platform implementing method
CN110737858A (en) * 2019-10-16 2020-01-31 紫光云技术有限公司 cross-platform page display method
CN111045668A (en) * 2019-12-03 2020-04-21 安徽航天信息科技有限公司 Cross-platform mobile terminal system development method and device
CN111414158A (en) * 2020-03-15 2020-07-14 杭州卓健信息科技有限公司 Cross-platform development method, cross-platform development system and electronic equipment
CN111737621A (en) * 2020-06-17 2020-10-02 友虹(北京)科技有限公司 OFD rendering method, system and device based on WASM
CN111913695A (en) * 2020-08-07 2020-11-10 国网信息通信产业集团有限公司 Code conversion method, device and storage medium
CN111949251A (en) * 2020-07-21 2020-11-17 广州钢铁侠信息科技有限公司 Method for realizing software development and operation across platforms
CN112559026A (en) * 2020-12-23 2021-03-26 南方电网深圳数字电网研究院有限公司 API interface-based native capability expansion method, device and storage medium
CN112860260A (en) * 2021-04-25 2021-05-28 南京苏迪科技有限公司 Web-based cross-platform application construction tool and method in college scene
CN113010239A (en) * 2021-03-26 2021-06-22 北京乐学帮网络技术有限公司 IOS client-based interaction method and device
CN113094043A (en) * 2019-12-23 2021-07-09 北京神州泰岳软件股份有限公司 Page layout method and device and page development platform
CN113419712A (en) * 2021-06-30 2021-09-21 京东方科技集团股份有限公司 Cross-platform application generation method, cross-platform application calling method and development device
CN114097563A (en) * 2021-12-06 2022-03-01 湖南省烟草公司衡阳市公司常宁市分公司 Simple tobacco seedling raising greenhouse management method
CN114168115A (en) * 2020-09-10 2022-03-11 荣耀终端有限公司 Communication system, application downloading method and device
CN114328055A (en) * 2021-12-29 2022-04-12 北京百度网讯科技有限公司 Data processing method, system, device, electronic equipment and storage medium
CN115048084A (en) * 2022-07-14 2022-09-13 江苏天拓龙川数字科技有限公司 Mobile terminal multi-platform product development system and use method
CN116009831A (en) * 2022-12-29 2023-04-25 北京航星永志科技有限公司 Mobile application program development method, device and equipment
CN116166224A (en) * 2022-12-29 2023-05-26 泰豪软件股份有限公司 A method and system for developing hybrid App based on Cordova

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714830A (en) * 2015-04-03 2015-06-17 普元信息技术股份有限公司 System and method for achieving cross-platform application development based on native development language
CN105760162A (en) * 2016-02-04 2016-07-13 四川长虹电器股份有限公司 Development method for hybrid APP software
CN105955744A (en) * 2016-05-03 2016-09-21 中国建设银行股份有限公司 Mobile cross-platform development system and method
CN106293743A (en) * 2016-08-11 2017-01-04 上海泛微网络科技股份有限公司 A kind of mobile modeling and build Mobile solution the method realizing cross-platform issue

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714830A (en) * 2015-04-03 2015-06-17 普元信息技术股份有限公司 System and method for achieving cross-platform application development based on native development language
CN105760162A (en) * 2016-02-04 2016-07-13 四川长虹电器股份有限公司 Development method for hybrid APP software
CN105955744A (en) * 2016-05-03 2016-09-21 中国建设银行股份有限公司 Mobile cross-platform development system and method
CN106293743A (en) * 2016-08-11 2017-01-04 上海泛微网络科技股份有限公司 A kind of mobile modeling and build Mobile solution the method realizing cross-platform issue

Cited By (43)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020274A (en) * 2017-08-21 2019-07-16 北京国双科技有限公司 Page returning method and device under browser environment are applied in mixing
CN107783761A (en) * 2017-09-13 2018-03-09 阿里巴巴集团控股有限公司 A kind of interface construction method, device and equipment
CN108228155A (en) * 2017-12-26 2018-06-29 江苏润和软件股份有限公司 EasyApp Mobile Developments platform and development approach
WO2019196227A1 (en) * 2018-04-10 2019-10-17 平安科技(深圳)有限公司 Platform integration method and apparatus, and computer device and storage medium
CN108762805A (en) * 2018-05-07 2018-11-06 武汉斗鱼网络科技有限公司 A kind of Hybrid Development Frameworks and frame design method based on Cordova and Typescript
CN110580147A (en) * 2018-06-07 2019-12-17 阿里巴巴集团控股有限公司 application program development method and device
CN110737468A (en) * 2018-07-19 2020-01-31 北京路上创客技术服务有限责任公司 executable program cross-platform implementing method
CN109284107A (en) * 2018-08-03 2019-01-29 北京城市网邻信息技术有限公司 Application program configuration method, device, computer equipment and readable storage medium storing program for executing
CN109284096A (en) * 2018-08-22 2019-01-29 深圳点猫科技有限公司 A kind of automated construction method and electronic equipment of programming project
CN109284093A (en) * 2018-10-26 2019-01-29 深圳易嘉恩科技有限公司 Cross-platform Development Framework and its implementation based on front-end technology
CN109542400A (en) * 2018-11-23 2019-03-29 四川长虹电器股份有限公司 Cross-platform development approach based on front-end technology stack
CN109729145A (en) * 2018-11-28 2019-05-07 国云科技股份有限公司 Functional module differentiation display method based on multi-cloud platform
CN109871202A (en) * 2018-12-12 2019-06-11 江苏中威科技软件系统有限公司 A kind of mobile terminal apply mixed developing method and frame
CN109901827A (en) * 2019-03-13 2019-06-18 厦门美图之家科技有限公司 Using exchange method, device, electronic equipment and readable storage medium storing program for executing
CN110347383A (en) * 2019-06-28 2019-10-18 深圳市中农易讯信息技术有限公司 The front end development approach and device of cross-platform desktop application
CN110347383B (en) * 2019-06-28 2023-11-14 深圳市中农易讯信息技术有限公司 Front-end development method and device for cross-platform desktop application
CN110673835A (en) * 2019-08-15 2020-01-10 广州南洋理工职业学院 Dynamic assembly type development system, method, computer and computer program
CN110704136A (en) * 2019-09-27 2020-01-17 北京百度网讯科技有限公司 Rendering method of applet component, client, electronic device and storage medium
CN110691136A (en) * 2019-09-29 2020-01-14 广州华多网络科技有限公司 Data interaction method and device, electronic equipment and storage medium
CN110691136B (en) * 2019-09-29 2022-01-21 广州华多网络科技有限公司 Data interaction method and device, electronic equipment and storage medium
CN110737858A (en) * 2019-10-16 2020-01-31 紫光云技术有限公司 cross-platform page display method
CN111045668A (en) * 2019-12-03 2020-04-21 安徽航天信息科技有限公司 Cross-platform mobile terminal system development method and device
CN111045668B (en) * 2019-12-03 2023-06-06 安徽航天信息科技有限公司 Cross-platform mobile terminal system development method and device
CN113094043A (en) * 2019-12-23 2021-07-09 北京神州泰岳软件股份有限公司 Page layout method and device and page development platform
CN111414158A (en) * 2020-03-15 2020-07-14 杭州卓健信息科技有限公司 Cross-platform development method, cross-platform development system and electronic equipment
CN111737621A (en) * 2020-06-17 2020-10-02 友虹(北京)科技有限公司 OFD rendering method, system and device based on WASM
CN111949251A (en) * 2020-07-21 2020-11-17 广州钢铁侠信息科技有限公司 Method for realizing software development and operation across platforms
CN111913695A (en) * 2020-08-07 2020-11-10 国网信息通信产业集团有限公司 Code conversion method, device and storage medium
CN114168115B (en) * 2020-09-10 2022-11-08 荣耀终端有限公司 Communication system, application downloading method and device
CN114168115A (en) * 2020-09-10 2022-03-11 荣耀终端有限公司 Communication system, application downloading method and device
CN112559026B (en) * 2020-12-23 2024-05-14 南方电网数字平台科技(广东)有限公司 API (application program interface) -based native capability development method, device and storage medium
CN112559026A (en) * 2020-12-23 2021-03-26 南方电网深圳数字电网研究院有限公司 API interface-based native capability expansion method, device and storage medium
CN113010239A (en) * 2021-03-26 2021-06-22 北京乐学帮网络技术有限公司 IOS client-based interaction method and device
CN112860260A (en) * 2021-04-25 2021-05-28 南京苏迪科技有限公司 Web-based cross-platform application construction tool and method in college scene
CN113419712A (en) * 2021-06-30 2021-09-21 京东方科技集团股份有限公司 Cross-platform application generation method, cross-platform application calling method and development device
CN113419712B (en) * 2021-06-30 2024-07-30 京东方科技集团股份有限公司 Cross-platform application generation method, cross-platform application calling method and development device
CN114097563A (en) * 2021-12-06 2022-03-01 湖南省烟草公司衡阳市公司常宁市分公司 Simple tobacco seedling raising greenhouse management method
CN114328055A (en) * 2021-12-29 2022-04-12 北京百度网讯科技有限公司 Data processing method, system, device, electronic equipment and storage medium
CN114328055B (en) * 2021-12-29 2025-06-10 北京百度网讯科技有限公司 Data processing method, system, device, electronic device and storage medium
CN115048084A (en) * 2022-07-14 2022-09-13 江苏天拓龙川数字科技有限公司 Mobile terminal multi-platform product development system and use method
CN116009831B (en) * 2022-12-29 2023-08-08 北京航星永志科技有限公司 Mobile application program development method, device and equipment
CN116009831A (en) * 2022-12-29 2023-04-25 北京航星永志科技有限公司 Mobile application program development method, device and equipment
CN116166224A (en) * 2022-12-29 2023-05-26 泰豪软件股份有限公司 A method and system for developing hybrid App based on Cordova

Similar Documents

Publication Publication Date Title
CN106990966A (en) Mobile terminal cross-platform Development Framework and development approach based on front end frame
CN111158818B (en) Page rendering method and device
CN111740948B (en) Data packet issuing method, dynamic updating method, device, equipment and medium
CN111176629B (en) Application development method and device
CN111338623B (en) Method, device, medium and electronic equipment for developing user interface
CN104615462B (en) Cross-platform Mobile solution generation service end and system
CN109240697B (en) Call processing method and device and storage medium
CN112015384B (en) Interface mapping method and device
CN110780871B (en) A negative one screen loading method, device, terminal and computer readable storage medium
CN111026439B (en) Application program compatibility method, device, equipment and computer storage medium
CN113419712A (en) Cross-platform application generation method, cross-platform application calling method and development device
CN107193570A (en) A kind of method and system for automatically generating API documents
CN103473034B (en) A kind of method and apparatus of dynamic publishing Web service
CN111857658A (en) A method, apparatus, medium and electronic device for rendering dynamic components
CN113761871A (en) Rich text rendering method, apparatus, electronic device and storage medium
CN110221840B (en) Function implementation method and device of application program, equipment and storage medium
CN109840116A (en) A kind of method and apparatus loading resource file
CN114546434B (en) Application updating method, device, electronic device and storage medium
CN113127361A (en) Application program development method and device, electronic equipment and storage medium
CN100512115C (en) Method and system for providing service to user
WO2023093885A1 (en) Cloud technology-based graphic program online development method and system, and related device
CN112162755A (en) Data processing method, device, medium and electronic equipment
CN116684494A (en) Resource processing method, device and storage medium based on distributed cloud platform
CN115129319B (en) A compiling method, a compiling device, an execution method and a computer device
WO2023083071A1 (en) View interaction method and apparatus, electronic device, and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170728

RJ01 Rejection of invention patent application after publication