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

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

Info

Publication number
CN112631590A
CN112631590A CN202011636809.5A CN202011636809A CN112631590A CN 112631590 A CN112631590 A CN 112631590A CN 202011636809 A CN202011636809 A CN 202011636809A CN 112631590 A CN112631590 A CN 112631590A
Authority
CN
China
Prior art keywords
component library
service
service component
information
target application
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.)
Granted
Application number
CN202011636809.5A
Other languages
Chinese (zh)
Other versions
CN112631590B (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology 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

Images

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

Landscapes

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

Abstract

The embodiment of the disclosure discloses a component library generation method, a component library generation device, electronic equipment and a computer readable medium. The specific implementation mode of the component library generation method comprises the following steps: determining whether the database has storage information of a business component library corresponding to the target application; in response to determining that the stored information does not exist, generating an initial business component library based on a predetermined base 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 business component library in the database. The implementation method can effectively generate the business component library of the target application. Further, a corresponding business component library is generated according to the basic component library. The method for generating the service component library can improve the research and development efficiency, facilitate the maintenance of the application and reduce the maintenance cost of each application.

Description

Component library generation method and device, electronic equipment and computer readable medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a component library generation method, a component library generation device, electronic equipment and a computer readable medium.
Background
Currently, different applications have respective page (UI) and interaction standards. Thus, different applications correspond to different component libraries. For component library development of target application, different developers may be required to develop components of different modules, and logical interaction may exist between components of each module, which is not favorable for improvement of research and 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
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary 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 a component library generation method, apparatus, device and computer readable medium 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, including: determining whether the database has storage information of a business component library corresponding to the target application; in response to determining that the storage information does not exist, generating an initial service component library based on a predetermined basic 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.
In a second aspect, some embodiments of the present disclosure provide an apparatus for generating a component library, the apparatus comprising: the determining unit is configured to determine whether the storage information of the business component library corresponding to the target application exists in the database; a first generating unit configured to generate an initial service component library based on a predetermined basic component library in response to a determination that the storage information does not exist; a second generating unit configured to generate a service component library corresponding to the target application by using the initial service component library; and the storage unit is 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 a method as in any one of the first aspects.
In a fourth aspect, some embodiments of the 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 one of the first aspect.
The various embodiments of the present disclosure in the foregoing embodiments have the following beneficial effects: the method for generating the component library can effectively generate the service component library of the target application. Furthermore, the corresponding business component library is generated according to the basic component library, so that the research and development efficiency and the convenient application maintenance can be improved. In addition, the maintenance cost of the application is reduced. Specifically, the inventors found that the reasons for the low efficiency of developing the service component library, the inconvenient maintenance of the application, and the high maintenance cost are as follows: different applications each correspond to a different component library. For component library development of a target application, different developers may be required to develop components of different modules, and logical interaction may exist between components of the modules, so that the research and development efficiency is low, and the maintenance cost is high due to the side face. Based on this, in the component library generation method according to some embodiments of the present disclosure, the service component libraries corresponding to different applications may be effectively encapsulated according to the predetermined basic 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 that a plurality of service component libraries are respectively packaged by related technicians, the unified use of one service component library can improve the research and development efficiency and facilitate the maintenance of each application. Further, the maintenance cost of each application is reduced.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a schematic diagram of an application scenario diagram of the component library generation method of some embodiments of the present disclosure;
FIG. 2 is a flow diagram of some embodiments of a component library generation method according to the present disclosure;
3-4 are schematic diagrams of some application scenarios of component library generation according to some embodiments of the present disclosure;
FIG. 5 is a flow diagram of further embodiments of a component library generation method according to the present disclosure;
FIG. 6 is a schematic block diagram of some embodiments of a component library generation 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 is to be understood that the 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 for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the 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 diagram of an application scenario of the 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 the 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: a third application ". The database 102 includes: the storage information 107 of the business component library 105 corresponding to the target application 103, and the storage information 108 of the business component library 106 corresponding to the target application 104. The storage information 107 may be a "service component library number: 01, application name: the first application ". The storage information 108 may be "service component library number: 02, application name: a second application ". In response to determining that the above-described stored information 112 does not exist, the initial business component library 109 is generated from a predetermined base component library 113. The initial business component library 109 is used to generate a business component library 111 corresponding to the target application 110. The storage information 112 of the business component library is stored in the database 102.
It should be noted that the component library generation method may be executed 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 multiple pieces of software or software modules, for example, to provide distributed services, or as a single piece of software or software module. And 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 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 database has the storage information of the business component library corresponding to the target application.
In some embodiments, an execution subject (e.g., the electronic device 101 shown in fig. 1) of the component library generation method may utilize a Command-line Interface (CLI) related instruction to determine whether the storage information of the service component library corresponding to the target application exists in the database. The database stores the related information of the service component library corresponding to each current application. The stored information may include, but is not limited to, at least one of: number of service component library (Id), name of application, address of service component library, Node Package handler (NPM). It should be noted that each application has a corresponding service component library. Here, a component may be the result of abstractly encapsulating similarly structured UI interactions, processing logic, and styles. The component library may be a project structure for organizing components, and finally obtains static resources or NPM packets corresponding to scripts and Cascading Style Sheets (CSSs). The component library may contain one or more entry files, and the access party may introduce all or part of the components as required. The static resource may be a front-end FixedPage. The NPM packet may be a JavaScript packet management tool, and is a symbolic product under front-end modularization. It should be noted that, the existing codes can be reused through 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, and only contains the necessary UIs and interactions of the components. The service component library can be a component library which comprises part of service logic and conforms to the service UI standard.
It should be noted that determining whether the storage information of the service component library corresponding to the target application exists in the target database may avoid that related research and development personnel package the same service component library corresponding to the target application for multiple times. Furthermore, the research and development efficiency of related research and development personnel can be improved, and the interface UI interaction standard is unified.
In some optional implementations of some embodiments, the steps further comprise: and adding the components required by the service related to the target application to the basic component library. The basic component library does not include the components required by the service related to the target application.
It should be noted that, for the service component library corresponding to the target application, because components required by the service specific to the target application are lacking, the encapsulation of the service component library may not be completed only by the base component library. Furthermore, the components required by the service related to the target application need to be added to the basic component library.
Step 202, in response to determining that the storage information does not exist, generating an initial service component library based on a predetermined basic component library.
In some embodiments, in response to determining that the stored information does not exist, the execution principal may generate an initial business component library from a predetermined base component library. The initial service component library may be a component framework for generating a service component library corresponding to each application. The subsequent business component developer can modify 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 storage information does not exist, counting the components with the highest frequency of use in the base component library to obtain a component set. Then, generating related information such as an NPM packet related to the component set, example document information and the like, and packaging the related information to obtain an initial service component library.
It is emphasized that in response to determining that the stored information does not exist, at least one initial business component library may be generated in batches from a predetermined base component library.
In some optional implementations of some embodiments, the steps further comprise: 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 to the initial service component library.
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 reused under each framework. Each application maintains one or more sets of theme configuration information that conform to the application UI standards. Here, the user of the component library may specify the required theme style directory through the related plug-in, or may change the specific theme configuration information in the related variables to implement the customization of the style. As an example, the related variable may be a less variable. The associated plug-in may be a babel-plug-in-import plug-in.
In addition to this, for dynamically switching theme information, CSS variables may be used to enable configuration of dynamic theme configuration information. The usual way is to bulk modify the CSS variables in the component by setting dom style properties in Js.
In some optional implementation manners of some embodiments, in response to determining that the storage information does not exist, the basic component library is encapsulated by using a Command-line Interface (CLI) to obtain the initial service component library. The instruction corresponding to the command line interface may include, but is not limited to, at least one of the following: the method comprises the steps of initializing a business component library project, pulling an existing business component library command, updating a component command, adding a component command, debugging a command, packaging a command, sending an NPM packet command, and constructing an example information command.
Optionally, the step of, in response to determining that the storage information does not exist, encapsulating the basic component library by using a command line interface to obtain the initial service component library may include the steps of:
in a first step, in response to determining that the storage information does not exist, based on the basic component logic information in the basic component library, determining the initial service component logic information in the initial service component library by using a command line interface. Wherein, the iterative update of the initial service component logic information in the initial service component library depends on the basic component logic information in the basic component library.
And secondly, determining a basic component sample (demo) in the basic component library as a business component sample of the initial business component library by using a command line interface.
And thirdly, determining basic component test information (text) of the basic component library as the service component test information of the initial service component library by using a command line interface.
And fourthly, determining an example document (site) of the basic component library as an example document of the initial service component library by using a command line interface. Wherein the example document includes: analyzing the attribute information and the component annotation information of the component.
As an example, as shown in fig. 3, first, in response to determining that the above-mentioned stored information does not exist, the initial business component logic information 308 in the above-mentioned initial business component library 303 is determined by using the command line interface 302 according to the basic component logic information 304 in the above-mentioned basic component library 301. Wherein, the iterative update of the initial business component logic information 308 in the initial business component library 303 depends on the basic component logic information 304 in the basic component library 301. Then, the command line interface 302 is used to determine the basic component sample 305 in the basic 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 command line interface 302 is used to determine the example document 307 of the basic component library as the example document 311 of the initial business component library 303.
Step 203, generating a service component library corresponding to the target application by using the initial service component library.
In some embodiments, the execution agent may generate a service component library corresponding to the target application by using the initial service component library in combination with the received logic information required by the target application.
In some optional implementations of some embodiments, the steps further comprise:
firstly, packaging and debugging a service 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 implementation manners of some embodiments, based on the service requirement information of the target application, the logic information related to the initial service component library is modified, 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 by service requirement information of the target application and receiving component logic information input by a service component technician.
Step 204, storing the storage information of the service component library corresponding to the target application in the target database.
In some embodiments, the execution subject may store, in the target database, storage information of a service component library corresponding to the target application. The storage information of the service component library corresponding to the target application may include: the Id of the target application corresponding to 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 packet processor.
In some optional implementations of some embodiments, the steps further comprise:
firstly, displaying the service component library of each application corresponding to the database on a page.
And step two, 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.
As an example, as shown in fig. 4, the target application 404 is displayed on the target page 401. The applications displayed on 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 business component corresponding to the target application 404 by clicking the target application 404 in the target page 401.
It can be seen from the foregoing embodiments that the service component library of the target application can be effectively generated by the component library generation method according to some embodiments of the present disclosure. Furthermore, the corresponding business component library is generated according to the basic component library, so that the research and development efficiency and the convenient application maintenance can be improved. In addition, the maintenance cost of the application is reduced. Specifically, the inventors found that the reasons for the low efficiency of developing the service component library, the inconvenient maintenance of the application, and the high maintenance cost are as follows: different applications each correspond to a different component library. For component library development of a target application, different developers may be required to develop components of different modules, and logical interaction may exist between components of the modules, so that the research and development efficiency is low, and the maintenance cost is high due to the side face. Based on this, in the component library generation method according to some embodiments of the present disclosure, the service component libraries corresponding to different applications may be effectively encapsulated according to the predetermined basic 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 that a plurality of service component libraries are respectively packaged by related technicians, the unified use of one service component library can improve the research and development efficiency and facilitate the maintenance of each application. Further, the maintenance cost of each application is 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, determining whether the database has storage information of a business component library corresponding to a target application.
Step 502, in response to determining that the storage information does not exist, generating an initial service component library based on a predetermined basic component library.
Step 503, generating the service component library corresponding to the target application by using the initial service component library.
Step 504, storing the storage information of the service component library in the database.
In some embodiments, the specific implementation and technical effects of steps 501 and 504 can refer to steps 201 and 204 in the embodiments corresponding to fig. 2, which are not described herein again.
And 505, determining 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.
In some embodiments, the execution subject (e.g., the electronic device 101 shown in fig. 1) may filter out at least one service component and/or at least one service component library required by the user from the service component libraries corresponding to the storage information of the service component libraries in the database.
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 execution subject may encapsulate the at least one service component and/or the at least one service component library to obtain an encapsulated component library.
And 507, adding the entry check file into the packaging component library to obtain the packaging component library added with the entry check file.
In some embodiments, the execution agent may add an entry verification file to the package component library to obtain a package component library to which the entry verification file is added. The entry check file may be configured to check whether a service component that a target user wants to acquire exists in the package component library.
In some optional implementations of some embodiments, the service component in the package component library is obtained by:
firstly, the service component and/or the application corresponding to the service component are verified by using the entry verification file to obtain a verification result. The verification result may be whether the encapsulated component library has a relationship with the service component that the target user wants to acquire.
And secondly, acquiring the service component from the packaging component library based on the verification result. As an example, in response to the verification result satisfying a preset condition, the service component is obtained from the package component library. The preset condition may be a condition that whether an association relationship exists between the service component that the target user wants to acquire and the package component library.
As can be seen from fig. 5, compared with the description of some embodiments corresponding to fig. 2, the flow 500 of the component library generation method in some embodiments corresponding to fig. 5 adds specific steps for encapsulating at least one business component and/or at least one business component library according to the needs of the user. After obtaining the storage information of each service component library in the database, the user can individually package at least one frequently used service component and/or at least one service component library, so that the user can use at least one service component and/or at least one service component library required by the user quickly and conveniently.
With continued reference to fig. 6, as an implementation of the above-described method for the above-described figures, the present disclosure provides some embodiments of a component library generation apparatus, which correspond to those of the method embodiments described above for fig. 2, and which may be applied in various electronic devices in particular.
As shown in fig. 6, the component library generation 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 the storage information of the service component library corresponding to the target application exists in the database. The first generating 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 storage information does not exist. The second generating unit 603 is configured to generate a service component library corresponding to the target application by using the initial service component library. The storage unit 604 is configured to store the storage information of the service component library in the database.
In some optional 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 service component library of each application corresponding to the database on a page. The obtaining unit is configured to respond to the receiving of the call request of the user, and obtain the storage information of the selected service component library from the database according to the selected service component library.
In some optional implementations of some embodiments, the apparatus 600 may further include: a determination unit, a packaging unit, and a file adding unit (not shown in the figure). The determining unit is configured to determine at least one service component and/or at least one service component library required by a 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 packaged component library; the file adding unit is configured to add the entry check file into the package component library to obtain the package component library added with the entry check file.
In some optional implementations of some embodiments, the target service component in the package component library is obtained by: verifying the service component and/or the application corresponding to the service component by using the entry verification file to obtain a verification result; and acquiring the service component from the packaging component library based on the verification result.
In some optional 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 packaging and debugging unit is configured to package and debug the service 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 optional implementations of some embodiments, the apparatus 600 may further include: a subject information determination unit (not shown in the figure). The subject information determining unit is configured to determine subject configuration information related to the target application according to a subject 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.
In some optional implementations of some embodiments, the apparatus 600 may further include: a component adding unit (not shown in the figure). Wherein the component adding unit is configured to add components required by the service related to the target application to the basic component library; the basic component library does not include the components required by the service related to the target application.
In some optional implementations of some embodiments, the first generating unit 602 may be further configured to: and in response to the fact that the storage information does not exist, packaging the basic component library by using a command line set to obtain the initial service component library.
In some optional implementations of some embodiments, the first generating unit 602 may be further configured to: in response to determining that the stored information does not exist, determining initial business component logic information in the initial business component library by using the command line interface based on basic component logic information in the basic component library; wherein, the iterative update of the initial service component logic information in the initial service component library depends on the basic component logic information in the basic component library; determining the basic component sample in the basic component library as the 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 example document includes: analyzing the attribute information and the component annotation information of the component.
In some optional implementations of some embodiments, the second generating unit 603 may be further configured to: and modifying the initial service logic information of the initial service component library based on the service requirement information of the target application to obtain a service component library corresponding to the target application.
It will be understood that the elements described in the apparatus 600 correspond to various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 600 and the units included therein, and are not described herein again.
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 an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, the electronic device 700 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 701 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage means 707 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Generally, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; 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 illustrates an electronic device 700 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 7 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams 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 illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network via communications means 709, or may be installed from storage 708, or may be installed from ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described above in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 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, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications 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 network.
The computer readable medium may be embodied in the apparatus; or may exist separately without being assembled 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 database has storage information of a business component library corresponding to the target application; in response to determining that the storage information does not exist, generating an initial service component library based on a predetermined basic 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.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart 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 software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes a determination unit, a first generation unit, a second generation unit, and a storage unit. The names of the units do not constitute a limitation to the unit itself in some cases, and for example, the determination unit may also be described as a "unit that determines whether or not there is stored information of the service component library corresponding to the target application in the database".
The functions described herein above 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: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), 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 database has storage information of a business component library corresponding to the target application; in response to determining that the storage information does not exist, generating an initial service component library based on a predetermined basic 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.
According to one or more embodiments of the present disclosure, the method further includes: displaying the service component libraries of each application corresponding to the database on a page; and responding to a received call request of a 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 method further includes: determining at least one service component and/or at least one service component library required by a user according to the storage information of each service 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 check file into the packaging component library to obtain the packaging component library added with the entry check file.
According to one or more embodiments of the present disclosure, the service component in the package component library is obtained by: verifying the service component and/or the application corresponding to the service component by using the entry verification file to obtain a verification result; and acquiring the service component from the packaging component library based on the verification result.
According to one or more embodiments of the present disclosure, after the generating a service component library corresponding to the target application by using the initial service component library, the method further includes: packing 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 an initial business component library based on a predetermined base component library in response to determining that the storage information does not exist, the method further includes: 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 to the initial service component library.
According to one or more embodiments of the present disclosure, after determining whether the storage 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 service related to the target application to the basic component library; the basic component library does not include the components required by the service related to the target application.
According to one or more embodiments of the present disclosure, the generating an initial business component library based on a predetermined basic component library in response to determining that the storage information does not exist includes: and in response to determining that the storage information does not exist, packaging 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, the obtaining the initial service component library by encapsulating the basic component library with a command line interface in response to determining that the storage information does not exist includes: in response to determining that the stored information does not exist, determining initial business component logic information in the initial business component library by using the command line interface based on basic component logic information in the basic component library; wherein, the iterative update of the initial service component logic information in the initial service component library depends on the basic component logic information in the basic component library; determining the basic component sample in the basic component library as the 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 example document includes: analyzing the attribute information and the component annotation information of the component.
According to one or more embodiments of the present disclosure, the generating a service component library corresponding to the target application by using the initial service component library includes: and modifying the initial service logic information of the initial service component library based on the service requirement information of the target application to obtain a service 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: the determining unit is configured to determine whether the storage information of the business component library corresponding to the target application exists in the database; a first generating unit configured to generate an initial service component library based on a predetermined basic component library in response to a determination that the storage information does not exist; a second generating unit configured to generate a service component library corresponding to the target application by using the initial service component library; and the storage unit is configured to store the storage information of the service component library in the database.
According to one or more embodiments of the present disclosure, an apparatus may further include: a display unit and an acquisition unit (not shown in the figure). The display unit is configured to display the service component library of each application corresponding to the database on a page. The obtaining unit is configured to respond to the receiving of the call request of the user, and obtain 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, an apparatus may further include: a determination unit, a packaging unit, and a file adding unit (not shown in the figure). The determining unit is configured to determine at least one service component and/or at least one service component library required by a 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 packaged component library; the file adding unit is configured to add the entry check file into the package component library to obtain the package component library added with the entry check file.
According to one or more embodiments of the present disclosure, the target service component in the package component library is obtained by: verifying the service component and/or the application corresponding to the service component by using the entry verification file to obtain a verification result; and acquiring the service component from the packaging component library based on the verification result.
According to one or more embodiments of the present disclosure, an apparatus may further include: a packing and debugging unit and a determination unit (not shown in the figure). The packaging and debugging unit is configured to package and debug the service 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.
According to one or more embodiments of the present disclosure, an apparatus may further include: a subject information determination unit (not shown in the figure). The subject information determining unit is configured to determine subject configuration information related to the target application according to a subject 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.
According to one or more embodiments of the present disclosure, an apparatus may further include: a component adding unit (not shown in the figure). Wherein the component adding unit is configured to add components required by the service related to the target application to the basic component library; the basic component library does not include the components required by the service related to the target application.
According to one or more embodiments of the present disclosure, the first generating unit may be further configured to: and in response to the fact that the storage information does not exist, packaging 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 generating unit may be further configured to: in response to determining that the stored information does not exist, determining initial business component logic information in the initial business component library by using the command line interface based on basic component logic information in the basic component library; wherein, the iterative update of the initial service component logic information in the initial service component library depends on the basic component logic information in the basic component library; determining the basic component sample in the basic component library as the 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 example document includes: analyzing the attribute information and the component annotation information of the component.
According to one or more embodiments of the present disclosure, the second generating unit may be further configured to: and modifying the initial service logic information of the initial service component library based on the service requirement information of the target application to obtain a service 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; 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 a method as described in any of the embodiments above.
According to one or more embodiments of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, wherein the program, when executed by a processor, implements the method as described in any of the embodiments above.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology 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-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (13)

