CN116009831B - Mobile application program development method, device and equipment - Google Patents
Mobile application program development method, device and equipment Download PDFInfo
- Publication number
- CN116009831B CN116009831B CN202211712725.4A CN202211712725A CN116009831B CN 116009831 B CN116009831 B CN 116009831B CN 202211712725 A CN202211712725 A CN 202211712725A CN 116009831 B CN116009831 B CN 116009831B
- Authority
- CN
- China
- Prior art keywords
- code
- mobile application
- application program
- target
- html
- 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.)
- Active
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Stored Programmes (AREA)
Abstract
The embodiment of the invention provides a mobile application program development method, a device and equipment, wherein the method comprises the following steps: acquiring a DAO code and a front-end hypertext markup language (HTML) code of a data access object corresponding to a mobile application to be developed; generating a front-end resource package according to the DAO code of the data access object and the HTML code of the front-end hypertext markup language; and deploying the mobile application program according to the back-end mobile application program and the front-end resource package in the operating system. The method of the embodiment of the invention improves the development efficiency of the mobile application program.
Description
Technical Field
The present invention relates to the field of mobile application technologies, and in particular, to a method, an apparatus, and a device for developing a mobile application.
Background
Currently, mobile terminal systems mainly include: the development modes of the mobile application program for three operating systems mainly comprise a native mode and a native and hypertext markup language (Hyper Text Markup Language, HTML) mixed mode, wherein the native mode has certain performance advantages, and the native and HTML mixed mode has certain portability advantages.
In the related art, in the native HTML mixed mode, the data access object (Data Access Object, DAO) code of the database operation of the service function in the system is implemented in the back end portion of the apple, the android, the hong-me, etc., while the front end HTML portion excessively depends on the back end, the front end code is stored as a resource file in the projects of the apple, the android, the hong-me, etc., and the whole projects of the apple, the android, the hong-me, etc. need to be released when releasing, so that the correlation among the code of the apple, the android, the hong-me, etc., the DAO code of the service database operation, the front end HTML code is too tight, the front end and the back end HTML code are integrated together, so that the development work of the front end and the back end are cross-mixed together, resulting in lower development efficiency of the application program.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a mobile application program development method, a device and equipment.
Specifically, the embodiment of the invention provides the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for developing a mobile application, including:
acquiring a DAO code and a front-end hypertext markup language (HTML) code of a data access object corresponding to a mobile application to be developed;
Generating a front-end resource package according to the data access object DAO code and the front-end hypertext markup language (HTML) code;
and deploying the mobile application program according to the back-end mobile application program and the front-end resource package in the operating system.
Further, the data access object DAO code and the front-end hypertext markup language (HTML) code corresponding to the mobile application program are developed through a web project.
Further, the method further comprises the following steps:
and debugging the front-end hypertext markup language (HTML) code and the Data Access Object (DAO) code which are developed in a web project mode by utilizing a preset interface management file.
Further, the deploying the mobile application according to the back-end mobile application and the front-end resource package in the operating system includes:
unpacking the front-end resource package based on a back-end mobile application program in an operating system to obtain a target header file; the target header file comprises target information of each target file in the front-end resource package; the target file comprises a data access object DAO code or a front-end hypertext markup language (HTML) code; the target information comprises storage information of a target file;
Writing target information in the target header file into a cache;
and reading the target file from the front-end resource package according to the target information in the target header file in the cache, and deploying the mobile application program and displaying the mobile application interface.
Further, before unpacking the front-end resource package based on the back-end mobile application program in the operating system, the method further comprises:
acquiring a data packet; the data packet comprises a target background picture;
and loading the target background picture in the data packet.
In a second aspect, an embodiment of the present invention further provides a mobile application development apparatus, including:
the acquisition module is used for acquiring a data access object DAO code and a front-end hypertext markup language (HTML) code corresponding to the mobile application program to be developed;
the generation module is used for generating a front-end resource package according to the data access object DAO code and the front-end hypertext markup language (HTML) code;
and the deployment module is used for deploying the mobile application program according to the back-end mobile application program and the front-end resource package in the operating system.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the mobile application development method according to the first aspect when executing the program.
In a fourth aspect, embodiments of the present invention also provide a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the mobile application development method according to the first aspect.
In a fifth aspect, embodiments of the present invention also provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the mobile application development method according to the first aspect.
According to the mobile application program development method, device and equipment provided by the embodiment of the invention, the data access object DAO code and the front-end hypertext markup language (HTML) code associated with the mobile application service are separated from the mobile application, namely, the data access object DAO code and the front-end hypertext markup language (HTML) code associated with the service are both placed at the front end, the universal interface not associated with the service is placed at the rear end, the front-end code is not required to be integrated in projects such as android, apples and hong Mongolian, the development work of the front end and the rear end is separated into two projects, and can be independently developed and independently issued and packaged, so that the problems of the prior art that the development work task of the mobile application program is not independent in development, the front-end work content and the rear-end work content are mutually intersected, and the workload increase and the work efficiency decrease are solved, and the development efficiency of the mobile application program is improved; and the back-end mobile terminal application program in the operating system comprises a universal interface which is not related to the business, so that project projects such as android, apples and hong Mongolian only need to develop a set of back-end mobile terminal application program aiming at different mobile terminal devices such as android, apples and hong Mongolian respectively, front-end resource packages of all different business systems can be put in the same set of back-end android program to unpack and run, development workload of the back-end android, apples, hong Mongolian and the like is reduced, and development and maintenance costs are reduced.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a mobile application development method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a packet generation process according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a front-end resource packet generation process according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a packet unpacking and reading process of a front-end resource packet according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a mobile application development device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The method of the embodiment of the invention can be applied to a mobile application development scene, wherein the DAO code of a data access object related to a service and the HTML code of a front-end hypertext markup language are both placed at the front end, a general interface which is not related to the service is placed at the rear end, the front-end code is not required to be integrated in project projects such as android, apples, hong Mongolian and the like, the development work of the front end and the rear end is separated into two projects, the projects can be independently developed and independently released and packaged, the coupling degree of the front end and the rear end is reduced, the problems that development work tasks are not independent in development due to the fact that the front end and the rear end of a mobile application program are integrated together and are not separated in the prior art, the front-end work content and the rear-end work content are mutually intersected are solved, and the workload is increased and the working efficiency is reduced are improved.
In the related technology, in the native and HTML mixed mode, the DAO layer of the database operation of the business function in the system is implemented at the back end part of apples, android, hong and the like, while the front end HTML part excessively depends on the back end, and the front end code is stored as a resource file in the projects of apples, android, hong and the like, and the whole projects of apples, android, hong and the like are required to be released during release, so that the codes of apples, android, hong and the like, the DAO layer code of the business database operation and the front end HTML code are excessively closely related, and the front end and the back end are integrated together, so that the development work of the front end and the back end are crossly mixed together, and the development efficiency of an application program is lower.
According to the mobile application program development method, the data access object DAO code and the front-end hypertext markup language (HTML) code associated with the mobile application service are separated from the mobile application, namely, the data access object DAO code and the front-end hypertext markup language (HTML) code associated with the service are both placed at the front end, a general interface which is not associated with the service is placed at the rear end, the front-end code is not required to be integrated in projects such as android, apples and hong Mongolian, the development work of the front end and the rear end is separated into two projects, and can be independently developed and independently released and packaged, so that the problems that the development work task of the mobile application program is not independent in development and the development work of the front end and the rear end are not separated are solved, the front-end work content and the rear-end work content are mutually intersected, the workload is increased and the work efficiency is reduced are solved, and the development efficiency of the mobile application program is improved; and the back-end mobile terminal application program in the operating system comprises a universal interface which is not related to the business, so that project projects such as android, apples and hong Mongolian only need to develop a set of back-end mobile terminal application program aiming at different mobile terminal devices such as android, apples and hong Mongolian respectively, front-end resource packages of all different business systems can be put in the same set of back-end android program to unpack and run, development workload of the back-end android, apples, hong Mongolian and the like is reduced, and development and maintenance costs are reduced.
In order to facilitate a clearer understanding of the technical solutions of the embodiments of the present application, some technical contents related to the embodiments of the present application will be first described.
Currently, mobile terminal systems mainly include: the development modes of the mobile application program for three operating systems mainly comprise a native mode and a native and HTML mixed mode, wherein the native mode has certain performance advantages, and the native and HTML mixed mode has certain portability advantages.
The native mode is mainly developed by adopting apple, android, hong Meng and other libraries, has the advantages of high efficiency in compiling and running, short time consumption and certain performance, but is not convenient in cross-platform transplantation.
The native and HTML mixed mode mainly adopts a mode that the back end (native) is developed by using corresponding computer software development languages such as apples, android, hong Mongolian and the like, and the front end (HTML) is developed by using corresponding computer software development languages of web, so that the front end part of the mobile terminal application program can be transplanted into other systems, such as: web programs, weChat applets, etc., avoiding repeated development caused by application requirements of different scenes. The main implementation mode of the mode is that a file (HTML static resource) developed at the front end is put into projects such as apples, android and hong Mongolian to be published, and an installation program (such as An Zhuohui generation. Apk program) executable by an operating system of the corresponding mobile terminal device is generated.
In the conventional development process, the data operation function of the service part is integrated in the back end to be realized, that is, the codes of apples, android, hong Mongolian and the like contain the corresponding function codes of the DAO layer operated by the service database, such as: database related operations, sql statements, etc.
For the original HTML-adding mixed mode, the front-end HTML part excessively depends on the rear end, the front-end code is stored as a resource file in projects such as apples, android, hong Mongolian and the like, the whole projects such as apples, android, hong Mongolian and the like are required to be released during release, and when the front-end business functions are more, the release is inconvenient; in addition, the DAO layer of the database operation of the business function in the system is realized at the back end parts of apples, android, hong Mongolian and the like, and when the business types are too many, a plurality of versions can be generated, so that unified management, development and maintenance are difficult; moreover, the codes such as apples, android, hong Mongolian and the like, DAO layer codes operated by a service database and front-end HTML codes are too closely related to each other, and the front end and the rear end are integrated together, so that development work is crossly mixed together, boundary division is unclear, the difficulty of links such as development, communication and debugging is increased, and the working efficiency is affected; the number of interfaces realized by the front end and the rear end can be increased along with the increase of service functions, and when the service functions are more, a large number of interfaces can be generated, so that the maintenance is not facilitated.
The following describes the technical scheme of the present invention in detail with reference to fig. 1 to 6. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 1 is a flowchart of an embodiment of a mobile application development method according to an embodiment of the present invention. As shown in fig. 1, the method provided in this embodiment includes:
step 101, acquiring a data access object DAO code and a front-end hypertext markup language (HTML) code corresponding to a mobile application program to be developed;
specifically, in the existing native HTML (hypertext markup language) mixed mode, the front-end HTML part depends on the back end, and files (HTML static resources) developed by the front end are put into projects such as apples, android and hong Mongolian for release; the codes of apples, android, hong Mongolian and the like can comprise corresponding function codes of a DAO layer operated by a business database, namely the DAO layer operated by the database of business functions in the system is realized at the back end part of apples, android, hong Mongolian and the like.
The DAO layer part and the front end HTML part of the database operation in the mobile end program engineering code are required to be placed under engineering catalogues such as android and apples, and the whole projects such as apples, android and hong Mongolian are required to be released during release, so that the codes such as apples, android and hong Mongolian, the DAO layer code and the front end HTML code of the business database operation are too closely related, the front end and the rear end are integrated together, and development work of the front end and development work of the rear end are cross-mixed together, so that the development efficiency of an application program is low.
In order to solve the above problems, in the embodiment of the present invention, a data access object DAO code and a front-end hypertext markup language HTML code corresponding to a mobile application to be developed are first obtained, where the data access object DAO code is a code related to a mobile application service to be developed, and is used to implement an algorithm and logic of the mobile application, so as to improve the speed, performance and responsiveness of the mobile application; the front-end hypertext markup language HTML code is used for display of the application interface.
Step 102, generating a front-end resource package according to a data access object DAO code and a front-end hypertext markup language (HTML) code;
specifically, in the embodiment of the invention, after the data access object DAO code and the front-end hypertext markup language HTML code corresponding to the mobile application program to be developed are obtained, a front-end resource package is generated according to the data access object DAO code and the front-end hypertext markup language HTML code, that is, the data access object DAO code and the front-end hypertext markup language HTML code associated with the mobile application service are both placed at the front end, and a universal interface which is not associated with the service is placed at the rear end, so that the DAO layer part and the front-end HTML part of the database operation are separated from the mobile application in the dividing manner, and therefore, the corresponding function code of the DAO layer of the service database operation is not needed to be contained in the codes such as apples, android and hong, that is, that the DAO layer of the database operation of the service function in the system is realized at the front end is not needed to be realized at the rear end part such as apples, android and hong, and the like, and a brand-new front-rear-end separation mode is realized.
The front-end HTML part and the DAO layer part operated by the database can be independently packaged and processed through the front-end and back-end separated application program design method, file resource packages with a custom format are generated, the file resource packages are independently packaged and processed with mobile applications such as apples, android and hong, the file resource packages with the custom format are generated, the file resource packages with the custom format are separated from mobile applications such as apples, android and hong, the separation of front-end HTML part codes and code libraries developed by the back-end apples, android and hong is realized, the separation of installation and deployment is also realized, the problem that when development work of the front-end and the back-end are mixed together in a cross mode, the DAO layer part operated by the database and the front-end HTML part are required to be put under engineering directories such as android and apples to be uniformly packaged for debugging is solved, the problem that the front-end and the back-end of the mobile application program in the prior art are integrated together and not separated, the responsibility in the aspect of development is not independent, the problem that the front-end development work and the back-end of the application program is not separated from the back-end is not independent, the development work is difficult to be carried out, the problem that the front-end and the back-end development work is difficult to be connected with the development work is high, the front-end and the development work is difficult to be easily carried out, and the development work is difficult to be easily is difficult to maintain, and the front-end development has the same, and the development work has high-end has the problem.
And 103, deploying the mobile application program according to the back-end mobile application program and the front-end resource package in the operating system.
Specifically, after generating a front-end resource package according to the DAO code of the data access object and the HTML code of the front-end hypertext markup language, the mobile application can be deployed according to the back-end mobile application and the front-end resource package in the operating system. Optionally, the back-end mobile application in the operating system includes a general interface, such as a speech recognition interface, a data operation interface, and other general interfaces; the front end code is not required to be integrated in projects such as android, apples, hong Mongolian and the like, but the development work of the front end and the rear end is separated into two projects, so that the front end and the rear end can be independently developed, independently released and packaged, the coupling degree of the front end and the rear end is reduced, the flexibility is enhanced, the complex and changeable front end application requirements are flexibly met, the application program development efficiency is improved, and the customer satisfaction is improved. In addition, the back-end mobile terminal application program in the operating system includes a general interface which is not associated with the service, so that project projects such as android, apple, hong and the like only need to develop a set of back-end mobile terminal application program respectively aiming at different mobile terminal devices such as android, apple, hong and the like, for example: in the android mobile terminal application program, front-end resource packages of all different service systems can be put in the same set of back-end android program to unpack and run, so that development workload of back-end android, apples, hong Mongolian and the like is reduced, and development and maintenance costs are reduced.
According to the method, the data access object DAO code and the front-end hypertext markup language (HTML) code associated with the mobile application service are separated from the mobile application, namely, the data access object DAO code and the front-end hypertext markup language (HTML) code associated with the service are both placed at the front end, a universal interface which is not associated with the service is placed at the rear end, the front-end code is not required to be integrated in projects such as android, apples and hong-mong, the development work of the front end and the rear end is separated into two projects, the projects can be independently developed and independently released and packaged, the coupling degree of the front end and the rear end of the mobile application program is reduced, the problems that development work tasks in development are not independent due to the fact that the front end and the rear end are integrated together and are not separated, the front-end work content and the rear-end work content are mutually intersected, the workload is increased and the work efficiency is reduced are solved, and the development efficiency of the mobile application program is improved; and the back-end mobile terminal application program in the operating system comprises a universal interface which is not related to the business, so that project projects such as android, apples and hong Mongolian only need to develop a set of back-end mobile terminal application program aiming at different mobile terminal devices such as android, apples and hong Mongolian respectively, front-end resource packages of all different business systems can be put in the same set of back-end android program to unpack and run, development workload of the back-end android, apples, hong Mongolian and the like is reduced, and development and maintenance costs are reduced.
In one embodiment, the data access object DAO code and front-end hypertext markup language HTML code corresponding to the mobile application are developed by way of web projects. Specifically, in the embodiment of the invention, the separated front-end HTML part and the data access object DAO code can be developed in a manner of independent web projects, and the DAO layer part of database operation is integrated into js files of the web projects, and is deployed in a manner of front-end resource packages during deployment. In the embodiment of the invention, the DAO layer part and the front-end HTML part of the database operation in the program engineering code of the original mobile end are not placed under engineering directories such as android, apples and the like any more, but are used as common web projects to independently establish engineering for management and development, namely, the development work of the front end and the rear end is separated into two engineering, and the two engineering can be independently developed, independently issued and packaged, so that the coupling degree of the front end and the rear end is reduced; optionally, after developing the front-end hypertext markup language HTML code and the data access object DAO code by means of web projects, the data access object DAO code and the front-end hypertext markup language HTML code can be packaged to generate a front-end resource package, so that independent packaging processing of the front-end HTML part and the DAO layer part operated by a database is realized, a file resource package in a self-defined format is generated, and the file resource package is separated from mobile applications such as apples, android and hong-Meng, and separation of the front-end code and code libraries developed by the rear-end apples, android and hong-Meng is realized, and separation of installation and deployment is also realized; and then the universal interfaces in mobile terminal application programs such as android, apples, hong Mongolian and the like at the back end can unpack, read and provide an operating environment and the like for the front end resource package generated at the front end, so that the deployment of the mobile application programs is realized.
According to the method, the front-end hypertext markup language (HTML) code and the Data Access Object (DAO) code are developed in a web project mode, so that a DAO layer part and a front-end HTML part of database operation in original mobile-end program engineering codes are not placed under engineering directories such as android and apples any more, and are used as common web projects for independently creating engineering for management and development, namely development work of the front end and the rear end is separated into two engineering, and the two engineering can be independently developed, independently issued and packaged, so that the coupling degree of the front end and the rear end is reduced; the method can realize independent packaging treatment of the front end HTML part and the DAO layer part of database operation, generate a file resource package with a self-defined format, and separate from mobile applications such as apples, android, hong Meng and the like, so that the separation of front end codes and code libraries developed by the rear end apples, android, hong Meng and the like is realized, and the separation of installation and deployment is also realized.
In an embodiment, further comprising:
and debugging the front-end hypertext markup language (HTML) code and the Data Access Object (DAO) code which are developed in a web project mode by utilizing a preset interface management file.
Specifically, in the embodiment of the invention, after the front-end hypertext markup language (HTML) code and the Data Access Object (DAO) code are developed in a web project mode, a preset interface management file can be utilized to debug the front-end HTML code and the Data Access Object (DAO) code; optionally, the preset interface management file includes a universal interface, such as a voice recognition interface, a data operation interface, and other universal interfaces; optionally, the preset interface management file has an operation environment identification function, and can identify web, android, apple and hong operation environments and automatically switch and call interfaces of corresponding environments according to the identified operation environments; optionally, the preset interface management file can be embedded into a web development project corresponding to the front-end service code, and the android, apple, hong Meng running environment and web project running environment can be automatically identified, so that the front-end hypertext markup language html code in the front-end web project can interact with the rear-end mobile application program in the operating system through the preset interface management file in the android, apple, hong Meng running environment, and the functions of hypertext transfer protocol http request and the like are realized; the sql statement and the parameters in the DAO code of the data access object can be transmitted to a back-end mobile application program in an operating system through a preset interface management file, so that data query, database opening, database cursor acquisition, database operation and other functional verification and debugging can be performed; one end of the interface management file is connected with a service code in a front-end resource package, the other end of the interface management file is connected with a back-end mobile application program in an operating system, so that the operation of hypertext markup language (HTML) code and a Data Access Object (DAO) code in the front-end resource package in the system environment of android, apple and hong mobile equipment is realized, and page jumping, resource file acquisition, requested parameter transmission, data response and the like can be simulated in the web project operation environment through a preset interface management file; therefore, the front-end developer can debug the hypertext markup language (HTML) code and the Data Access Object (DAO) code in the front-end resource package through the preset interface management file, the front-end developer can conveniently debug the hypertext markup language (HTML) code and the Data Access Object (DAO) code in the front-end resource package, the localized development and debugging of the front end are realized, the separate development and debugging of the front end and the rear end are also realized, the problem that the front-end program code needs to be placed in an engineering catalog such as an android and an apple to verify whether the program code is correct or not after the front-end program code is developed in the prior art is avoided, and the participation of the rear-end developer is necessary when the front-end program code is debugged, so that the operation flow is very troublesome. According to the embodiment of the invention, the mode of high coupling degree of front-end and back-end development and debugging in the prior art is abandoned, the front-end localized development and debugging are realized through the preset interface management file, and the front-end and back-end separate development and debugging are realized, so that the participation of back-end developers is not needed in the development and debugging process of the front-end resource package, the labor cost is reduced, and the development and debugging efficiency of the mobile application program is improved.
In an embodiment, the deployment of the mobile application according to the back-end mobile application and the front-end resource package in the operating system includes:
unpacking the front-end resource package based on a back-end mobile application program in an operating system to obtain a target header file; the target header file comprises target information of each target file in the front-end resource package; the target file comprises a data access object DAO code or a front-end hypertext markup language (HTML) code; the target information comprises storage information of a target file;
writing target information in the target header file into a cache;
and reading the target file from the front-end resource package according to the target information in the target header file in the cache, and deploying the mobile application program and displaying the mobile application interface. Specifically, in the implementation of the invention, the mobile terminal application program is divided into three components, namely a mobile terminal application part (a rear mobile terminal application program in an operating system such as android, apple, hong Meng and the like), a DAO layer part operated by a database and a front HTML part operated by a service, and the DAO layer part operated by the database and the front HTML part related to the service are separated from the mobile terminal application and independently developed and independently released and packed to generate a file resource package in a custom format, so that the coupling degree of the front and rear ends is reduced, the flexibility is enhanced, the complex and changeable front end application requirements are flexibly met, the development efficiency is improved, and the customer satisfaction is improved; and then the back-end mobile end application program in the operating system unpacks, reads and provides an operating environment and the like for the front-end resource package generated by the front end, so that the deployment of the mobile application program is realized. Optionally, unpacking the front-end resource package based on a back-end mobile application program in the operating system to obtain a target header file; the target header file comprises storage information of each target file in the front-end resource package, such as information of path, name, type, size and the like of each target file; optionally, after the target header file information is acquired, the storage information of each target file in the target header file is written into the cache, that is, the information such as the path, the name, the type, the size and the like of each target file in the front-end resource package is written into the cache, and optionally, the data read-write speed in the cache is relatively high, so that when the target file in the front-end resource package needs to be read, the storage information corresponding to the target file needing to be read can be acquired from the cache rapidly, and the reading efficiency of the target file in the front-end resource package is improved.
Further, after the storage information of each target file in the target header file is written into the cache and the preset entry file is loaded, the storage information of the target file corresponding to the user request can be firstly determined from the cache based on the request of the user, such as a login request and a query request, then the target file corresponding to the user request is obtained from the front-end resource package according to the storage information of the target file corresponding to the user request, and the target file corresponding to the user request is read, so that the response to the user request is realized, and the deployment of the application program and the display of the application interface are completed.
In addition, the back-end mobile terminal application program in the operating system comprises a general interface which is not related to the business, so that project projects such as android, apples and hong Mongolian only need to develop a set of back-end mobile terminal application programs for different mobile terminal devices such as android, apples and hong Mongolian respectively, front-end resource packages of all different business systems can be put in the same set of back-end android program for unpacking operation, development workload of the back-end android, apples and hong Mongolian is reduced, and development and maintenance costs are reduced; on the other hand, in the mobile application program method provided by the embodiment of the invention, all mobile application programs such as android, apples and hong Meng can be adapted by developing only one set of front-end HTML resource package, so that portability is improved, development workload is reduced, and development and maintenance costs are reduced.
In one embodiment, before unpacking the front-end resource package based on the back-end mobile application in the operating system, the method further comprises:
acquiring a data packet; the data packet comprises a target background picture;
and loading the target background picture in the data packet.
Specifically, the mobile application program development method in the embodiment of the invention further comprises a data packet; the data packet includes a target background picture, such as a welcome background picture, and may also include file contents such as a login background, a login cover, a database, a data file, an icon file, and a usage instruction.
Optionally, in the embodiment of the present invention, before the front-end mobile application program in the operating system unpacks and reads the front-end resource package, the target background picture in the data package is loaded, that is, before unpacking and reading the front-end resource package is performed, the target background picture in the data package can be actively presented on the terminal, for example, the user-defined picture or the popular background picture being loaded is displayed, so that when the loaded front-end resource package is larger, the screen flicker and the white screen phenomenon caused by the longer time consumption of the unpacking and reading process of the front-end resource package are avoided, and the smooth transition effect when the mobile application program is deployed is achieved.
Exemplary, the packet generation process shown in fig. 2 is as follows:
firstly, running a preset data packet encapsulation module; the data packet packaging module is used for packaging the selected files so as to generate a generated data packet.
Then, selecting and uploading background pictures, icon files, database files, other data files and the like; alternatively, the corresponding file may be selected locally for uploading, or files on other paths may be selected for uploading, which is not limited in the embodiment of the present invention.
Then, a preset encapsulation module automatically traverses all files, obtains information such as file paths, names, types, sizes and the like, and creates temporary copies of all files in a temporary directory; optionally, by creating temporary copies of all files in the temporary directory, modifications to the original files can be avoided, and the integrity and accuracy of the original files can be ensured.
Then creating an empty data packet file in a default data packet output path, encrypting the obtained information such as the file path, the name, the type, the size and the like, and sequentially writing the encrypted information into the data packet file; optionally, the default packet output path may be determined according to actual needs, or may be modified or adjusted, which is not limited in the embodiment of the present invention.
And finally, encrypting the file content, sequentially writing the encrypted file content into the data packet file, and downloading the data packet.
According to the method, before unpacking and reading of the front-end resource package, the user-defined picture in the data package can be actively presented on the terminal, screen flickering and white screen phenomena caused by long time consumption of unpacking and reading of the front-end resource package when the loaded front-end resource package is large are avoided, and therefore the effect of smooth transition when the mobile application program is deployed is achieved.
The mobile application program development method in the embodiment of the invention comprises a data packet generation process, a front-end resource packet generation process, a data packet and a resource packet unpacking and reading process.
The front-end resource packet generation process is illustrated in fig. 3, and specifically includes the following steps:
firstly, running a preset resource file packaging module; the resource file packaging module is used for packaging the selected resource file so as to generate a front-end resource package.
Then, selecting a resource file path; alternatively, the corresponding resource file may be selected locally, or the resource file on another path may be selected, which is not limited in the embodiment of the present invention.
Then, the packaging module automatically traverses the resource file path, acquires information such as the resource file path, the name, the type, the size and the like, and creates temporary copies of all the resource files in the temporary directory; optionally, by creating temporary copies of all files in the temporary directory, modifications to the original files can be avoided, and the integrity and accuracy of the original files can be ensured.
Then, creating an empty resource package file in the selected resource package output path; encrypting the obtained information such as the path, the name, the type, the size and the like of the resource file, and sequentially writing the encrypted information into a resource package file; optionally, the output path of the resource packet may be determined according to actual needs, or may be modified or adjusted, which is not limited in the embodiment of the present invention.
And finally, encrypting the content of the resource file and sequentially writing the encrypted content into the resource package file.
Exemplary packet and front-end resource packet unpacking and reading processes are shown in fig. 4, and specifically include the following steps:
firstly, copying a data packet, a front-end resource packet and a back-end mobile application program into a mobile application program installation catalog of android, apples, hong Mongolian and the like, and installing and starting the back-end mobile application programs of android, apples, hong Mongolian and the like; the data packet comprises a custom picture; the front-end resource package comprises a data access object DAO code and a front-end hypertext markup language (HTML) code; the back-end mobile application program in the operating system comprises a universal interface, such as a voice recognition interface, a data operation interface and other universal interfaces.
Then, reading file information in the data packet checksum data packet, such as reading file path, name, type and size information in the data packet, and performing decryption processing; and reading the file stream according to the file information of the data packet, creating a corresponding empty file on the installation path of the application program of the mobile terminal such as android, apple, hong Meng and the like, and writing the file stream in the read data packet into the corresponding file.
Then, performing front-end resource package verification and reading resource file information in the front-end resource package, such as reading path, name, type and size information of a data access object DAO code and a front-end hypertext markup language (HTML) code file, and decrypting; the method mainly comprises the steps of carrying out unique identification processing on decrypted resource file path, name, type and size information to obtain unique identification of each resource file, and storing the unique identification and the resource file information into a cache in a key value pair mode; optionally, the resource file information is cached, so that the access speed of the resource file can be improved, and the efficiency is improved.
Then, entering an entry interface processing part of mobile end application programs such as android, apples, hong Meng and the like, and searching matched files from the unpacked files of the data packet according to the file information such as the background and the cover required by the entry interface; reading resource files such as a background required by a page, drawing and constructing functions of mobile end application program interfaces such as android, apple, hong and the like, drawing and constructing the interfaces according to the acquired resource files, realizing an entrance of a front-end HTML page, realizing a smooth transition effect on relevant style processing of the entrance through mobile end application programs such as android, apple, hong and the like, and avoiding a flickering phenomenon when the HTML entry page is directly loaded for display;
Finally, the front end initiates an HTML page file request, the rear end receives the request, searches matched resources from the cache according to the resource file information in the request, and transmits the matched resource information after processing (path processing) to a resource response processing module; the resource response processing module acquires the resource file type from the resource information, for example: html, js, css, png, jpeg, json, selecting a resource file processor matched with the type according to the obtained resource type; the resource file processor opens a resource package file according to the resource file information, constructs a resource package structure, reads and constructs a resource file stream after determining data information such as offset of the resource file, and responds to the resource response processing module; the resource response processing module decrypts the resource file stream and responds the decrypted resource file stream to the corresponding request; the mobile terminal application programs such as android, apples, hong Mongolian and the like acquire all resource files required by the HTML page and display the HTML page; and circularly executing the resource acquisition step, namely reading the content of the resource file from the resource package, decrypting and responding to the corresponding request, thereby realizing the unpacking and reading processes of the data package and the resource package.
The method of the embodiment can effectively solve the problem that the release of the mobile terminal application program is inconvenient due to more service functions, and the problem that the mobile terminal application program is difficult to uniformly manage, develop and maintain due to the high coupling of the front end HTML and the DAO layer of database operation and the rear end in terms of codes; the problems of non-independent development work tasks, unclear responsibility division boundaries and the like in the development aspect caused by integration and non-separation of the mobile terminal application program end and the back end are avoided, the problems of difficult deployment and maintenance of the front and back ends of the mobile terminal application program and difficult management of the front and back end versions of the mobile terminal application program are solved, the problems of workload increase and work efficiency reduction caused by the fact that front and back end developers must develop in the same code base and the front and back end work content is intersected with each other are also effectively solved, and the problems of non-uniform and non-universal front and back end interfaces of the mobile terminal application program, difficult transplanting of different platforms of the front end codes of the mobile terminal application program and repeated development and development cost increase are solved.
The mobile application development device provided by the invention is described below, and the mobile application development device described below and the mobile application development method described above can be referred to correspondingly.
Fig. 5 is a schematic structural diagram of a mobile application development device provided by the present invention. The mobile application development device provided in this embodiment includes:
an obtaining module 510, configured to obtain a DAO code and a front-end hypertext markup language HTML code corresponding to a mobile application to be developed;
a generating module 520, configured to generate a front-end resource package according to the DAO code of the data access object and the HTML code of the front-end hypertext markup language;
the deployment module 530 is configured to deploy the mobile application according to the back-end mobile application and the front-end resource package in the operating system.
Optionally, the front-end hypertext markup language HTML code and the data access object DAO code are developed by way of web projects.
Optionally, the obtaining module 510 is further configured to: and debugging the front-end hypertext markup language (HTML) code and the Data Access Object (DAO) code by using a preset interface management file.
Optionally, the deployment module 530 is specifically configured to: unpacking the front-end resource package based on a back-end mobile application program in an operating system to obtain a target header file; the target header file comprises target information of each target file in the front-end resource package; the target file comprises a data access object DAO code or a front-end hypertext markup language (HTML) code; the target information comprises storage information of a target file;
Writing target information in the target header file into a cache;
and reading the target file from the front-end resource package according to the target information in the target header file in the cache, and deploying the mobile application program and displaying the mobile application interface.
Optionally, the deployment module 530 is further configured to: acquiring a data packet; the data packet comprises a target background picture; and loading the target background picture in the data packet.
The device of the embodiment of the present invention is configured to perform the method of any of the foregoing method embodiments, and its implementation principle and technical effects are similar, and are not described in detail herein.
Fig. 6 illustrates a physical schematic diagram of an electronic device, which may include: processor 610, communication interface (Communications Interface) 620, memory 630, and communication bus 640, wherein processor 610, communication interface 620, and memory 630 communicate with each other via communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a mobile application development method comprising: acquiring a DAO code and a front-end hypertext markup language (HTML) code of a data access object corresponding to a mobile application to be developed; generating a front-end resource package according to the DAO code of the data access object and the HTML code of the front-end hypertext markup language; and deploying the mobile application program according to the back-end mobile application program and the front-end resource package in the operating system.
Further, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the mobile application development method provided by the above methods, the method comprising: acquiring a DAO code and a front-end hypertext markup language (HTML) code of a data access object corresponding to a mobile application to be developed; generating a front-end resource package according to the DAO code of the data access object and the HTML code of the front-end hypertext markup language; and deploying the mobile application program according to the back-end mobile application program and the front-end resource package in the operating system.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the mobile application development methods provided above, the method comprising: acquiring a DAO code and a front-end hypertext markup language (HTML) code of a data access object corresponding to a mobile application to be developed; generating a front-end resource package according to the DAO code of the data access object and the HTML code of the front-end hypertext markup language; and deploying the mobile application program according to the back-end mobile application program and the front-end resource package in the operating system.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (5)
1. A method of developing a mobile application program, comprising:
acquiring a DAO code and a front-end hypertext markup language (HTML) code of a data access object corresponding to a mobile application to be developed;
generating a front-end resource package according to the data access object DAO code and the front-end hypertext markup language (HTML) code;
deploying the mobile application program according to the back-end mobile application program and the front-end resource package in the operating system; the back-end mobile terminal application program comprises a universal interface;
the data access object DAO code and the front-end hypertext markup language (HTML) code corresponding to the mobile application program are developed in a web project mode;
debugging the front-end hypertext markup language (HTML) code and the Data Access Object (DAO) code which are developed in a web project mode by utilizing a preset interface management file;
the deploying mobile application programs according to the back-end mobile application programs and the front-end resource packages in the operating system comprises the following steps:
unpacking the front-end resource package based on a back-end mobile end application program in an operating system to obtain a target header file; the target header file comprises target information of each target file in the front-end resource package; the target file comprises the data access object DAO code or the front-end hypertext markup language (HTML) code; the target information comprises storage information of the target file;
Writing the target information in the target header file into a cache;
and reading the target file from the front-end resource package according to the target information in the target header file in the cache, and deploying the mobile application program and displaying the mobile application interface.
2. The method for developing a mobile application program according to claim 1, wherein before the front-end resource package is unpacked based on the back-end mobile application program in the operating system, the method further comprises:
acquiring a data packet; the data packet comprises a target background picture;
and loading the target background picture in the data packet.
3. A mobile application development device, comprising:
the acquisition module is used for acquiring a data access object DAO code and a front-end hypertext markup language (HTML) code corresponding to the mobile application program to be developed; the data access object DAO code and the front-end hypertext markup language (HTML) code corresponding to the mobile application program are developed in a web project mode;
the generation module is used for generating a front-end resource package according to the data access object DAO code and the front-end hypertext markup language (HTML) code;
The deployment module is used for debugging the front-end hypertext markup language (HTML) code and the Data Access Object (DAO) code which are developed in a web project mode;
unpacking the front-end resource package based on a back-end mobile end application program in an operating system to obtain a target header file; the target header file comprises target information of each target file in the front-end resource package; the target file comprises the data access object DAO code or the front-end hypertext markup language (HTML) code; the target information comprises storage information of the target file; the back-end mobile terminal application program comprises a universal interface;
writing the target information in the target header file into a cache;
and reading the target file from the front-end resource package according to the target information in the target header file in the cache, and deploying the mobile application program and displaying the mobile application interface.
4. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the mobile application development method of claim 1 or 2 when the program is executed.
5. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the mobile application development method of claim 1 or 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211712725.4A CN116009831B (en) | 2022-12-29 | 2022-12-29 | Mobile application program development method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211712725.4A CN116009831B (en) | 2022-12-29 | 2022-12-29 | Mobile application program development method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116009831A CN116009831A (en) | 2023-04-25 |
CN116009831B true CN116009831B (en) | 2023-08-08 |
Family
ID=86035097
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211712725.4A Active CN116009831B (en) | 2022-12-29 | 2022-12-29 | Mobile application program development method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116009831B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8849985B1 (en) * | 2007-12-03 | 2014-09-30 | Appcelerator, Inc. | On-the-fly instrumentation of Web applications, Web-pages or Web-sites |
CN106990966A (en) * | 2017-03-31 | 2017-07-28 | 中国科学技术大学苏州研究院 | Mobile terminal cross-platform Development Framework and development approach based on front end frame |
CN112667441A (en) * | 2020-12-29 | 2021-04-16 | 平安普惠企业管理有限公司 | Service module scheduling method, system and storage medium based on fault-tolerant function |
CN114270306A (en) * | 2019-08-27 | 2022-04-01 | 西门子股份公司 | Application program development and deployment method, device and computer readable medium |
-
2022
- 2022-12-29 CN CN202211712725.4A patent/CN116009831B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8849985B1 (en) * | 2007-12-03 | 2014-09-30 | Appcelerator, Inc. | On-the-fly instrumentation of Web applications, Web-pages or Web-sites |
CN106990966A (en) * | 2017-03-31 | 2017-07-28 | 中国科学技术大学苏州研究院 | Mobile terminal cross-platform Development Framework and development approach based on front end frame |
CN114270306A (en) * | 2019-08-27 | 2022-04-01 | 西门子股份公司 | Application program development and deployment method, device and computer readable medium |
CN112667441A (en) * | 2020-12-29 | 2021-04-16 | 平安普惠企业管理有限公司 | Service module scheduling method, system and storage medium based on fault-tolerant function |
Also Published As
Publication number | Publication date |
---|---|
CN116009831A (en) | 2023-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111273898B (en) | Automatic construction method, system and storage medium for web front-end code | |
EP3342145B1 (en) | Deep linking to mobile application states through programmatic replay of user interface events | |
CN105100191B (en) | The method, apparatus and system of Java application installations are realized in a kind of cloud compiling | |
JP4857349B2 (en) | Method, system, and computer program for providing asynchronous portal pages within a portal system | |
CN110531962B (en) | Development processing method and device for applet and computer readable storage medium | |
US20110154305A1 (en) | System and method for remotely compiling multi-platform native applications for mobile devices | |
RU2459238C2 (en) | Managed execution environment for software application interfacing | |
CN111740948B (en) | Data packet issuing method, dynamic updating method, device, equipment and medium | |
CN107357607B (en) | The read method and device of file data | |
US20210271493A1 (en) | Remote Component Loader | |
CN108628626B (en) | Development environment building method, code updating method and device | |
CN108170430B (en) | Interface display method and system | |
CN111722885A (en) | Program running method and device and electronic equipment | |
CN114115904A (en) | Information processing method, information processing apparatus, server, and storage medium | |
CN111338666A (en) | Method, device, medium and electronic equipment for realizing application program upgrading | |
CN112000334A (en) | Page development method, device, server and storage medium | |
CN112154417B (en) | Sharing code libraries between stand-alone and Web-based versions of an application via an emulated network communication channel | |
CN117149301A (en) | MDF-based micro front end resource sharing method, system and storage medium | |
You et al. | A comparative study of cross-platform mobile application development | |
CN110780899A (en) | Application hot updating method and device, computer equipment and storage medium | |
CN110020370B (en) | Method and device for realizing animation in client application and framework of animation script | |
CN107092472B (en) | Dynamic publishing method and device | |
CN112988175A (en) | Cross-platform application installation package generation method, device, medium and electronic equipment | |
CN116009831B (en) | Mobile application program development method, device and equipment | |
CN108108203A (en) | The method, apparatus and system of installation process are downloaded for installation kit |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |