CN112631590B - Component library generation method, device, electronic equipment and computer readable medium - Google Patents

Component library generation method, device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN112631590B
CN112631590B CN202011636809.5A CN202011636809A CN112631590B CN 112631590 B CN112631590 B CN 112631590B CN 202011636809 A CN202011636809 A CN 202011636809A CN 112631590 B CN112631590 B CN 112631590B
Authority
CN
China
Prior art keywords
component library
business
target application
information
initial
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
Application number
CN202011636809.5A
Other languages
Chinese (zh)
Other versions
CN112631590A (en
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.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202011636809.5A priority Critical patent/CN112631590B/en
Publication of CN112631590A publication Critical patent/CN112631590A/en
Application granted granted Critical
Publication of CN112631590B publication Critical patent/CN112631590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

Embodiments of the present disclosure disclose a component library generation method, apparatus, electronic device, and computer-readable medium. One embodiment of the component library generation method comprises the following steps: determining whether the storage information of a service component library corresponding to the target application exists in the database; generating an initial business component library based on a predetermined base component library in response to determining that the stored information does not exist; generating a service component library corresponding to the target application by using the initial service component library; and storing the storage information of the business component library in the database. The embodiment can effectively generate the business component library of the target application. Further, a corresponding business component library is generated according to the base component library. The business component library generation method can improve the research and development efficiency and the maintenance of convenient applications, and reduce the maintenance cost of each application.

Description

Component library generation method, device, electronic equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a component library generating method, an apparatus, an electronic device, and a computer readable medium.
Background
At present, different applications have respective pages (UI) and interaction standards. Thus, different applications each correspond to a different component library. For component library development of target application, different developers may be required to develop components of different modules, and logic interaction may exist between components of each module, which is not beneficial to improvement of development efficiency and unification of UI interaction standards. In addition, component maintenance for the target application is costly due to the interaction of the component logic.
Disclosure of Invention
The disclosure is in part intended to introduce concepts in a simplified form that are further described below in the detailed description. The disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose component library generation methods, apparatuses, devices, and computer-readable media to solve the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a component library generation method, the method comprising: determining whether the storage information of a service component library corresponding to the target application exists in the database; generating an initial business component library based on a predetermined base component library in response to determining that the stored information does not exist; generating a service component library corresponding to the target application by using the initial service component library; and storing the storage information of the service component library in the database.
In a second aspect, some embodiments of the present disclosure provide a component library generating apparatus, the apparatus including: a determining unit configured to determine whether or not stored information of a service component library corresponding to the target application exists in the database; a first generation unit configured to generate an initial service component library based on a predetermined base component library in response to determining that the above-described stored information does not exist; a second generating unit configured to generate a service component library corresponding to the target application using the initial service component library; and a storage unit configured to store the storage information of the service component library in the database.
In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method as in any of the first aspects.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements a method as in any of the first aspects.
The various embodiments of the present disclosure described above have the following beneficial effects: the method for generating the component library can effectively generate the business component library of the target application. Further, the corresponding service component library is generated according to the base component library, so that the research and development efficiency and the maintenance of convenient application can be improved. In addition, the maintenance cost of the application is reduced. In particular, the inventors have found that the reasons for the low efficiency of service component library development, the insufficient ease of maintenance of the application, and the high maintenance costs are: different applications each correspond to a different library of components. For component library development of target applications, different developers may be required to develop components of different modules, and logic interaction may exist between components of each module, so that development efficiency is low, and maintenance cost is high due to the side face. Based on this, in the component library generating method of some embodiments of the present disclosure, service component libraries corresponding to different applications may be effectively packaged according to a predetermined base component library. Therefore, all teams and developers can uniformly use the business component library which corresponds to each application and is generated by the basic component library. Here, it should be noted that, compared with the prior art, for each packaging multiple service component libraries, the unified use of one service component library can improve the development efficiency and facilitate the maintenance of each application. Further, maintenance costs for each application are reduced.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a schematic illustration of one application scenario diagram of a component library generation method of some embodiments of the present disclosure;
FIG. 2 is a flow chart of some embodiments of a component library generation method according to the present disclosure;
3-4 are schematic diagrams of some application scenarios generated by component libraries according to some embodiments of the present disclosure;
FIG. 5 is a flow chart of further embodiments of a component library generation method according to the present disclosure;
FIG. 6 is a schematic structural diagram of some embodiments of a component library generating apparatus according to the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings. Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 is a schematic illustration of one application scenario diagram of a component library generation method of some embodiments of the present disclosure.
As shown in fig. 1, as an example, the electronic device 101 determines whether there is stored information 112 of a business component library 111 corresponding to the target application 110 in the database 102. As an example, the storage information 112 may be "service component library number: 03, application name: and a third application. The database 102 includes: stored information 107 of business component library 105 corresponding to target application 103, and stored information 108 of business component library 106 corresponding to target application 104. The stored information 107 may be "service component library number: 01, application name: a first application. The stored information 108 may be "service component library number: 02, application name: a second application. In response to determining that the stored information 112 is absent, an initial business component library 109 is generated from a predetermined base component library 113. Using the initial service component library 109, a service component library 111 corresponding to the target application 110 is generated. The stored information 112 of the business component library is stored in the database 102.
It should be noted that the component library generating method may be performed by the electronic device 101. The electronic device 101 may be hardware or software. When the electronic device is hardware, the electronic device may be implemented as a distributed cluster formed by a plurality of servers or terminal devices, or may be implemented as a single server or a single terminal device. When the electronic device 101 is embodied as software, it may be implemented as a plurality of software or software modules, for example, for providing distributed services, or as a single software or software module. The present invention is not particularly limited herein.
It should be understood that the number of electronic devices in fig. 1 is merely illustrative. There may be any number of electronic devices as desired for an implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of a component library generation method according to the present disclosure is shown. The component library generation method comprises the following steps:
step 201, determining whether the stored information of the service component library corresponding to the target application exists in the database.
In some embodiments, an execution body of the component library generation method (e.g., the electronic device 101 shown in fig. 1) may determine whether stored information of a service component library corresponding to a target application exists in a database using related instructions of a Command Line Interface (CLI). Wherein, the database stores the related information of the service component library corresponding to each application at present. The stored information may include, but is not limited to, at least one of: the number of the service component library (Id, identity document), the name of the application, the address of the service component library, the Node packet handler (NPM, node Package Manager). It should be noted that, each application has a service component library corresponding to it. Here, the components may be the result of abstract packaging of UI interactions, processing logic, and styles of similar structures. The component library may be a project structure that organizes the components to ultimately obtain a static resource or NPM package for the JavaScript (Js) corresponding script, cascading style sheet (CSS, cascading Style Sheets). The component library may contain one or more portal files, and the access party may introduce all or part of the components as desired. The static resource may be a FixedPage at the front end. The NPM package may be a JavaScript package management tool, which is a logo product in front-end modularization. It should be noted that, the existing codes can be multiplexed by the NPM download module, so that the working efficiency can be improved. In addition, the base component library may be a component library that does not involve business logic, contains only the UIs and interactions necessary for the component. The service component library may be a component library including part of service logic and conforming to the service UI standard.
It should be noted that, determining whether the target database has the stored information of the service component library corresponding to the target application may avoid the relevant developer from encapsulating the same service component library corresponding to the target application multiple times. Furthermore, the research and development efficiency of relevant research and development personnel can be improved, and the interface UI interaction standard is unified.
In some alternative implementations of some embodiments, the steps further include: and adding the components required by the business related to the target application into the basic component library. The service-required components related to the target application are components required by the service component library corresponding to the target application, and the basic component library does not comprise the service-required components related to the target application.
It should be noted that, for the service component library corresponding to the target application, because components required for the service specific to the target application are absent, the encapsulation of the service component library may not be completed only by the base component library. Further, the components required for the business related to the target application need to be added to the base component library.
In step 202, in response to determining that the stored information is not present, an initial business component library is generated based on the predetermined base component library.
In some embodiments, in response to determining that the stored information does not exist, the executing entity may generate an initial business component library from a predetermined base component library. The initial service component library can be used for generating a component framework of the service component library corresponding to each application. Subsequent business component developers can make modifications to the initial business component library to obtain the component library required by the business component developer. As an example, in response to determining that the stored information does not exist, the most frequently used component in the base component library is counted to obtain a component set. And then, generating related information such as NPM packages and example document information related to the component sets, and packaging the related information to obtain an initial service component library.
It is emphasized that in response to determining that the stored information described above does not exist, at least one initial business component library may be generated in bulk from a predetermined base component library.
In some alternative implementations of some embodiments, the steps further include: and determining theme configuration information related to the target application according to the theme configuration platform. The theme configuration platform is a platform for visualizing and editing the theme configuration information; and adding the theme configuration information into the initial service component library.
Wherein for customization of the theme configuration information, related variables are often used in the project to define attribute values in the theme configuration information, and the attribute values can be multiplexed under each framework. Each application maintains one or more sets of theme configuration information conforming to the application UI standard. Here, the user of the component library may specify a required theme style catalog through the related plug-in, and may also change specific theme configuration information in the related variables to implement style customization. As an example, the above-mentioned related variable may be a less variable. The related plug-in may be a babel-plug-in-import plug-in.
In addition, for dynamic switching theme information, CSS variables may be used to enable configuration of dynamic theme configuration information. The usual way is to modify the CSS variables in bulk in the component by Js setting dom style properties.
In some alternative implementations of some embodiments, the base component library is packaged with a Command Line Interface (CLI) to obtain the initial business component library in response to determining that the stored information is not present. The command line interface may correspond to a command line interface, which includes but is not limited to at least one of the following: the method comprises the steps of a service component library item initialization instruction, a pull existing service component library instruction, a component updating instruction, a component adding instruction, a debugging instruction, a packaging instruction, an NPM package sending instruction and an example information instruction.
Optionally, in response to determining that the stored information does not exist, encapsulating the base component library with a command line interface to obtain the initial service component library may include the steps of:
in response to determining that the stored information does not exist, determining initial business component logic information in the initial business component library by utilizing a command line interface based on the basic component logic information in the basic component library. Wherein the iterative updating of the initial business component logic information in the initial business component library is dependent on the base component logic information in the base component library.
And secondly, determining a basic component sample (demo) in the basic component library as a service component sample of the initial service component library by utilizing a command line interface.
And thirdly, determining basic component test information (text) of the basic component library as service component test information of the initial service component library by using a command line interface.
Fourth, the command line interface is utilized to determine the example document (site) of the basic component library as the example document of the initial business component library. Wherein, the above example document includes: and analyzing the attribute information of the component and the component annotation information.
As an example, as shown in fig. 3, first, in response to determining that the stored information does not exist, initial business component logic information 308 in the initial business component library 303 is determined using a command line interface 302 according to the base component logic information 304 in the base component library 301. Wherein the iterative updating of the initial business component logic information 308 in the initial business component library 303 depends on the base component logic information 304 in the base component library 301. The command line interface 302 is then used to determine the base component sample 305 in the base component library 301 as the initial business component sample 309 of the initial business component library 303. Further, the command line interface 302 is used to determine the basic component test information 306 of the basic component library 301 as the initial business component test information 310 of the initial business component library 303. Finally, the example document 307 of the base component library is determined as the example document 311 of the initial business component library 303 using the command line interface 302.
And 203, generating a service component library corresponding to the target application by using the initial service component library.
In some embodiments, the executing entity may use the initial service component library to generate a service component library corresponding to the target application in combination with the received logic information required by the target application.
In some alternative implementations of some embodiments, the steps further include:
and the first step is to package and debug the business component library corresponding to the target application.
And secondly, determining the debugged service component library corresponding to the target application as the service component library corresponding to the target application.
In some optional implementations of some embodiments, logic information related to the initial service component library is modified based on the service requirement information of the target application, so as to obtain the service component library corresponding to the target application. As an example, the service component library corresponding to the target application may be obtained through the service requirement information of the target application and the component logic information input by the service component technician.
And 204, storing the storage information of the business component library corresponding to the target application in the target database.
In some embodiments, the execution body may store the stored information of the service component library corresponding to the target application in the target database. The storing information of the service component library corresponding to the target application may include: the target application corresponds to the Id of the service component library, the name of the target application, the address of the target application corresponding to the service component library, and the Node package processor.
In some alternative implementations of some embodiments, the steps further include:
and the first step, displaying the business component library of each application corresponding to the database on a page.
And a second step of responding to the call request of the received user and acquiring the storage information of the selected service component library from the database according to the selected service component library.
As an example, as shown in fig. 4, the target application 404 is displayed on the target page 401. The applications shown in the target page 401 include: a first application 402, a second application 403, a target application 404. It should be noted that, the target user may obtain a component in the service components corresponding to the target application 404 by clicking the target application 404 in the target page 401.
As can be seen from the above embodiments, the method for generating a service component library of a target application according to the embodiments of the present disclosure can effectively generate a service component library of a target application. Further, the corresponding service component library is generated according to the base component library, so that the research and development efficiency and the maintenance of convenient application can be improved. In addition, the maintenance cost of the application is reduced. In particular, the inventors have found that the reasons for the low efficiency of service component library development, the insufficient ease of maintenance of the application, and the high maintenance costs are: different applications each correspond to a different library of components. For component library development of target applications, different developers may be required to develop components of different modules, and logic interaction may exist between components of each module, so that development efficiency is low, and maintenance cost is high due to the side face. Based on this, in the component library generating method of some embodiments of the present disclosure, service component libraries corresponding to different applications may be effectively packaged according to a predetermined base component library. Therefore, all teams and developers can uniformly use the business component library which corresponds to each application and is generated by the basic component library. Here, it should be noted that, compared with the prior art, for each packaging multiple service component libraries, the unified use of one service component library can improve the development efficiency and facilitate the maintenance of each application. Further, maintenance costs for each application are reduced.
With continued reference to FIG. 5, a flow 500 of further embodiments of a component library generation method according to the present disclosure is shown. The component library generation method comprises the following steps:
step 501, it is determined whether there is stored information of a service component library corresponding to the target application in the database.
In step 502, in response to determining that the stored information does not exist, an initial business component library is generated based on a predetermined base component library.
Step 503, generating the service component library corresponding to the target application by using the initial service component library.
And step 504, storing the storage information of the service component library in the database.
In some embodiments, the specific implementation of steps 501-504 and the technical effects thereof may refer to steps 201-204 in those embodiments corresponding to fig. 2, which are not described herein.
Step 505, determining at least one service component and/or at least one service component library required by the user according to the stored information of each service component library in the database.
In some embodiments, the executing body (for example, the electronic device 101 shown in fig. 1) may screen at least one service component and/or at least one service component library required by the user according to each service component library corresponding to the stored information of each service component library in the database.
And step 506, packaging the at least one service component and/or the at least one service component library to obtain a packaged component library.
In some embodiments, the executing body may encapsulate the at least one service component and/or the at least one service component library to obtain an encapsulated component library.
And step 507, adding the entry verification file into the packaging component library to obtain the packaging component library added with the entry verification file.
In some embodiments, the executing body may add the entry verification file to the package component library, to obtain a package component library to which the entry verification file is added. The entry verification file may be used to verify whether a service component that the target user wants to obtain exists in the package component library.
In some optional implementations of some embodiments, the service components in the package component library are obtained by:
and firstly, checking the service components and/or the applications corresponding to the service components by using the entry check file to obtain a check result. The verification result may be whether the package component library has an association relationship with the service component that the target user wants to obtain.
And a second step of acquiring the service components from the package component library based on the verification result. As an example, the service component is obtained from the package component library in response to the verification result satisfying a preset condition. The preset condition may be a condition that whether an association relationship exists between the service component and the package component library, which the target user wants to acquire.
As can be seen in fig. 5, flow 500 of the component library generation method in some embodiments corresponding to fig. 5 adds specific steps of packaging according to at least one business component and/or at least one business component library required by a user as compared to the description of some embodiments corresponding to fig. 2. Here, after obtaining the stored information of each service component library in the database, the user may individually package at least one service component and/or at least one service component library that are frequently used, so that the user may quickly and conveniently use at least one service component and/or at least one service component library that are required by the user.
With continued reference to fig. 6, as an implementation of the method described above for each of the above figures, the present disclosure provides some embodiments of a component library generating apparatus, which correspond to those described above for fig. 2, and which are particularly applicable in various electronic devices.
As shown in fig. 6, the component library generating apparatus 600 of some embodiments includes: a determination unit 601, a first generation unit 602, a second generation unit 603, and a storage unit 604. Wherein the determining unit 601 is configured to determine whether there is stored information of a service component library corresponding to the target application in the database. The first generation unit 602 is configured to generate an initial service component library based on a predetermined base component library in response to determining that the above-described stored information does not exist. The second generating unit 603 is configured to generate a service component library corresponding to the target application using the initial service component library. The storage unit 604 is configured to store the stored information of the service component library in the database.
In some alternative implementations of some embodiments, the apparatus 600 may further include: a display unit and an acquisition unit (not shown in the figure). The display unit is configured to display the business component libraries of the applications corresponding to the database on a page. The acquisition unit is configured to acquire the stored information of the selected service component library from the database according to the selected service component library in response to receiving a call request from a user.
In some alternative implementations of some embodiments, the apparatus 600 may further include: a determination unit, an encapsulation unit, and a file addition unit (not shown in the figure). Wherein the determining unit is configured to determine at least one service component and/or at least one service component library required by the user according to the storage information of each service component library in the database; the packaging unit is configured to package the at least one service component and/or the at least one service component library to obtain a package component library; the file adding unit is configured to add the entry check text to the package component library to obtain a package component library to which the entry check file is added.
In some optional implementations of some embodiments, the target business component in the package component library is obtained by: using the entry verification file to verify the service component and/or the application corresponding to the service component to obtain a verification result; and acquiring the service component from the package component library based on the verification result.
In some alternative implementations of some embodiments, the apparatus 600 may further include: a packing and debugging unit and a determination unit (not shown in the figure). The packing and debugging unit is configured to pack and debug the business component library corresponding to the target application; the determining unit is configured to determine the debugged service component library corresponding to the target application as the service component library corresponding to the target application.
In some alternative implementations of some embodiments, the apparatus 600 may further include: a main body information determining unit (not shown in the figure). Wherein the main body information determining unit is configured to determine theme configuration information related to the target application according to the theme configuration platform; the theme configuration platform is a platform for visualizing and editing the theme configuration information; and adding the theme configuration information into the initial service component library.
In some alternative implementations of some embodiments, the apparatus 600 may further include: a component adding unit (not shown in the figure). The component adding unit is configured to add components required by the business related to the target application to the basic component library; the service-required components related to the target application are components required by the service component library corresponding to the target application, and the basic component library does not comprise the service-required components related to the target application.
In some alternative implementations of some embodiments, the first generation unit 602 may be further configured to: and in response to determining that the stored information does not exist, encapsulating the basic component library by using a command line set to obtain the initial service component library.
In some alternative implementations of some embodiments, the first generation unit 602 may be further configured to: determining initial business component logic information in the initial business component library by using the command line interface based on the basic component logic information in the basic component library in response to determining that the stored information does not exist; wherein the iterative updating of the initial business component logic information in the initial business component library depends on the basic component logic information in the basic component library; determining a basic component sample in the basic component library as an initial service component sample of the initial service component library by using the command line interface; determining the basic component test information of the basic component library as the initial service component test information of the initial service component library by using the command line interface; determining the example document of the basic component library as the example document of the initial service component library by using the command line interface; wherein, the above example document includes: and analyzing the attribute information of the component and the component annotation information.
In some optional implementations of some embodiments, the second generating unit 603 may be further configured to: and modifying the initial business logic information of the initial business component library based on the business requirement information of the target application to obtain the business component library corresponding to the target application.
It will be appreciated that the elements described in the apparatus 600 correspond to the various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting benefits described above with respect to the method are equally applicable to the apparatus 600 and the units contained therein, and are not described in detail herein.
Referring now to fig. 7, a schematic diagram of an electronic device (e.g., the electronic device of fig. 1) 700 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 7 is only one example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 7, the electronic apparatus 700 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 701, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage device 707 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
In general, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 708 including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 shows an electronic device 700 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 7 may represent one device or a plurality of devices as needed.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via communications device 709, or from storage 708, or from ROM 702. The above-described functions defined in the methods of some embodiments of the present disclosure are performed when the computer program is executed by the processing means 701.
It should be noted that, in some embodiments of the present disclosure, the computer readable medium may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be embodied in the apparatus; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: determining whether the storage information of a service component library corresponding to the target application exists in the database; generating an initial business component library based on a predetermined base component library in response to determining that the stored information does not exist; generating a service component library corresponding to the target application by using the initial service component library; and storing the storage information of the service component library in the database.
Computer program code for carrying out operations for some embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor includes a determination unit, a first generation unit, a second generation unit, and a storage unit. The names of these units do not constitute a limitation on the unit itself in some cases, and the determining unit may also be described as "a unit that determines whether or not there is stored information of a business component library corresponding to the target application" in the database, for example.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
According to one or more embodiments of the present disclosure, there is provided a component library generation method including: determining whether the storage information of a service component library corresponding to the target application exists in the database; generating an initial business component library based on a predetermined base component library in response to determining that the stored information does not exist; generating a service component library corresponding to the target application by using the initial service component library; and storing the storage information of the service component library in the database.
According to one or more embodiments of the present disclosure, the above method further comprises: displaying business component libraries of each application corresponding to the database on a page; and responding to the received call request of the user, and acquiring the storage information of the selected service component library from the database according to the selected service component library.
According to one or more embodiments of the present disclosure, the above method further comprises: determining at least one business component and/or at least one business component library required by a user according to the storage information of each business component library in the database; packaging the at least one service component and/or the at least one service component library to obtain a packaged component library; and adding the entry verification text into the packaging component library to obtain the packaging component library added with the entry verification file.
According to one or more embodiments of the present disclosure, the service components in the package component library are obtained by: using the entry verification file to verify the service component and/or the application corresponding to the service component to obtain a verification result; and acquiring the service component from the package component library based on the verification result.
According to one or more embodiments of the present disclosure, after generating the service component library corresponding to the target application using the initial service component library, the method further includes: packaging and debugging a service component library corresponding to the target application; and determining the debugged service component library corresponding to the target application as the service component library corresponding to the target application.
In accordance with one or more embodiments of the present disclosure, after generating the initial business component library based on the predetermined base component library in response to determining that the stored information is absent, the method further comprises: determining theme configuration information related to the target application according to a theme configuration platform; the theme configuration platform is a platform for visualizing and editing the theme configuration information; and adding the theme configuration information into the initial service component library.
According to one or more embodiments of the present disclosure, after determining whether the stored information of the service component library corresponding to the target application exists in the database, the method further includes: adding the components required by the business related to the target application into the basic component library; the service-required components related to the target application are components required by the service component library corresponding to the target application, and the basic component library does not comprise the service-required components related to the target application.
According to one or more embodiments of the present disclosure, generating an initial business component library based on a predetermined base component library in response to determining that the stored information is absent, includes: and in response to determining that the stored information does not exist, encapsulating the basic component library by using a command line interface to obtain the initial service component library.
According to one or more embodiments of the present disclosure, in response to determining that the stored information does not exist, encapsulating the base component library with a command line interface to obtain the initial business component library, including: determining initial business component logic information in the initial business component library by using the command line interface based on the basic component logic information in the basic component library in response to determining that the stored information does not exist; wherein the iterative updating of the initial business component logic information in the initial business component library depends on the basic component logic information in the basic component library; determining a basic component sample in the basic component library as an initial service component sample of the initial service component library by using the command line interface; determining the basic component test information of the basic component library as the initial service component test information of the initial service component library by using the command line interface; determining the example document of the basic component library as the example document of the initial service component library by using the command line interface; wherein, the above example document includes: and analyzing the attribute information of the component and the component annotation information.
According to one or more embodiments of the present disclosure, the generating, using the initial service component library, a service component library corresponding to the target application includes: and modifying the initial business logic information of the initial business component library based on the business requirement information of the target application to obtain the business component library corresponding to the target application.
According to one or more embodiments of the present disclosure, there is provided a component library generating apparatus including: a determining unit configured to determine whether or not stored information of a service component library corresponding to the target application exists in the database; a first generation unit configured to generate an initial service component library based on a predetermined base component library in response to determining that the above-described stored information does not exist; a second generating unit configured to generate a service component library corresponding to the target application using the initial service component library; and a storage unit configured to store the storage information of the service component library in the database.
In accordance with one or more embodiments of the present disclosure, the apparatus may further include: a display unit and an acquisition unit (not shown in the figure). The display unit is configured to display the business component libraries of the applications corresponding to the database on a page. The acquisition unit is configured to acquire the stored information of the selected service component library from the database according to the selected service component library in response to receiving a call request from a user.
In accordance with one or more embodiments of the present disclosure, the apparatus may further include: a determination unit, an encapsulation unit, and a file addition unit (not shown in the figure). Wherein the determining unit is configured to determine at least one service component and/or at least one service component library required by the user according to the storage information of each service component library in the database; the packaging unit is configured to package the at least one service component and/or the at least one service component library to obtain a package component library; the file adding unit is configured to add the entry check text to the package component library to obtain a package component library to which the entry check file is added.
According to one or more embodiments of the present disclosure, the target business component in the package component library is obtained by: using the entry verification file to verify the service component and/or the application corresponding to the service component to obtain a verification result; and acquiring the service component from the package component library based on the verification result.
In accordance with one or more embodiments of the present disclosure, the apparatus may further include: a packing and debugging unit and a determination unit (not shown in the figure). The packing and debugging unit is configured to pack and debug the business component library corresponding to the target application; the determining unit is configured to determine the debugged service component library corresponding to the target application as the service component library corresponding to the target application.
In accordance with one or more embodiments of the present disclosure, the apparatus may further include: a main body information determining unit (not shown in the figure). Wherein the main body information determining unit is configured to determine theme configuration information related to the target application according to the theme configuration platform; the theme configuration platform is a platform for visualizing and editing the theme configuration information; and adding the theme configuration information into the initial service component library.
In accordance with one or more embodiments of the present disclosure, the apparatus may further include: a component adding unit (not shown in the figure). The component adding unit is configured to add components required by the business related to the target application to the basic component library; the service-required components related to the target application are components required by the service component library corresponding to the target application, and the basic component library does not comprise the service-required components related to the target application.
According to one or more embodiments of the present disclosure, the first generation unit may be further configured to: and in response to determining that the stored information does not exist, encapsulating the basic component library by using a command line set to obtain the initial service component library.
According to one or more embodiments of the present disclosure, the first generation unit may be further configured to: determining initial business component logic information in the initial business component library by using the command line interface based on the basic component logic information in the basic component library in response to determining that the stored information does not exist; wherein the iterative updating of the initial business component logic information in the initial business component library depends on the basic component logic information in the basic component library; determining a basic component sample in the basic component library as an initial service component sample of the initial service component library by using the command line interface; determining the basic component test information of the basic component library as the initial service component test information of the initial service component library by using the command line interface; determining the example document of the basic component library as the example document of the initial service component library by using the command line interface; wherein, the above example document includes: and analyzing the attribute information of the component and the component annotation information.
According to one or more embodiments of the present disclosure, the second generation unit may be further configured to: and modifying the initial business logic information of the initial business component library based on the business requirement information of the target application to obtain the business component library corresponding to the target application.
According to one or more embodiments of the present disclosure, there is provided an electronic device including: one or more processors; and a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the method as described in any of the embodiments above.
According to one or more embodiments of the present disclosure, there is provided a computer readable medium having stored thereon a computer program, wherein the program, when executed by a processor, implements a method as described in any of the embodiments above.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (12)

1. A component library generation method, comprising:
determining whether the storage information of a service component library corresponding to the target application exists in the database;
in response to determining that the stored information does not exist, encapsulating a predetermined basic component library by using a command line interface to obtain an initial service component library;
generating a service component library corresponding to the target application by using the initial service component library;
and storing the storage information of the service component library in the database.
2. The method of claim 1, wherein the method further comprises:
displaying business component libraries of all applications corresponding to the database on a page;
and responding to the received call request of the user, and acquiring the storage information of the selected service component library from the database according to the selected service component library.
3. The method of claim 1, wherein the method further comprises:
determining at least one business component and/or at least one business component library required by a user according to the storage information of each business component library in the database;
packaging the at least one service component and/or the at least one service component library to obtain a packaged component library;
And adding the entry verification file into the packaging component library to obtain the packaging component library added with the entry verification file.
4. A method according to claim 3, wherein business components in the library of package components are obtained by:
the business component and/or the application corresponding to the business component are checked by using the entry check file, so that a check result is obtained;
and acquiring the business component from the packaging component library based on the verification result.
5. The method of claim 1, wherein after the generating of the business component library corresponding to the target application using the initial business component library, the method further comprises:
packaging and debugging a service component library corresponding to the target application;
and determining the debugged service component library corresponding to the target application as the service component library corresponding to the target application.
6. The method of claim 1, wherein, in response to determining that the stored information is not present, after generating an initial business component library based on a predetermined base component library, the method further comprises:
determining theme configuration information related to the target application according to a theme configuration platform; the theme configuration platform is a platform for visualizing and editing the theme configuration information;
And adding the theme configuration information to the initial service component library.
7. The method of claim 1, wherein after said determining whether there is stored information for a business component library corresponding to a target application in a database, the method further comprises:
adding the components required by the business related to the target application to the basic component library; the service required components related to the target application are components required by a service component library corresponding to the target application, and the basic component library does not comprise the service required components related to the target application.
8. The method of claim 1, wherein said encapsulating the base component library with a command line interface in response to determining that the stored information is not present, results in the initial business component library, comprises:
determining initial business component logic information in the initial business component library using the command line interface based on the base component logic information in the base component library in response to determining that the stored information is not present; wherein the iterative updating of the initial business component logic information in the initial business component library depends on the base component logic information in the base component library;
Determining a basic component sample in the basic component library as an initial service component sample of the initial service component library by utilizing the command line interface;
determining the basic component test information of the basic component library as the initial service component test information of the initial service component library by utilizing the command line interface;
determining an example document of the base component library as an example document of the initial business component library using the command line interface; wherein the example document includes: and analyzing the attribute information of the component and the component annotation information.
9. The method of claim 1, wherein the generating, using the initial service component library, a service component library corresponding to the target application includes:
and modifying the initial business logic information of the initial business component library based on the business requirement information of the target application to obtain a business component library corresponding to the target application.
10. A component library generating apparatus comprising:
a determining unit configured to determine whether or not stored information of a service component library corresponding to the target application exists in the database;
the first generation unit is configured to respond to the fact that the storage information does not exist, and a predetermined basic component library is packaged by utilizing a command line interface to obtain an initial service component library;
A second generating unit configured to generate a service component library corresponding to the target application using the initial service component library;
and the storage unit is configured to store the storage information of the business component library in the database.
11. An electronic device, comprising:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-9.
12. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-9.
CN202011636809.5A 2020-12-31 2020-12-31 Component library generation method, device, electronic equipment and computer readable medium Active CN112631590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011636809.5A CN112631590B (en) 2020-12-31 2020-12-31 Component library generation method, device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011636809.5A CN112631590B (en) 2020-12-31 2020-12-31 Component library generation method, device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN112631590A CN112631590A (en) 2021-04-09
CN112631590B true CN112631590B (en) 2023-11-03

Family

ID=75289936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011636809.5A Active CN112631590B (en) 2020-12-31 2020-12-31 Component library generation method, device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN112631590B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110963A (en) * 2021-04-28 2021-07-13 北京京东拓先科技有限公司 Service processing method, service processing device, electronic equipment and readable storage medium
CN113778445A (en) * 2021-09-15 2021-12-10 树根互联股份有限公司 Cross-platform component generation method and device, electronic equipment and storage medium
CN113986248B (en) * 2021-11-03 2023-05-16 抖音视界有限公司 Code generation method, device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582422A (en) * 2018-11-30 2019-04-05 广州净松软件科技有限公司 Observation system construction method, device, equipment and storage medium component-based
CN110825374A (en) * 2019-11-04 2020-02-21 泰康保险集团股份有限公司 Page generation method and device based on component, electronic equipment and storage medium
CN110851114A (en) * 2019-10-24 2020-02-28 山东中创软件工程股份有限公司 Business system development method and device, electronic equipment and storage medium
CN110865805A (en) * 2019-11-13 2020-03-06 深圳前海环融联易信息科技服务有限公司 Method and device for realizing multifunctional image file assembly and computer equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10318254B2 (en) * 2017-01-27 2019-06-11 Oracle International Corporation Integrating application features into a platform interface based on application metadata
US20190324729A1 (en) * 2018-04-24 2019-10-24 Microsoft Technology Licensing, Llc Web Application Development Using a Web Component Framework

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582422A (en) * 2018-11-30 2019-04-05 广州净松软件科技有限公司 Observation system construction method, device, equipment and storage medium component-based
CN110851114A (en) * 2019-10-24 2020-02-28 山东中创软件工程股份有限公司 Business system development method and device, electronic equipment and storage medium
CN110825374A (en) * 2019-11-04 2020-02-21 泰康保险集团股份有限公司 Page generation method and device based on component, electronic equipment and storage medium
CN110865805A (en) * 2019-11-13 2020-03-06 深圳前海环融联易信息科技服务有限公司 Method and device for realizing multifunctional image file assembly and computer equipment

Also Published As

Publication number Publication date
CN112631590A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN111680253B (en) Page application data packet generation method and device, computer equipment and storage medium
CN110489323B (en) Visual RPC API debugging method, device, medium and equipment
CN111338623B (en) Method, device, medium and electronic equipment for developing user interface
CN111221572B (en) Method, device, medium and equipment for automatically adapting to running environment
CN110554876A (en) Method and device for compiling android project
CN110780874B (en) Method and device for generating information
CN111240684B (en) Cutting method and device of JS codes, medium and electronic equipment
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN113760736A (en) Test method, device and system
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN116860286A (en) Page dynamic update method, device, electronic equipment and computer readable medium
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN115982491A (en) Page updating method and device, electronic equipment and computer readable storage medium
CN113535565B (en) Interface use case generation method, device, equipment and medium
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN113468041A (en) Interface comparison test method and device
CN113704079A (en) Interface testing method and device based on Protobuf
CN111797009A (en) Method and device for detecting code compatibility and electronic equipment
CN112068814A (en) Method, device, system and medium for generating executable file
CN112445517B (en) Inlet file generation method, device, electronic equipment and computer readable medium
CN112579428A (en) Interface testing method and device, electronic equipment and storage medium
CN113342633B (en) Performance test method and device
CN112688863B (en) Gateway data processing method and device and electronic equipment
CN113760731A (en) Test method and device

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
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant