CN113900644A - Method and device for customizing mobile phone application in cross-platform mode, electronic equipment and storage medium - Google Patents

Method and device for customizing mobile phone application in cross-platform mode, electronic equipment and storage medium Download PDF

Info

Publication number
CN113900644A
CN113900644A CN202111028321.9A CN202111028321A CN113900644A CN 113900644 A CN113900644 A CN 113900644A CN 202111028321 A CN202111028321 A CN 202111028321A CN 113900644 A CN113900644 A CN 113900644A
Authority
CN
China
Prior art keywords
mobile phone
phone application
units
customized
connection event
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
CN202111028321.9A
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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202111028321.9A priority Critical patent/CN113900644A/en
Publication of CN113900644A publication Critical patent/CN113900644A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Landscapes

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

Abstract

The embodiment of the invention provides a method and a device for customizing a mobile phone application in a cross-platform manner, electronic equipment and a storage medium. The method comprises the following steps: determining a plurality of part units and a connection event list for connecting the part units according to functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit; acquiring the plurality of part units from a part unit library, and acquiring each configuration corresponding to each connection event in the connection event list from a configuration list; combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application; and converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter. The embodiment of the invention reduces the repeatability of development work, lowers the threshold of developing multi-platform mobile phone application and optimizes the development efficiency.

Description

Method and device for customizing mobile phone application in cross-platform mode, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a method and a device for customizing a mobile phone application in a cross-platform mode, electronic equipment and a storage medium.
Background
With the development of information technology, mobile phone applications have formed two major categories: the method comprises the following steps of mobile phone Application software (APP) and a WeChat applet, wherein the APP usually refers to mobile phone Application software such as iPhone and Android, the primary APP of the iPhone is developed by adopting Object-C or Swift language, and the primary APP of the Android is developed by adopting Java language. The WeChat applet is an application which can be used without downloading and installing and depends on a WeChat client platform, the dream that the application is 'reachable by a touch' is realized, and the application can be opened by scanning or searching by a user. WeChat applets are developed using a combination of WXML, WXSS syntax and Javascript language specific to WeChat.
Depending on the specialty and availability, heavy users may be inclined to use the mobile phone APP; with light use of the user, it is possible to select a WeChat applet that does not require downloading. Because the development languages commonly used by the APP and the WeChat applet are different, and meanwhile, different types of users and the same mobile phone application function may also be different, the two means: for the same mobile phone application field, multiple sets of mobile phone end applications may need to be developed to adapt to different users, standing at the user angle, which greatly enhances pertinence and usability, however, standing at the development angle, multiple sets of mobile phone applications need to be developed simultaneously, involving different programming languages and specific functions, which greatly increases development workload. Therefore, how to produce a plurality of sets of different codes quickly, efficiently, with good quality and quantity, becomes an important issue to be solved urgently in the field of mobile phone application and development.
Disclosure of Invention
Aiming at the defects in the prior art, the embodiment of the invention provides a method and a device for customizing a mobile phone application in a cross-platform mode, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present invention provides a method for customizing a mobile phone application across platforms, including:
determining a plurality of part units and a connection event list for connecting the part units according to functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit;
acquiring the plurality of part units from a part unit library, and acquiring each configuration corresponding to each connection event in the connection event list from a configuration list;
combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application;
and converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
The method, optionally, each of the part cells comprises: a business logic subunit and a page subunit;
writing a service logic subunit of the part unit through Javascript language;
compiling page sub-units of the part units through JSX scripts;
and associating the service logic subunit, the page subunit, the unique identifier UnitId and the part name of the part unit, and then storing the association into a part unit library.
As method, optionally, the configuration manifest list is generated according to the following steps:
determining a connection event corresponding to each configuration, and allocating a unique event identifier eventId to each connection event;
determining a source part unit identifier Sunit and a target part unit identifier Dunit of each connection event, and corresponding parameter lists and connection event description information;
compiling connection events corresponding to the configurations through scripts, wherein the connection events at least comprise source part unit identifiers Sunit, target part unit identifiers Dunit, parameter lists and connection event description information;
and associating the unique event identifier eventId, the source part unit identifier Sunit, the target part unit identifier Dunit and the connection event description information corresponding to each configuration to generate a configuration list.
The method, optionally, said combining said plurality of part units and said respective configurations to form a master pending handset application, comprises:
and determining the combination relation of the plurality of part units and each configuration according to the function of the mobile phone application to be customized, and combining the plurality of part units and each configuration based on the read-native compatible grammar to form the master mobile phone application to be customized.
The method optionally, said combining the plurality of part units and the respective configurations based on a read-native compatible syntax, comprising:
combining the plurality of part units and background logic functions corresponding to the configurations based on Javascript language;
combining the multiple part units and page functions corresponding to the configurations based on JSX scripts;
and connecting the background logic function and the page function based on the API corresponding to the read-native compatible grammar.
The method optionally, the converting, by a transcoder, the master to-be-customized handset application into handset applications suitable for respective platforms includes:
and converting the mother set to-be-manufactured mobile phone application into mobile phone application software which can be run by an IOS platform or an android platform by using a read-native compiling tool.
The method optionally, the converting, by a transcoder, the master to-be-customized handset application into handset applications suitable for respective platforms includes:
converting the JSX page in the mobile phone application to be customized of the master mask into a WXML file or a WXSS file corresponding to the WeChat applet;
and converting the API corresponding to the read-native compatible grammar in the master plate mobile phone application to be controlled into the API corresponding to the WeChat applet to form the mobile phone application which can be operated by the WeChat applet platform.
In a second aspect, an embodiment of the present invention provides an apparatus for customizing a mobile phone application across platforms, including:
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a plurality of part units and a connection event list for connecting the part units according to functions of mobile phone applications to be determined, and each part unit realizes a basic function unit;
the acquisition module is used for acquiring the plurality of part units from the part unit library and acquiring each configuration corresponding to each connection event in the connection event list from the configuration list;
the combination module is used for combining the plurality of part units and the configurations to form a master plate to-be-determined mobile phone application;
and the conversion module is used for converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
As in the above device, optionally, each of the part units comprises: a business logic subunit and a page subunit;
accordingly, the parts cell library is obtained by:
writing a service logic subunit of the part unit through Javascript language;
compiling page sub-units of the part units through JSX scripts;
and associating the service logic subunit, the page subunit, the unique identifier UnitId and the part name of the part unit, and then storing the association into a part unit library.
As with the apparatus above, optionally, the configuration list is generated according to the following steps:
determining a connection event corresponding to each configuration, and allocating a unique event identifier eventId to each connection event;
determining a source part unit identifier Sunit and a target part unit identifier Dunit of each connection event, and corresponding parameter lists and connection event description information;
compiling connection events corresponding to the configurations through scripts, wherein the connection events at least comprise source part unit identifiers Sunit, target part unit identifiers Dunit, parameter lists and connection event description information;
and associating the unique event identifier eventId, the source part unit identifier Sunit, the target part unit identifier Dunit and the connection event description information corresponding to each configuration to generate a configuration list.
As with the apparatus described above, optionally, the combination module is specifically configured to:
and determining the combination relation of the plurality of part units and each configuration according to the function of the mobile phone application to be customized, and combining the plurality of part units and each configuration based on the read-native compatible grammar to form the master mobile phone application to be customized.
As with the apparatus described above, optionally, the combination module is specifically configured to:
combining the plurality of part units and background logic functions corresponding to the configurations based on Javascript language;
combining the multiple part units and page functions corresponding to the configurations based on JSX scripts;
and connecting the background logic function and the page function based on the API corresponding to the read-native compatible grammar.
As with the apparatus described above, optionally, the conversion module is specifically configured to:
and converting the mother set to-be-manufactured mobile phone application into mobile phone application software which can be run by an IOS platform or an android platform by using a read-native compiling tool.
As with the apparatus described above, optionally, the conversion module is specifically configured to:
converting the JSX page in the mobile phone application to be customized of the master mask into a WXML file or a WXSS file corresponding to the WeChat applet;
and converting the API corresponding to the read-native compatible grammar in the master plate mobile phone application to be controlled into the API corresponding to the WeChat applet to form the mobile phone application which can be operated by the WeChat applet platform.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
the processor and the memory are communicated with each other through a bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform a method comprising: determining a plurality of part units and a connection event list for connecting the part units according to functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit; acquiring the plurality of part units from a part unit library, and acquiring each configuration corresponding to each connection event in the connection event list from a configuration list; combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application; and converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
In a fourth aspect, an embodiment of the present invention provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following method: determining a plurality of part units and a connection event list for connecting the part units according to functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit; acquiring the plurality of part units from a part unit library, and acquiring each configuration corresponding to each connection event in the connection event list from a configuration list; combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application; and converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
The method for customizing the mobile phone application in the cross-platform mode provided by the embodiment of the invention comprises the steps of determining a plurality of part units and a connection event list for connecting the part units according to the functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit; acquiring the plurality of part units from a part unit library, and acquiring each configuration corresponding to each connection event in the connection event list from a configuration list; combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application; the mother set mobile phone application to be customized is converted into the mobile phone application suitable for each platform through a code converter, the bottleneck of constructing a plurality of sets of heterogeneous applications in the prior art is effectively solved, compared with the manual writing of a set of mobile phone applications with similar functions in android, IOS and WeChat small program platforms respectively, the embodiment of the invention reduces the repeatability of development work and the threshold of developing multi-platform mobile phone applications through the code converter, by customizing the function configuration list and customizing the flexibly constructed master mobile phone application, the mobile phone application with different functions and pertinence and suitable for users with different levels can be constructed rapidly, and by continuously enriching basic part units and continuously improving a part unit library, the reusability of codes in the process of constructing different mobile phone applications can be improved, so that the optimization development efficiency is realized, and the application maturity is enhanced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for customizing a mobile phone application across platforms according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for customizing a mobile phone network management application across platforms according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for customizing a mobile phone application across platforms according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a method for customizing a mobile phone application across platforms according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step S11, determining a plurality of part units and a connection event list for connecting the part units according to the functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit;
specifically, when a certain mobile phone application needs to be customized, all functions of the mobile phone application are determined according to product requirements, then the mobile phone application is disassembled into minimum basic function units according to the functions of the mobile phone application, each basic function unit only realizes one application function, and a part unit corresponding to each basic function unit, wherein the part unit is a code segment or a code product which has already realized the corresponding basic function, and then a connection event list for connecting each part unit, such as a jump event of two part units, is determined according to the mobile phone application function.
Step S12, obtaining the plurality of part units from a part unit library, and obtaining each configuration corresponding to each connection event in the connection event list from a configuration list;
specifically, each part function can be realized in advance by using a uniform language in the part unit library, and it should be noted that, in the software level, one part unit is disassembled into a back-end business logic subunit and a front-end page subunit, and the two subunits are usually realized by different languages. For example, in practical applications, the business logic subunit at the back end can be written in Javascript language, and the page subunit at the front end can be written in JSX script. It is worth mentioning that: each part unit has a unique identification (UnitId) by which a part unit can be uniquely specified.
And associating the service logic subunit, the page subunit, the unique identifier UnitId and the part name of the part unit, storing the association into a part unit library, wherein the part unit library comprises all the part units, and conveniently inquiring the specific implementation code of the part unit library by indexing the UnitId and the part name of the part unit.
In practical application, after obtaining the application function of the mobile phone, writing part units according to the basic function units disassembled according to the function, and storing the part units into a part unit library corresponding to the application, or writing each basic function unit of each application into part units and storing the part units into a more comprehensive part unit library to form a part unit knowledge library. In practical application, the part units of the part unit library can be grouped according to the functional similarity, so that the use and comparison learning of developers are facilitated.
With the part cell library, the developer can retrieve all of the part cells to use from the part cell library based on the part name or UnitId.
After all the part units are obtained, it is also necessary to obtain each configuration corresponding to each connection event in each connection event list from the configuration list. The configuration list can be understood as a custom configuration list library of the mobile phone application to be customized, and is mainly used for combining and selecting the part units. The configuration manifest list may contain the following information: listing all functions covered in the mobile phone application to be defined, namely listing UnitId of all part units forming the application and connection event information for connecting all the part units, thereby realizing the selection of functional layers. A plurality of part units are combined into a large part, and the presentation effect is a large combined page, so that the combination of the functional layers is realized.
S13, combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application;
specifically, after all the part units and the configurations of the mobile phone application to be customized are obtained, the functions of the mobile phone application are not realized, only a lump of sand is scattered, and all the part units and the configurations need to be combined to form the mobile phone application to be customized in an initial state, which is marked as the mobile phone application to be customized of the master mask, wherein the mobile phone application to be customized of the master mask comprises all the function units (part units) and all pages, service logic and skip logic among the pages, which are contained in the mobile phone application. The application of the mother set to-be-customized mobile phone is platform-independent, and the mother set cannot be directly operated on a specific mobile phone.
And step S14, converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
Specifically, inputting the master to-be-customized mobile phone application into a code converter can yield a final application that can run in an IOS, android, WeChat applet. It should be noted that the code converter controls the platform on which the application can run, and a plurality of final applications obtained through the same motherboard have similar functions, and only differ from the operable platform. Therefore, by the method of controlling the master plate and then controlling the code converter, a series of mobile phone applications with different functions and different operating platforms can be finally obtained, and the repeatability of development work and the threshold of developing multi-platform mobile phone applications are reduced.
Taking development of mobile phone network management application as an example, fig. 2 is a schematic flow chart of a method for customizing mobile phone network management application across platforms according to an embodiment of the present invention, as shown in fig. 2, a plurality of part units corresponding to functions of mobile phone network management application, a page subunit and a service logic subunit of each part unit are first found from a part unit library, and then a corresponding configuration list is selected from a configuration list, wherein the part units and the configuration list can be directly used if existing in an original part unit library or a configuration list, and if not, the part units and the configuration list are realized through codes and then stored in the corresponding library according to a corresponding format. Then, the obtained part units and configuration lists can be combined in a user-defined manner to adapt to different user requirements, for example, 3 kinds of master network management applications are generated, the master network management application 1, the master network management application 2 and the master network management application 3 are generated, and then the generated parts can be converted into 9 different kinds of network management applications of 3 platforms through a code converter, wherein the android platform comprises: android application 1, 2 and 3, the IOS platform includes: IOS network management application 1, IOS network management application 2 and IOS network management application 3, the wechat small program platform includes: the development efficiency is improved by the WeChat small program version network management application 1, the WeChat small program version network management application 2 and the WeChat small program version network management application 3.
The method for customizing the mobile phone application in the cross-platform mode provided by the embodiment of the invention comprises the steps of determining a plurality of part units and a connection event list for connecting the part units according to the functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit; acquiring the plurality of part units from a part unit library, and acquiring each configuration corresponding to the connection event list from a configuration list; combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application; the mother set mobile phone application to be customized is converted into the mobile phone application suitable for each platform through a code converter, the bottleneck of constructing a plurality of sets of heterogeneous applications in the prior art is effectively solved, compared with the manual writing of a set of mobile phone applications with similar functions in android, IOS and WeChat small program platforms respectively, the embodiment of the invention reduces the repeatability of development work and the threshold of developing multi-platform mobile phone applications through the code converter, by customizing the function configuration list and customizing the flexibly constructed master mobile phone application, the mobile phone application with different functions and pertinence and suitable for users with different levels can be constructed rapidly, and by continuously enriching basic part units and continuously improving a part unit library, the reusability of codes in the process of constructing different mobile phone applications can be improved, so that the optimization development efficiency is realized, and the application maturity is enhanced.
On the basis of the foregoing embodiments, further, the configuration list is generated according to the following steps:
determining a connection event corresponding to each configuration, and allocating a unique event identifier eventId to each connection event;
determining a source part unit identifier Sunit and a target part unit identifier Dunit of each connection event, and corresponding parameter lists and connection event description information;
compiling the connection event corresponding to each configuration through a script, wherein the connection event at least comprises a source part unit identifier Sunit, a target part unit identifier Dunit, a parameter list and connection event description information;
and associating the unique event identifier eventId, the source part unit identifier Sunit, the target part unit identifier Dunit and the connection event description information corresponding to each configuration to generate a configuration list.
Specifically, firstly, determining a connection event corresponding to each configuration corresponding to each part unit connected in a mobile phone application to be customized, assigning a unique event identifier eventId to each connection event, then determining a source part unit identifier Sunit, a target part unit identifier Dunit, and a parameter list and a connection event function which need to be transmitted by the source part unit of each connection event, converting the connection event function into connection incident description information, and implementing the connection event through a script language, wherein the script language is not limited, the implemented script code at least comprises the source part unit identifier Sunit, the target part unit identifier Dunit, the parameter list and the connection event description information, associating the unique event identifier Sunit, the source part unit identifier Sunit, the target part unit identifier Dunit and the connection event description information (or the connection event function) corresponding to each configuration, a configuration manifest list is generated.
In practical application, the configuration list can be made into an interface API form, so that corresponding connection events can be realized only by inputting the source part unit identifier Sunit, the target part unit identifier Dunit and the parameter list and calling the API.
For example, the connection event is a jump event, and the function implementation process is as follows: when a button is present in a part unit, clicking may trigger a jump event to jump to another part unit. The jump event is also implemented in the configuration manifest list, and a jump event may include the following elements:
a unique event ID identification, identified by eventId;
a source part unit: refers to from which part unit to jump, and is marked with SUnit;
a target part unit: refers to which part cell to jump to, identified by DUnit;
list of parameters: the parameter is used for indicating the form of the parameter which needs to be transmitted by the source part unit to the target part unit;
binding the button: refers to which event of the source part unit the jump event will bind to;
jump logic: this section describes business rules for jumping to different target part units based on different conditions, and the logic may be implemented in javascript or other similar scripting languages.
One possible configuration list code segment is as follows:
Figure BDA0003244346810000101
Figure BDA0003244346810000111
the method for customizing the mobile phone application in the cross-platform manner, provided by the embodiment of the invention, is based on the idea of dividing and treating, the mobile phone application function is divided into a plurality of minimum function units, namely part units, the plurality of part units are spliced and combined to form a mother mobile phone application which is independent of the platform by connecting an event list, the mother mobile phone application is translated into the mobile phone application which can be executed in android, IOS and WeChat small programs by using a code converter, and the efficiency of developing the mobile phone application in the cross-platform manner is improved.
On the basis of the foregoing embodiments, further, the combining the plurality of part units and the respective configurations to form a master to-be-customized mobile phone application includes:
and determining the combination relation of the plurality of part units and each configuration according to the function of the mobile phone application to be customized, and combining the plurality of part units and each configuration based on the read-native compatible grammar to form the master mobile phone application to be customized.
Specifically, a code conforming to the read-native framework syntax can be used for describing the master mobile phone application, the page layout and the background logic are determined according to the functions of the mobile phone application to be customized, and page functions corresponding to various configurations corresponding to a plurality of part units and a connection event list are combined based on a JSX script and the page layout, wherein the JSX script comprises an HTML language and a CSS language. Combining background logic functions corresponding to various configurations corresponding to the multiple part units and the connection event list based on Javascript language; and connecting the background logic function and the page function based on the API corresponding to the read-native, wherein the code at the moment can also run on a mobile phone system. It is worth noting that the master controls the functions of the mobile phone application, different self-defined functions are connected with the event list, and different master applications can be generated, so that different mobile phone applications with the same function can be generated.
When the mobile phone application needs to be converted into the mobile phone application of the IOS or android system, the master mobile phone application to be specified can be converted into mobile phone application software which can be run by the IOS platform or the android platform by using a React-native compiling tool.
When the original edition to-be-customized mobile phone application needs to be converted into a WeChat applet, converting the JSX page in the original edition to-be-customized mobile phone application into a WXML file or a WXSS file corresponding to the WeChat applet; the method comprises the steps of converting an HTML file into a WXML file, converting a CSS file into a WXSS file, converting an API corresponding to a read-native compatible grammar in the master mobile phone application to be customized into an API corresponding to a WeChat applet, and forming the mobile phone application which can be run by the WeChat applet platform.
In practical application, the same inventive concept can be utilized to quickly generate software with customizable functions and capable of being applied to a PC.
Based on the same inventive concept, the embodiment of the present invention further provides a device for customizing a mobile phone application across platforms, including: a determination module 31, an acquisition module 32, a combination module 33 and a conversion module 34, wherein:
the determining module 31 is configured to determine a plurality of part units and a connection event list for connecting the part units according to a function of a to-be-determined mobile phone application, where each part unit implements a basic function unit; the obtaining module 32 is configured to obtain the plurality of part units from a part unit library, and obtain each configuration corresponding to each connection event in the connection event list from a configuration list; the combination module 33 is used for combining the plurality of part units and the configurations to form a master to-be-customized mobile phone application; the conversion module 34 is used for converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
As in the above device, optionally, each of the part units comprises: a business logic subunit and a page subunit;
accordingly, the parts cell library is obtained by:
writing a service logic subunit of the part unit through Javascript language;
compiling page sub-units of the part units through JSX scripts;
and associating the service logic subunit, the page subunit, the unique identifier UnitId and the part name of the part unit, and then storing the association into a part unit library.
As with the apparatus above, optionally, the configuration list is generated according to the following steps:
determining a connection event corresponding to each configuration, and allocating a unique event identifier eventId to each connection event;
determining a source part unit identifier Sunit and a target part unit identifier Dunit of each connection event, and corresponding parameter lists and connection event description information;
compiling connection events corresponding to the configurations through scripts, wherein the connection events at least comprise source part unit identifiers Sunit, target part unit identifiers Dunit, parameter lists and connection event description information;
and associating the unique event identifier eventId, the source part unit identifier Sunit, the target part unit identifier Dunit and the connection event description information corresponding to each configuration to generate a configuration list.
As with the above apparatus, optionally, the combining module 33 is specifically configured to:
and determining the combination relation of the plurality of part units and each configuration according to the function of the mobile phone application to be customized, and combining the plurality of part units and each configuration based on the read-native compatible grammar to form the master mobile phone application to be customized.
As with the above apparatus, optionally, the combining module 33 is specifically configured to:
combining the plurality of part units and background logic functions corresponding to the configurations based on Javascript language;
combining the multiple part units and page functions corresponding to the configurations based on JSX scripts;
and connecting the background logic function and the page function based on the API corresponding to the read-native compatible grammar.
As with the above apparatus, optionally, the conversion module 34 is specifically configured to:
and converting the mother set to-be-manufactured mobile phone application into mobile phone application software which can be run by an IOS platform or an android platform by using a read-native compiling tool.
As with the above apparatus, optionally, the conversion module 34 is specifically configured to:
converting the JSX page in the mobile phone application to be customized of the master mask into a WXML file or a WXSS file corresponding to the WeChat applet;
and converting the API corresponding to the read-native compatible grammar in the master plate mobile phone application to be controlled into the API corresponding to the WeChat applet to form the mobile phone application which can be operated by the WeChat applet platform.
The apparatus provided in the embodiment of the present invention is configured to implement the method, and its functions specifically refer to the method embodiment, which is not described herein again.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the electronic device includes: a processor (processor)41, a memory (memory)42, and a bus 43;
wherein, the processor 41 and the memory 42 complete the communication with each other through the bus 43;
processor 41 is configured to call program instructions in memory 42 to perform the methods provided by the above-described method embodiments, including, for example: determining a plurality of part units and a connection event list for connecting the part units according to functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit; acquiring the plurality of part units from a part unit library, and acquiring each configuration corresponding to each connection event in the connection event list from a configuration list; combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application; and converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
An embodiment of the present invention discloses a computer program product, which includes a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer can execute the methods provided by the above method embodiments, for example, the method includes: determining a plurality of part units and a connection event list for connecting the part units according to functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit; acquiring the plurality of part units from a part unit library, and acquiring each configuration corresponding to each connection event in the connection event list from a configuration list; combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application; and converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
Embodiments of the present invention provide a non-transitory computer-readable storage medium, which stores computer instructions, where the computer instructions cause the computer to perform the methods provided by the above method embodiments, for example, the methods include: determining a plurality of part units and a connection event list for connecting the part units according to functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit; acquiring the plurality of part units from a part unit library, and acquiring each configuration corresponding to each connection event in the connection event list from a configuration list; combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application; and converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatuses and the like are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (16)

1. A method for customizing a mobile phone application in a cross-platform manner is characterized by comprising the following steps:
determining a plurality of part units and a connection event list for connecting the part units according to functions of the mobile phone application to be customized, wherein each part unit realizes a basic function unit;
acquiring the plurality of part units from a part unit library, and acquiring each configuration corresponding to each connection event in the connection event list from a configuration list;
combining the plurality of part units and the configurations to form a master plate to-be-customized mobile phone application;
and converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
2. The method of claim 1, wherein each of the part units comprises: a business logic subunit and a page subunit;
writing a service logic subunit of the part unit through Javascript language;
compiling page sub-units of the part units through JSX scripts;
and associating the service logic subunit, the page subunit, the unique identifier UnitId and the part name of the part unit, and then storing the association into a part unit library.
3. The method of claim 2, wherein the configuration manifest list is generated according to the steps of:
determining a connection event corresponding to each configuration, and allocating a unique event identifier eventId to each connection event;
determining a source part unit identifier Sunit and a target part unit identifier Dunit of each connection event, and corresponding parameter lists and connection event description information;
compiling connection events corresponding to the configurations through scripts, wherein the connection events at least comprise source part unit identifiers Sunit, target part unit identifiers Dunit, parameter lists and connection event description information;
and associating the unique event identifier eventId, the source part unit identifier Sunit, the target part unit identifier Dunit and the connection event description information corresponding to each configuration to generate a configuration list.
4. The method of claim 3, wherein said combining said plurality of part units and said respective configurations to form a master to-be-customized handset application comprises:
and determining the combination relation between the plurality of part units and each configuration according to the function of the mobile phone application to be customized, and combining the plurality of part units and each configuration based on the read-native compatible grammar to form the master mobile phone application to be customized.
5. The method of claim 4, wherein said combining the plurality of part units and the respective configurations based on a React-native compatible grammar comprises:
combining the plurality of part units and background logic functions corresponding to the configurations based on Javascript language;
combining the multiple part units and page functions corresponding to the configurations based on JSX scripts;
and connecting the background logic function and the page function based on the API corresponding to the read-native compatible grammar.
6. The method of claim 4, wherein the transcoding the master customized handset application into a handset application suitable for a respective platform comprises:
and converting the mother set to-be-manufactured mobile phone application into mobile phone application software which can be run by an IOS platform or an android platform by using a read-native compiling tool.
7. The method of claim 5, wherein the transcoding the master customized handset application into a handset application suitable for a respective platform comprises:
converting the JSX page in the mobile phone application to be customized of the master mask into a WXML file or a WXSS file corresponding to the WeChat applet;
and converting the API corresponding to the read-native compatible grammar in the master plate mobile phone application to be controlled into the API corresponding to the WeChat applet to form the mobile phone application which can be operated by the WeChat applet platform.
8. An apparatus for customizing a mobile phone application across platforms, comprising:
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a plurality of part units and a connection event list for connecting the part units according to functions of mobile phone applications to be determined, and each part unit realizes a basic function unit;
the acquisition module is used for acquiring the plurality of part units from the part unit library and acquiring each configuration corresponding to each connection event in the connection events from a configuration list;
the combination module is used for combining the plurality of part units and the configurations to form a master plate to-be-determined mobile phone application;
and the conversion module is used for converting the master mobile phone application to be customized into mobile phone applications suitable for each platform through a code converter.
9. The apparatus of claim 8, wherein each of the part units comprises: a business logic subunit and a page subunit;
accordingly, the parts cell library is obtained by:
writing a service logic subunit of the part unit through Javascript language;
compiling page sub-units of the part units through JSX scripts;
and associating the service logic subunit, the page subunit, the unique identifier UnitId and the part name of the part unit, and then storing the association into a part unit library.
10. The apparatus of claim 9, wherein the list of configuration manifests is generated according to the steps of:
determining a connection event corresponding to each configuration, and allocating a unique event identifier eventId to each connection event;
determining a source part unit identifier Sunit and a target part unit identifier Dunit of each connection event, and corresponding parameter lists and connection event description information;
compiling connection events corresponding to the configurations through scripts, wherein the connection events at least comprise source part unit identifiers Sunit, target part unit identifiers Dunit, parameter lists and connection event description information;
and associating the unique event identifier eventId, the source part unit identifier Sunit, the target part unit identifier Dunit and the connection event description information corresponding to each configuration to generate a configuration list.
11. The apparatus of claim 10, wherein the combining module is specifically configured to:
and determining the combination relation of the plurality of part units and each configuration according to the function of the mobile phone application to be customized, and combining the plurality of part units and each configuration based on the read-native compatible grammar to form the master mobile phone application to be customized.
12. The apparatus of claim 11, wherein the combining module is specifically configured to:
combining the plurality of part units and background logic functions corresponding to the configurations based on Javascript language;
combining the multiple part units and page functions corresponding to the configurations based on JSX scripts;
and connecting the background logic function and the page function based on the API corresponding to the read-native compatible grammar.
13. The apparatus of claim 11, wherein the conversion module is specifically configured to:
and converting the mother set to-be-manufactured mobile phone application into mobile phone application software which can be run by an IOS platform or an android platform by using a read-native compiling tool.
14. The apparatus of claim 12, wherein the conversion module is specifically configured to:
converting the JSX page in the mobile phone application to be customized of the master mask into a WXML file or a WXSS file corresponding to the WeChat applet;
and converting the API corresponding to the read-native compatible grammar in the master plate mobile phone application to be controlled into the API corresponding to the WeChat applet to form the mobile phone application which can be operated by the WeChat applet platform.
15. An electronic device, comprising:
the processor and the memory are communicated with each other through a bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 7.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202111028321.9A 2021-09-02 2021-09-02 Method and device for customizing mobile phone application in cross-platform mode, electronic equipment and storage medium Pending CN113900644A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111028321.9A CN113900644A (en) 2021-09-02 2021-09-02 Method and device for customizing mobile phone application in cross-platform mode, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111028321.9A CN113900644A (en) 2021-09-02 2021-09-02 Method and device for customizing mobile phone application in cross-platform mode, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113900644A true CN113900644A (en) 2022-01-07

