According to the app development method based on the Cordova platform, AngularJS+Ionic is adopted as a development framework, part of open-source plug-ins such as an app original plug-in are added, a user can directly call the original plug-in of a corresponding platform through a js method, such as a camera, message receiving and sending and the like; a support platform such as android or ios is added, and meanwhile, common front-end tools suitable for the development of enterprises are packaged. By the adoption of the app development method based on the Cordova platform, the user need not configure the Cordova development environment, can independently develop the plug-ins using provided plug-ins and js components, and can conduct fast app development in the shortest time.
Amazon Fire OS, Android, BlackBerry 10, Firefox OS, iOS, Ubuntu, Windows Phone 8, Windows, Tizen
Create your first Cordova app: https://cordova.apache.org/docs/en/latest/guide/cli/
AngularJS is an excellent front-end JS framework that has been used in many of Google’s products. AngularJS has many features, the most core are: MVC, modular, automated two-way data binding, semantic tags, dependency injection and so on.
Ionic is an open-source, free codebase for developing hybrid mobile applications; optimizing the performance of HTML, CSS, and JS, building efficient applications, and optimizing for building Sass and AngularJS.
Some java engineers are more unfamiliar with mobile development. There are still some blind spots for the platform construction and technical fields, but because of the needs of a project, it needs to involve the field of mobile development. Based on the above combination of technologies, the present invention proposes a cordova platform based app development method.
Content of the invention
The present invention aims at the current technical development needs and shortcomings, and provides a cordova platform-based app development method.
The Cordova platform-based app development method according to the present invention solves the above technical problems by adopting the following technical solutions: The Cordova platform-based app development method based on the open-source Cordova platform mainly includes the following steps: 1) configuring cordova development Environment, 2) create basic projects, and 3) create ionic projects.
Preferably, the step 1) refers to using angularjs + ionic as a development framework.
Preferably, the step 2) includes: creating a basic project, adding common plug-ins, and adding a development platform.
Preferably, the step 3) includes, on the basis of the steps 1 and 2, designing a module for encapsulation, and encapsulating a common front-end tool into a developed js method, which can be called directly during development; the user can directly call the corresponding platform through the js method Native plug-in.
Compared with the prior art, the method for developing an app based on the Cordova platform according to the present invention has the following beneficial effects: The present invention is based on the Cordova mobile terminal development platform, and performs corresponding component encapsulation on the development mode of the angularjs + ionic. According to the present invention Eliminating the need to configure the Cordova development environment and using the plug-ins and js components already provided by the present invention to develop plug-ins on their own so as to enable users to rapidly develop applications in the shortest time.
To make the objectives, technical solutions and advantages of the present invention more comprehensible, a Cordova platform-based app development method of the present invention is further described in detail with reference to specific embodiments.
The invention proposes a method for app development based on the Cordova platform, which uses angular + ionic as a development framework and adds some open source plug-ins, such as an app native plug-in. The user can directly call native plug-ins of the corresponding platform, such as webcams, ; And added a support platform such as android or iOS, while encapsulating the common front-end tools for enterprise development tools.
Cordova is a hybrid development platform, you can easily use h5 and other front-end techniques for rapid app development, the present invention provides a set of commonly used plug-in instructions and package part of the common library, developers can help document in a very short period of time Within the completion of mobile app development, because the plug-ins and libraries have been added, the platform has also been injected, developers do not need to carry out the environment, download the appropriate tools can be directly developed (such as adt, Xcode, etc.).
This example describes a cordova platform-based app development method based on the open source cordova platform, including the following steps:
- configuration cordova development environment,
- to create a basic project,
- to create ionic project.
The steps 1) configuration Cordova development environment refers to the use of AngularJS + Ionic as a development framework.
The steps 2) to create a basic project include, create a basic project, add common plug-ins, such as app native plug-in, and add a development platform, such as android or ios platform.
The step 3) to create the ionic project includes, on the basis of the steps 1 and 2, the design module is encapsulated, the commonly used front-end tool is encapsulated into a developed js method, and the call can be directly invoked during development; the user can call the corresponding platform directly through the js method Native plug-in, such as camera, send and receive text messages.
By adopting the Cordova platform-based app development method of the present invention, the specific implementation manner is as follows:
Step one, download adt or Xcode, import the development framework of the present invention; Step two, according to the development framework for app design, such as the required function modules, function list;
Step three, the user began to develop, as the bottom of the development framework for the JS language, a wide range of applications, most developers can get started after a simple understanding of the development;
Step four, the need to use the native plug-in (such as camera, send text messages, maps, etc.), can be based on the js method call native plug-ins;
Step five, the need to use the tool class, the direct use of the module can be designed, such as multi-parameter pop-up box, validation box, positioning and so on.
By adopting the Cordova platform-based app development method of the present invention, the development of an enterprise-level small and medium-sized app can be completed in the shortest time, eliminating the time period for learning a new language and without requiring the establishment of an environment system. The invention provides Plug-ins and js components for rapid development.
The above specific embodiments are only specific examples of the present invention. The scope of protection of the present invention includes, but is not limited to, the above specific embodiments. Any ordinary technical personnel who comply with the claims of the present invention and have done so Appropriate changes or substitutions should all fall within the scope of protection of the present invention.
- INSPUR SHANDONG ELECTRONIC INFORMATION CO LTD; Development method for bank self-service system cross-browser plugin based on WINDOWS platform (G06F9/45) SEA
- WUXI TVMINING MEDIA SCIENCE & TECHNOLOGY CO LTD; Plug-in development method and system based on Java. (G06F9/45) SEA