1. A component library generation method, comprising:
determining whether the database has storage information of a business component library corresponding to the target application;
in response to determining that the stored information does not exist, generating an initial business component library based on a predetermined base 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 the service component libraries of the applications corresponding to the database on a page;
and responding to a received call request of a 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 service component and/or at least one service component library required by a user according to the storage information of each service 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 check file into the packaging component library to obtain the packaging component library added with the entry check file.
4. The method of claim 3, wherein the business components in the package component library are obtained by:
verifying the service component and/or the application corresponding to the service component by using the entry verification file to obtain a verification result;
and acquiring the service component from the packaging component library based on the verification result.
5. The method of claim 1, wherein after said generating, with said initial business component library, a business component library corresponding to said target application, said 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 after generating an initial business component library based on a predetermined base component library in response to determining that the stored information does not exist, 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 business component library.
7. The method of claim 1, wherein after the determining whether stored information of a business component library corresponding to a target application exists 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 components required by the service related to the target application are components required for forming a service component library corresponding to the target application, and the basic component library does not include the components required by the service related to the target application.
8. The method of claim 1, wherein the generating an initial business component library based on a predetermined base component library in response to determining that the stored information does not exist comprises:
and in response to determining that the storage information does not exist, packaging the basic component library by using a command line interface to obtain the initial service component library.
9. The method of claim 8, wherein said encapsulating the base component library with a command line interface to obtain the initial business component library in response to determining that the stored information does not exist comprises:
in response to determining that the stored information does not exist, determining initial business component logic information in the initial business component library using the command line interface based on 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;
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 an example document of the basic component library as an example document of the initial business component library by using the command line interface; wherein the example document includes: analyzing the attribute information and the component annotation information of the component.
10. The method of claim 1, wherein the generating, by using the initial business component library, a business component library corresponding to the target application comprises:
and modifying the initial service logic information of the initial service component library based on the service requirement information of the target application to obtain a service component library corresponding to the target application.
11. A component library generation apparatus comprising:
the determining unit is configured to determine whether the storage information of the business component library corresponding to the target application exists in the database;
a first generating unit configured to generate an initial service component library based on a predetermined basic component library in response to determining that the storage 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;
a storage unit configured to store the storage information of the service component library in the database.
12. An electronic device, comprising:
one or more processors;
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-10.
13. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-10.
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 true CN112631590A (en) 2021-04-09
CN112631590B 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)

