CN116243912A - Component development method and device, computer equipment and computer readable storage medium - Google Patents

Component development method and device, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN116243912A
CN116243912A CN202310225751.2A CN202310225751A CN116243912A CN 116243912 A CN116243912 A CN 116243912A CN 202310225751 A CN202310225751 A CN 202310225751A CN 116243912 A CN116243912 A CN 116243912A
Authority
CN
China
Prior art keywords
component
interface
service
components
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310225751.2A
Other languages
Chinese (zh)
Inventor
赵渝生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile 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 Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202310225751.2A priority Critical patent/CN116243912A/en
Publication of CN116243912A publication Critical patent/CN116243912A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse

Landscapes

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

Abstract

The application discloses a component development method, a component development device, a computer device and a computer-readable storage medium. The component development method comprises the following steps: and creating a corresponding interface component for each component, wherein the interface component is used for providing the service of the corresponding component and calling the interface component so as to call the component corresponding to the interface component. In the component development method, the component development device, the computer equipment and the computer readable storage medium, the corresponding interface components are constructed for the components, so that the components can be decoupled from each other by calling the interface components of the required components to acquire the services of the required components, the problem caused by direct reference among the components is avoided, mutual independence of each component is ensured, and further the working efficiency of modular development of projects is improved.

Description

Component development method and device, computer equipment and computer readable storage medium
Technical Field
The present invention relates to the field of Android (Android) application program development technologies, and more particularly, to a component development method, a component development apparatus, a computer device, and a computer-readable storage medium.
Background
The early development of Android applications adopts the idea of centralized management, and the same resources are managed in a centralized way, but as developers increase and functions increase, the code coupling between functions becomes more and more serious, and people can stretch and develop the Android application to move the whole body. Therefore, developers start to split the original project, and a modularized development mode is derived. However, component interaction in componentized development is always an important point in development, and if component interaction is desired, the components are coupled to each other, which not only violates the rules of componentized development, but also has low development efficiency.
Disclosure of Invention
The embodiment of the application provides a component development method, a component development device, a computer device and a computer readable storage medium.
The component development method comprises the steps of creating a corresponding interface component for each component, wherein the interface component is used for providing services of the corresponding component; and calling the interface component to call the component corresponding to the interface component.
The component development device of the embodiment of the application comprises an interface creation module and a calling module. The interface creation module is used for creating a corresponding interface component for each component, and the interface component is used for providing the service of the corresponding component; the calling module is used for calling the interface component to call the component corresponding to the interface component.
The computer device of an embodiment of the present application includes a processor. The processor is used for creating a corresponding interface component for each component, and the interface component is used for providing services of the corresponding component; and calling the interface component to call the component corresponding to the interface component.
The computer-readable storage medium of the embodiments of the present application contains a computer program, which when executed by one or more processors, causes the processors to perform a component development method of creating, for each component, a corresponding interface component for providing services of the corresponding component; and calling the interface component to call the component corresponding to the interface component.
According to the component development method, the component development device, the computer equipment and the computer readable storage medium, the corresponding interface components are constructed for the components, so that the components can indirectly call the services of the required components through calling the interface components of the required components, interaction among the components can be realized, decoupling among the components can be realized, the problem caused by direct reference among the components is avoided, mutual independence of each component is guaranteed, and the working efficiency of the componentized development is improved while the rules of componentized development are met.
Additional aspects and advantages of embodiments of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of embodiments of the application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow diagram of a component development method of certain embodiments of the present application;
FIG. 2 is a schematic plan view of a component development device of certain embodiments of the present application;
FIG. 3 is a schematic plan view of a computer device according to some embodiments of the present application;
FIG. 4 is a schematic illustration of a scenario of a component development device of certain embodiments of the present application;
FIG. 5 is a schematic illustration of a scenario of a component development method of certain embodiments of the present application;
FIG. 6 is a flow diagram of a component development method of certain embodiments of the present application;
FIG. 7 is a flow diagram of a component development method of certain embodiments of the present application;
FIG. 8 is a flow diagram of a component development method of certain embodiments of the present application;
FIG. 9 is a flow diagram of a component development method of certain embodiments of the present application;
fig. 10 is a schematic diagram of a connection state of a computer readable storage medium and a processor according to some embodiments of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the embodiments of the present application and are not to be construed as limiting the embodiments of the present application.
Referring to fig. 1, an embodiment of the present application provides a method for developing a component. The component development method comprises the following steps:
01: creating a corresponding interface component for each component, the interface components being used to provide services of the corresponding components; and
02: and calling the interface component to call the component corresponding to the interface component.
Referring to fig. 2, an embodiment of the present application provides a device 10 for developing components. The component development apparatus 10 includes an interface creation module 11 and a call module 12. The component development method of the embodiment of the present application can be applied to the component development device 10. The interface creation module 11 and the calling module 12 are used for executing step 01 and step 02. That is, the interface creation module 11 is configured to create a corresponding interface component for each component, the interface component being configured to provide services of the corresponding component. The calling module 12 is configured to call a component corresponding to the interface component.
Referring to fig. 3, the embodiment of the present application further provides a computer device 100. The component development method of the embodiment of the present application can be applied to the computer device 100. The computer device 100 includes a processor 101. The processor 101 is configured to perform step 01 and step 02. That is, the processor 101 is configured to create a corresponding interface component for each component, the interface component being configured to provide services of the corresponding component; and calling the interface component to call the component corresponding to the interface component.
Android application program development goes through three phases in total, from ordinary non-architecture development to modularized development, and from modularized development to componentized development. The initial architecture-free development adopts centralized management to intensively manage the same resources, but as developers increase and functions increase, codes become more and more, and the inter-function code coupling becomes more and more serious, so that the developers stretch all over the body during development, and in order to ensure the quality of project codes, the developers need to reconstruct projects, and at the moment, a relatively simple development architecture of splitting according to function modules is adopted, so that the modularized development is formed. The modular development adopts the concept of a module (module) in Android development, each function is a module, and codes of each function are added in the module to which the module belongs. Such a design is reasonable in the case that the functions are directly independent of each other, but when the same function is involved in a plurality of modules, the coupling of the code increases again. Thus, in order to solve the problems caused by modular development, developers have adopted modular development that further refines the split. Unlike modular development, which performs Application splitting according to business direction, modular development, which performs Application splitting through function direction, i.e., split modules are independent business modules, and split components are single functional components. For example, the modules may be live modules or super modules within some common application software, while the components may be video components or payment components, etc.
Referring to fig. 4, fig. 4 is a block diagram of a modular architecture, in which a shell engineering, a service module, a service base module, and a general component are respectively disposed from top to bottom. The top layer is the so-called "shell engineering" of the main program, mainly integrating all business modules, providing unique implementation of line application software, and display (manifest) configuration, and integrating into complete line application software. The business module and the business foundation module depend on a general component. But there is no dependency between the business modules, and there is no dependency between the business base modules. Whereas business modules are dependent on the business base modules required, for example, almost all business modules will rely on advertising components to present advertisements, pop-up advertisements, etc. The basic module is a universal basic capability, has extremely low modification frequency, and can be used for all projects in an integrated way as a software development kit (Software Development Kit, SDK). The basic module is used for providing basic functions required by most service modules, so that the service modules and the basic capability required by the service basic module can be obtained only by relying on the basic module. The simplest componentized architecture can be used, but the architecture is only the most ideal one, and in practical development, different components cannot be completely isolated from each other, and the components certainly have the conditions of mutual data transmission, calling method, page jump and the like. For example, a user in the live component needs to brush the gift, which requires support from the payment component, where the payment operation is information such as a login status, a user number identification (Identity document, ID), etc. If the payment is not logged in at present, the payment process can be normally carried out after the login is successful by firstly jumping to the login component to carry out the login operation. The component development method can be used for solving the communication problem of the components, so that the components can smoothly finish communication and meanwhile, the components can be ensured not to interfere with each other.
From the foregoing, it will be appreciated that the component development method of the present application can be applied to the computer device 100. When a developer develops an Android application program by using componentization development, components can be firstly divided according to functions, after the division is completed, the processor 101 can create a corresponding interface component for each component, the interface component is used for providing services of the corresponding component, and the processor 101 can call the required interface component according to the development requirement so as to call the component corresponding to the interface component. Therefore, when the components are used in intermodulation, the interface component of the other party can be directly called without any coupling with the components, so that the mutual independence of the components is ensured. For example, referring to fig. 5, the shopping component and the payment component on the left side of fig. 5 may call the service of each other, but the call method may cause a dependent coupling between the two components, and if one component is changed, the change may affect the other component to some extent, thereby increasing the workload of the development or maintenance stage. Thus, to accomplish decoupling between components, a corresponding interface component needs to be created for each component. As shown on the right side of fig. 5, the processor creates a shopping interface component for the shopping component and a payment interface component for the payment component. When the user needs to purchase goods in the shopping component, the support of the payment component is needed, and at the moment, the shopping component can call the interface component of the payment component to acquire the service of the payment component, so that the independence of the components is ensured, the change of one component can not affect other components, and the working efficiency of the development or maintenance stage is improved.
According to the component development method, the component development device, the computer equipment 100 and the computer readable storage medium, the corresponding interface components are constructed for the components, so that the components can be decoupled by calling the interface components of the required components to acquire the services of the required components, the problem caused by direct reference among the components is avoided, mutual independence of each component is guaranteed, and further the working efficiency of modular development of projects is improved.
Referring to fig. 2, 3 and 6, the interface component includes a service interface of the component, an entity class corresponding to the service interface, routing information and preprocessing logic, and step 02: the calling interface component is used for calling the component corresponding to the interface component, and the method further comprises the steps of:
021: under the condition that a call request is received, judging whether a service interface can be called or not through preprocessing logic; and
022: if yes, the routing information is acquired to carry out page skip, and the service interface is called to realize the calling of the service through the entity class corresponding to the service interface.
In some embodiments, the calling module 12 is configured to perform steps 021 and 022. That is, the calling module 12 is configured to determine, through the preprocessing logic, whether the service interface can be called when the call request is received, and if the service interface can be called through the preprocessing logic, obtain the routing information to perform page skip, and call the service interface to implement the call of the service through the entity class corresponding to the service interface.
In certain embodiments, processor 101 is configured to perform steps 021 and 022. That is, the processor 101 is configured to determine, through the preprocessing logic, whether the service interface can be invoked when the call request is received, and if the service interface can be invoked through the preprocessing logic, obtain the routing information to perform page skip, and invoke the service interface to implement service invocation through the entity class corresponding to the service interface.
Specifically, when a certain component needs to call another component, a call request is initiated to the other component, after the called component receives the call request, the processor 101 determines whether the called component meets the condition of calling the service interface through the preprocessing logic, if the processor 101 determines that the condition is met, the routing information of the called component is obtained to perform page jump, and meanwhile, the service interface of the called component is called to realize the call of the service through the entity class corresponding to the service interface.
For example, when purchasing goods using a shopping component, the payment component needs to be invoked with services of the payment component, and the payment component needs to use information such as login status and user number identification, ID. Therefore, when the buyer clicks the payment button, the shopping component initiates a call application to the payment component, after the payment component receives the call application, the processor 101 determines whether the shopping component is logged in to the account through the preprocessing logic, if the shopping component is determined to be logged in, the processor 101 invokes the routing information of the payment component, jumps the use page to the payment page, and invokes the service interface of the payment component at the same time, so that the buyer completes payment. If the processor 101 determines that the shopping component does not log in the account at this time, the routing information of the login component is called first, the user page is jumped to the login page, and the service interface of the login component is called, so that the buyer can complete login. After the buyer finishes logging in, the processor 101 determines that the state of the shopping component meets the state condition of calling the payment component, and the processor 101 then calls the routing information and the service interface of the payment component to jump the using page to the payment page, so that the buyer finishes payment.
Thus, after the component receives the call information, the processor 101 determines whether the component calling a certain component meets the call condition according to the preprocessing logic, and only if the component calling the certain component meets the call condition, the processor 101 can call the routing information and the service interface of the called component, so that the orderly call of the component is ensured, and the use fault or page jump error is avoided when the buyer uses the computer device 100.
Referring to fig. 2, 3, 4 and 7, the components include general components, and all the components depend on the general components, and the component development method in the embodiment of the present application further includes the steps of:
03: based on a preset routing frame, a routing frame assembly is established in the universal assembly;
step 022: obtaining routing information for page hopping, comprising:
0221: and calling the routing framework component to acquire the routing information of the called interface component so as to jump to the page of the component corresponding to the interface component.
In some embodiments, component development device 10 further includes a build module 13. The construction module 13 is configured to perform step 03, i.e. the construction module 13 establishes a routing framework component among the generic components based on a preset routing framework. The calling module 12 is configured to execute step 0221, that is, the calling module 12 is configured to call the routing framework component to obtain routing information of the called interface component, so as to jump to a page of the component corresponding to the interface component.
In certain embodiments, processor 101 is configured to perform step 03 and step 0221. That is, based on a routing framework (AROUter), the processor 101 establishes a routing framework component among the generic components, and the processor 101 is configured to invoke the routing framework component to obtain routing information of the invoked interface component to jump to a page of the component to which the interface component corresponds.
Specifically, the routing framework is a routing framework for realizing componentization by android, and related functions include application-level component (Activity), fragment (Fragment) jump, jump-band parameter, custom service, custom interceptor, interception sink and redirection of uniform resource location system (uniform resource locator, URL). Based on the routing framework, the component development device 10 uses the AMS dynamic generation bytecode technology to build a routing framework component in the generic component, and because all components depend on the generic component, all components can directly call the routing framework component. When a certain component initiates an application of calling another component, and when the preprocessing logic of the processor 101 judges that the component meets the calling state condition, the processor 101 calls the routing framework component to acquire the routing information of the called interface component so as to jump to the page of the component corresponding to the interface component.
For example, when a user wants to share a certain video to a friend in a video component, when the user clicks a share button, the video component initiates a call application to the share component, and the share component needs information such as a login state of the user and a user number identification ID, so that the processor 101 will perform preprocessing logic to determine whether the video component is in the logged state, and if the processor 101 determines that the video component meets the logged state, the processor will call a routing framework component to obtain routing information of an interface component of the share component, thereby skipping to a share page. If the processor 101 determines that the video component does not satisfy the logged-in state, the routing framework component is called first, and then the routing information of the interface component of the login component is obtained therein, so as to jump to the login page. After the user finishes logging in, the processor 101 obtains the route information of the interface component of the sharing component from the route frame component, jumps to the sharing page, and the user selects the sharing object in the sharing page to complete the sharing of the video.
Thus, by building the routing framework component in the universal component, all components can directly call the routing framework component without additionally enabling the processor 101 to create a corresponding interface component for the routing framework component, so that the execution steps of the processor 101 are reduced, and the operation efficiency of the processor 101 is quickened. Meanwhile, all the routing information is placed in the routing framework component, so that a developer can manage and improve the rate of acquiring the routing information when the component is called.
Referring to fig. 2, 3 and 8, in some embodiments, the component development method of the embodiments of the present application includes the steps of:
04: invoking a routing framework component to obtain a routing address of a fragment of the component; and
05: and displaying the page corresponding to the segment through the route address.
In certain embodiments, the migration module 14 is configured to perform step 04 and step 05. That is, the migration module 14 is configured to call the routing framework component to obtain the routing address of the segment of the component and display the page corresponding to the segment through the routing address.
In certain embodiments, processor 101 is configured to perform step 04 and step 05. That is, the processor 101 is configured to call the routing framework component to obtain the routing address of the segment of the component and display the page corresponding to the segment through the routing address.
In particular, the fragments represent behavior or user interface portions of the application-level components, and the fragments may be considered as a small application-level component. A developer can combine multiple fragments in one application level component to build multiple panes, thereby simplifying the steps of developing the application level component and refining the functional split of the application level component.
From the foregoing, the developer can further subdivide the segments during the componentized development process, and then combine multiple segments into one application level component to construct multiple panes, as desired. When a component needs to call a certain fragment in a certain component, and after the preprocessing logic of the processor 101 determines that the component meets the call condition, the processor 101 calls the routing framework component to obtain the routing address of the fragment of the component, and displays the corresponding fragment page according to the routing address, so that a plurality of fragment pages can be displayed in one application program level component page.
For example, a news application may display a list of articles on the left using one clip and articles on the right using another clip, i.e., two clips displayed side-by-side in an application-level component, each clip processing its own user input event. Thus, the user need not use one application level component to select an article and then use another application level component to read the article, but rather can select and read the article within the same application level component. When the user needs to select an article, the user may click on a text name in the article list, and the processor 101 invokes the routing framework component and obtains the routing information of the file in the routing framework component, so that the display page on the right side jumps to the page displaying the selected article according to the routing information.
In this way, in the development process, a developer can subdivide fragments according to development requirements, combine a plurality of fragments in one application-level component to construct a multi-pane, thereby refining pages of the application-level component, and enabling routing information of the plurality of fragments to be called in one application-level component and displaying pages corresponding to the routing information.
Referring to fig. 2, 3 and 9, the component development method in the embodiment of the present application further includes the steps of:
06: adding annotation information in the component; and
07: the lifecycle of the component is controlled based on the annotation information.
In some embodiments, the component development device 10 further includes an annotation module 15 and a processing module 16, where the annotation module 15 is used to perform step 06 and the processing module 16 is used to perform step 07. That is, the annotation module 15 adds annotation information to the component and the processing module 16 is used to control the lifecycle of the component based on the annotation information.
In certain embodiments, processor 101 is configured to perform step 06 and step 07. That is, the processor 101 adds annotation information to the component and controls the lifecycle of the component based on the annotation information.
Specifically, the processor 101 may add annotation information during compiling of a component, for example, when certain business logic is satisfied, the component enters an initialization phase, or a run phase, or a stop phase, or a destroy phase. When the processor 101 scans for certain annotation information using annotation processing techniques (Annotation Processing Tool, APT), this annotation information is processed and run, thereby controlling the lifecycle of the component.
For example, the processor 101 will typically do some initialization tasks in the onCreate of the application, such as the aforementioned routing framework initialization. The service module needs to acquire the application program at some time, and performs some initialization tasks when the application program is started, and usually these initialization tasks are directly performed by onCreate in the application program in the shell engineering. However, in modular development, the shell engineering and business module code need to be isolated, and tasks inside the components need to be done inside the business modules. To meet the above requirements, annotation information may be added during compilation to define the lifecycle of the component. And scanning and processing the annotation defined before during compiling the component by an annotation processing technology APT to generate a proxy class of BaseAppLike, which is called BaseAppLikeProxy. All proxy classes are under the same package name, the package name must only contain proxy classes, and class names are generated by fixed rules, so that the class names of the proxy classes generated by different components are ensured not to be repeated. In order to control the lifecycle of the component, a component lifecycle management class is needed, and the annotation processing technology APT can scan how many class files exist under a fixed package name, and the name of the class file, where the fixed package name is the package name of the BaseAppLikeProxy generated by the previous step. After the component is integrated, in the onCreate method of the application program, the processor 101 invokes the initialization method of the component lifecycle management class. And (3) after the annotation processing technology APT scans all BaseAppLikeproxy class names in the component lifecycle management class, class instantiation is performed through reflection, so that the control of the component lifecycle is completed.
Therefore, the processor 101 can control the life cycle of the component in the compiling stage, the independence of the component is improved, the control of the life cycle of the whole application program is distributed to the inside of each component in the project development process, and the integration and the use of the component are facilitated.
Referring to fig. 2, 3 and 9, the component development method in the embodiment of the present application further includes the steps of:
08: integrating one or more components based on functions required by a preset service to generate a service module corresponding to the preset service; and
09: all business modules are integrated to generate an application.
In some embodiments, the component development device 10 further includes an integration module 17, where the integration module 17 is configured to perform step 08 and step 09. That is, the integration module 17 integrates one or more components based on functions required for a preset service to generate a service module corresponding to the preset service, and integrates all the service modules to generate an application.
In certain embodiments, the processor 101 is configured to perform step 08 and step 09. That is, the processor 101 integrates one or more components based on functions required for a preset service to generate a service module corresponding to the preset service, and integrates all the service modules to generate an application.
Specifically, after the development of the components is completed, the processor 101 integrates the components required by the service based on the functions required by the preset service, so as to generate a service module corresponding to the preset service, and then, the processor 101 integrates the required service module according to the functions of the application program to be generated, and finally, generates the required application program.
For example, in a take-away application, there may be a food take-away business module, a buy-medicine business module, a run-leg business module, etc., while in each business module, there may be components required by each, such as a food take-away business module, a find component, an address component, a pay component, etc. When integrating the take-away application, the processor 101 integrates the business modules, i.e. integrates the components required by a certain business module, for example, integrates the components required by the search component, the address component, the payment component, etc. into a food take-away business module. After integrating all the required business modules, the processor 101 integrates all the required business modules together, and finally generates the take-away application program.
Thus, after the processor 101 completes the development of the components, the required components can be integrated according to the functions of the required application program and the required service modules thereof to form the required service modules, and then the service modules are integrated to form the required application program. In addition, the same component can be integrated in a plurality of service modules, thereby improving the utilization rate of the component and greatly reducing the workload of the processor 101 in generating the service modules.
Referring to fig. 2, 3 and 9, the component development method in the embodiment of the present application further includes the steps of:
10: issuing the components to a preset resource warehouse, and setting a warehouse address of each component; and
11: the component is referenced by its repository address.
In some embodiments, component development device 10 also includes a publication module 18 and a reference module 19. The publishing module 18 is for performing step 10 and the referencing module 19 is for performing step 11. That is, the publishing module 18 is configured to publish the components to a pre-set resource repository and set the repository address of each component, and the referencing module 19 references the components by their repository addresses.
In certain embodiments, processor 101 is configured to perform step 10 and step 11. That is, the processor 101 is configured to issue components to a preset resource repository, set a repository address of each component, and refer to the components through the repository addresses of the components.
Specifically, the processor 101 adopts a gradle plug-in technology, creates a new maven_push. Gradle file with an automatic packaging and publishing function under a module root directory, and configures the version number, name, maven bin address account number and the like of the ARR. When the script is required to be issued, the processor 101 will automatically issue the components to a preset resource repository and set the repository address of each component.
When a component that needs to be referred to and released to the maven repository, the processor 101 needs to add the maven repository address in the build. Gradle under the root directory of the shell engineering, and then add the dependency in the build. Gradle of the module, so that the processor 101 can refer to the required component through the repository address of the component.
Therefore, after the component development is completed, the components can be packaged and published to a preset resource warehouse through the gradle plug-in technology, each component corresponds to a warehouse address, and the components which need to be quoted and published to the maven warehouse can be quoted by a certain component conveniently, so that the sharing of the components is realized, and the efficiency of componentization development is improved.
Referring to fig. 10, the present application further provides a computer-readable storage medium 200 containing the computer program 201. The computer program 201, when executed by the one or more processors 101, causes the one or more processors 101 to perform the component development method of any one of the embodiments described above.
For example, the computer program 201, when executed by the one or more processors 101, causes the processors 101 to perform the following component development methods:
01: creating a corresponding interface component for each component, the interface components being used to provide services of the corresponding components; and
02: and calling the interface component to call the component corresponding to the interface component.
In the description of the present specification, reference to the terms "certain embodiments," "in one example," "illustratively," and the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiments or examples is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the present application, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the present application.