Family

ID=79188508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111028321.9A Pending CN113900644A (en) 2021-09-02 2021-09-02 Method and device for customizing mobile phone application in cross-platform mode, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113900644A (en)

Similar Documents

Publication Publication Date Title
CN110928529B (en) Method and system for assisting operator development
CN108829378B (en) Application software development method and device and electronic equipment
CN101930400B (en) SDK (Software Development Kit) automatic test system and method
US9158510B2 (en) System and computer program product for creating a telecommunications application
CN106547527B (en) JavaScript file construction method and device
CN106557470B (en) Data extraction method and device
CN111459539B (en) Continuous integration pipeline operation method and device based on mirror layering
CN110941467A (en) Data processing method, device and system
CN111142884B (en) Version deployment method and device of applet, electronic equipment and storage medium
US11327727B2 (en) Systems and methods for integrating modules into a software application
CN110727429B (en) Front-end page generation method, device and equipment
US20200210829A1 (en) Network off-line model processing method, artificial intelligence processing device and related products
US20210182174A1 (en) System and method for application transformation to cloud based on semi-automated workflow
CN114297056A (en) Automatic testing method and system
CN111399840A (en) Module development method and device
CN111506314A (en) Project development method, device, server and medium
US20220300262A1 (en) Method for constructing, running and implementing cross-platform application, terminal, server and system
CN111158797A (en) Method, system and engine device for operating artificial intelligence application
CN113900644A (en) Method and device for customizing mobile phone application in cross-platform mode, electronic equipment and storage medium
CN113360156A (en) IOS compiling method and related equipment
CN114253441B (en) Method and device for enabling target function, storage medium and electronic device
CN112632113B (en) Operator management method and operator management system
CN113885844A (en) Business service arranging method and related device
CN110990137B (en) Application program function module scheduling method, scheduling information processing method and device
CN112612474A (en) Product transplanting method and device, storage medium and electronic equipment

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