Cited By (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
CN113986248A (en) * 2021-11-03 2022-01-28 北京字节跳动网络技术有限公司 Code generation method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180217820A1 (en) * 2017-01-27 2018-08-02 Oracle International Corporation Integrating application features into a platform interface based on application metadata
CN109582422A (en) * 2018-11-30 2019-04-05 广州净松软件科技有限公司 Observation system construction method, device, equipment and storage medium component-based
US20190324729A1 (en) * 2018-04-24 2019-10-24 Microsoft Technology Licensing, Llc Web Application Development Using a Web Component Framework
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180217820A1 (en) * 2017-01-27 2018-08-02 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
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

Cited By (4)

* 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
CN113986248A (en) * 2021-11-03 2022-01-28 北京字节跳动网络技术有限公司 Code generation method and device, computer equipment and storage medium
CN113986248B (en) * 2021-11-03 2023-05-16 抖音视界有限公司 Code generation method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112631590B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN111338623B (en) Method, device, medium and electronic equipment for developing user interface
GB2589658A (en) Method and apparatus for running an applet
CN111221572B (en) Method, device, medium and equipment for automatically adapting to running environment
CN110780874B (en) Method and device for generating information
CN107644075B (en) Method and device for collecting page information
CN111240684A (en) Cutting method and device of JS code, medium and electronic equipment
CN110895471A (en) Installation package generation method, device, medium and electronic equipment
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN109725887B (en) Data interaction method and device based on message research and development framework and terminal equipment
CN113127000B (en) Compiling method, compiling device, compiling equipment and compiling storage medium for application program component
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN111008178B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN113709171A (en) Method and device for cross-component state communication
CN113778566A (en) Native application calling method and device, electronic equipment and computer readable medium
CN113468041A (en) Interface comparison test method and device
CN113704079A (en) Interface testing method and device based on Protobuf
CN112068814A (en) Method, device, system and medium for generating executable file
CN112445517B (en) Inlet file generation method, device, electronic equipment and computer readable medium
CN113342633B (en) Performance test method and device
CN112688863B (en) Gateway data processing method and device and electronic equipment
CN113760706B (en) Webpage debugging method and device
CN113760348A (en) Code packaging method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
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.

GR01 Patent grant
GR01 Patent grant