Claims (12)

1. A component development method, comprising:
creating a corresponding interface component for each component, the interface component being for providing services of the corresponding component;
and calling the interface component to call the component corresponding to the interface component.
2. The component development method of claim 1, wherein the interface component includes a service interface of the component, an entity class corresponding to the service interface, routing information, and preprocessing logic, and the invoking the interface component to invoke the component corresponding to the interface component includes:
under the condition that a call request is received, judging whether the service interface can be called or not through the preprocessing logic;
if yes, the routing information is acquired to carry out page skip, and the service interface is called to realize the calling of the service through the entity class corresponding to the service interface.
3. The component development method according to claim 2, wherein the components include a common component on which all the components depend, the component development method further comprising:
establishing a routing framework component in the universal component based on a preset routing framework;
the obtaining the routing information to perform page skip includes:
and calling the routing framework component to acquire the routing information of the called interface component so as to jump to the page of the component corresponding to the interface component.
4. The component development method according to claim 3, further comprising:
invoking the routing framework component to obtain a routing address of a fragment of the component;
and displaying the page corresponding to the fragment through the route address.
5. The component development method according to claim 1, further comprising:
adding annotation information in the component; and
And controlling the life cycle of the component according to the annotation information.
6. The component development method according to claim 1, further comprising:
integrating one or more components based on functions required by a preset service to generate a service module corresponding to the preset service;
and integrating all the business modules to generate an application program.
7. The component development method according to claim 1, further comprising:
issuing the components to a preset resource warehouse, and setting a warehouse address of each component;
the component is referenced by its repository address.
8. A component development apparatus, comprising:
an interface creation module for creating a corresponding interface component for each component, the interface component being for providing services of the corresponding component;
and the calling module is used for calling the interface component to call the component corresponding to the interface component.
9. A computer device comprising a processor for creating a corresponding interface component for each component, the interface component for providing services of the corresponding component; and calling the interface component to call the component corresponding to the interface component.
10. The computer device of claim 9, wherein the interface component includes a service interface of the component, an entity class corresponding to the service interface, routing information, and preprocessing logic, and the processor is further configured to determine, by the preprocessing logic, whether the service interface can be invoked if a call request is received; and under the condition that the service interface can be called, acquiring the routing information to carry out page skip, and calling the service interface to realize the calling of the service through the entity class corresponding to the service interface.
11. The computer device of claim 9, wherein the components comprise generic components, all of which rely on the generic components, the processor further configured to establish a routing framework component in the generic components based on a preset routing framework; and calling the routing framework component to acquire the routing information of the called interface component so as to jump to the page of the component corresponding to the interface component.
12. A computer readable storage medium comprising a computer program which, when executed by a processor, causes the processor to perform the component development method of any one of claims 1-7.
CN202310225751.2A 2023-03-09 2023-03-09 Component development method and device, computer equipment and computer readable storage medium Pending CN116243912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310225751.2A CN116243912A (en) 2023-03-09 2023-03-09 Component development method and device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310225751.2A CN116243912A (en) 2023-03-09 2023-03-09 Component development method and device, computer equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116243912A true CN116243912A (en) 2023-06-09

Family

ID=86631106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310225751.2A Pending CN116243912A (en) 2023-03-09 2023-03-09 Component development method and device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116243912A (en)

Similar Documents

Publication Publication Date Title
US11762634B2 (en) Systems and methods for seamlessly integrating multiple products by using a common visual modeler
US7627865B2 (en) Method and apparatus for accessing instrumentation data from within a managed code environment
KR100285223B1 (en) Technique for Programmatically Creating Distributed Object Programs
US8250458B2 (en) Method, system, and software tool for emulating a portal application
US8448163B2 (en) Deploying J2EE web applications in an OSGI environment
WO2002033545A2 (en) Pluggable instantiable distributed objects
JPH1091449A (en) Visual assembling tool for constituting application program by using distributed object on distributed object network
KR20060101221A (en) Rich data-bound applications
KR102397494B1 (en) Low code web development and operating system, and service method using of it
US11030066B2 (en) Dynamic application decomposition for execution in a computing environment
KR20220132458A (en) User interface platform developing system and method for responsive or adaptive web implementation
Nguyen et al. Using microservices for non-intrusive customization of multi-tenant SaaS
US5995100A (en) Method of automatically generating custom controls for selected modules in a library
Fabresse et al. Foundations of a simple and unified component-oriented language
Goedicke et al. Designing runtime variation points in product line architectures: three cases
CN116243912A (en) Component development method and device, computer equipment and computer readable storage medium
Haupt et al. Web based metacomputing
JP2006276939A (en) Program starting method for virtual machine, and client server system
PremKumar et al. Beginning javafx
Anjum et al. Glueing grids and clouds together: a service-oriented approach
Srinivasmurthy et al. Web2exchange: A model-based service transformation and integration environment
CN116700694B (en) Applet engine
Escoffier et al. Managing the heterogeneity and dynamism in hybrid mobile applications
CN111158684A (en) System creation method, device, electronic equipment and readable storage medium
CN112882698A (en) Development environment generation method and device, computer storage medium and electronic 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