Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in this specification one or more embodiment,
Below in conjunction with the attached drawing in this specification one or more embodiment, to the technology in this specification one or more embodiment
Scheme is clearly and completely described, it is clear that and described embodiment is only this specification a part of the embodiment, rather than
Whole embodiments.Based on this specification one or more embodiment, those of ordinary skill in the art are not making creativeness
The range of disclosure protection all should belong in every other embodiment obtained under the premise of labour.
The method that at least one embodiment of this specification provides, can be adapted for the exploitation of the middle daemon software of enterprise,
It may include the exploitation of software front end in enterprise in the exploitation of daemon software, i.e. the presentation interface of software.The middle backstage is soft
Part for example may include: intra-companies' softwares such as finance, manpower, internal entries management.And interface is presented in the front end of this kind of software
It can be data form, the interface of list can be developed by the method for this specification at least one embodiment, and handle user
Operation on list.
Fig. 1 illustrates a data research/development platform 11 for front end exploitation, as shown in Figure 1, the platform may include a variety of
Task, " task " have packed the operation in a stage of data mart modeling in data mining.For example, the task of introducing is one corresponding
Data introduce operation, and the corresponding data of calculating task calculate the operation of processing.Task on platform includes but is not limited to example
Such as, calculating task (Computing Task), empty task (Virtual Task), importing task (Import Task), export are appointed
Be engaged in (Export Task), functional task, etc..
Each task can correspond to one data form of output, and the interface of list can be presented to the user, and user can be
Information is inputted in the interface of list, and is operated in list, for example, inputting text in text box, or in choice box
Middle some option of selection.Each task has oneself corresponding form interface element, list operation or condition managing, different
Task can have different form interface element or operation etc..The interface element of the list can include but is not limited to text
This input frame, drop-down choice box, radio box etc., are also possible to the combination of several input frames, are determined according to business meaning.Subsequent
Embodiment description in, a component can correspond to an interface element, and be reusable.
As described above, since different tasks may include same or different interface element namely different groups
Part, then, if each task all removes the interface assembly of independent exploitation oneself, that will likely will appear a large amount of code weight
It writes again, both wastes efficiency, and inflexible, develop a new task every time, code, scalability will be rewritten
Also not good enough.
Based on this, the form interface generation method that at least one embodiment of this specification provides provides a kind of tables of data
Single front end Development Framework system, the system preferably can may be used when the task of front end is developed so that the exploitation of task has
Scalability and maintainability.
Wherein, the language of task exploitation, it is, for example, possible to use TypeScript language, TypeScript is Microsoft
A kind of programming language of object-oriented of exploitation and maintenance, it is the superset of JavaScript, contains the institute of JavaScript
There is element, JavaScript code operation can be loaded into, and extend the grammer of JavaScript.JavaScript is a kind of light
The explanatory scripting language of magnitude, it is embeddable into html page, it is executed in browser end, it is abundant to can be realized browser end
Interactive function brings the user experience of smooth multiplicity for user.
Shown in Figure 2, Fig. 2 illustrates the front end frame system of the exploitation of the task in this method, the frame system pair
It should be in the data research/development platform 11 in Fig. 1.I.e. data research/development platform 11 may include: View layers of frame (Task View
Framework), Model layers of frame (Task Model Framework).
Wherein, View layers of frame can be used for developing the View layer of a task, and Model layers of frame can be used for developing one
The Model layer of a task.Specifically, task may include the View for developing a task when developing in the exploitation code of front end
Layer and Model layers.The two layers are each responsible for the different aspect of data form.View layers are view layers, can be responsible for list
Page rendering, View layers may include React component one by one.Model layers are data Layers, can encapsulate and look into list
Operations and the condition managings such as inquiry, preservation, for example, list is in load, submission is medium.
The View layer of one task, the i.e. task are located at the part in View layers, are properly termed as View layers of task.One is appointed
The Model layer of business, the i.e. task are located at the part in Model layers, are properly termed as Model layers of task.It is exemplified below: referring to figure
May include multiple tasks in 2, Fig. 2, by taking calculating task Computing Task therein as an example for:
Task<ITaskProps>+CommonTask<ICommonTaskProps>+ComputingTask<IProps>,
This can be the View layer task for including in calculating task.Certainly, it can be the pass succession (Extends) between above-mentioned a few parts
System, about succession subsequent detailed.
Similarly, TaskModel+CommonTaskModel+ComputingTaskModel, this can be in calculating task
Including Model layer task.View layers of task and Model layers of task together constitute a task, and View layers of task can be born
The page rendering of list is blamed, Model layers of task can be responsible for management operation and state.
In addition, whether View layers of frame or Model layers of frame, can be set using layering continuing with referring to fig. 2
Meter, it is, for example, possible to use three layers of succession systems.The principle of the succession system is to gather some common component extractions,
(Extends) can be inherited for each task.An existing class is inherited by extends, heritable class is known as parent, newly
Class be known as subclass.For example, View layers of ComputingTask<IProps>inherit CommonTask<
ICommonTaskProps>。
As follows will be in conjunction with Fig. 2, by taking View as an example, three layers of succession system being used in describing framework:
First layer: infrastructure component;
For example, infrastructure component can be the Task<ITaskProps>in Fig. 2 in View layers, it is located at Task View
In Framework.In Model layers, infrastructure component can be the TaskModel in Fig. 2, be located at Task Model
In Framework.
It wherein, may include at least one fundamental operation function in infrastructure component, for example, packet in Task<ITaskProps>
Include the fundamental operations functions such as onPreSubmit (), renderForm ().Can be in these fundamental operation functions View layers or
The operation and event handling on some general bases in Model layers of person are asked for example, View layers can be the basic list of load
/ rendering data is sought, the operation such as processing list submission, Model layers can be some general interface states of management and (in load, mention
In friendship) operation.
In addition, infrastructure component can be the most general and basic operation and event handling of multiple-task, for example, in Fig. 2
In, according to fig. 2 in succession (Extends) relationship for illustrating, calculating task Computing Task, empty task Virtual
Task, the exploitation realization for introducing task Import Task, exporting task Export Task, will use and arrive infrastructure component.When
So, there can also be more tasks in data research/development platform, be not limited to several tasks shown in Fig. 2, other tasks can also
To use the infrastructure component or other infrastructure components.
The second layer: task common package;
Continuing with referring to fig. 2, for example, task common package can be Common Task < ICommon in View layers
Task Props>and Sync Task<ISync Task Props>;In Model layers, task common package can be Common
Task Model and Sync Task Model.
Wherein, task common package is the shared component of multiple tasks, for example, Common Task < ICommon Task
Props > can be what calculating task was shared with empty task, two tasks will use the component;And Sync Task < ISync
Task Props > can be the component that introducing task and export task share.
In addition, task common package can also inherit the infrastructure component of first layer.For example, View layers of task common package
Common Task<ICommon Task Props>can inherit the infrastructure component Task<ITaskProps>of first layer;Also,
Task common package can also include the independent function of oneself, for example, the render Task Name () in Fig. 2, i.e., when second
When the component of component " succession " first layer of layer, which will may include the first layer assembly, and can increase certainly
Oneself stand-alone content.
Task common package, can be using more flexible when inheriting infrastructure component: for example, can will be as the basis of parent
Component using AOP (Aspect Oriented Programming is programmed towards slice), realize, also, task common group by mode
Part can be written over some Hook Functions for including in infrastructure component, for example, may include interface load in infrastructure component
Before, load after Hook Function can realize Function Extension by rewriteeing these hooks in development task common package,
" load " public function that can be multiplexed in infrastructure component simultaneously.This to have taken into account reusability and flexibility in task exploitation,
Not only it may be implemented to be multiplexed some general fundamental operations, but also the specific operating function of certain task may be implemented.
Third layer: task component;
The third layer is specific task layer, can distinguish a variety of different tasks, for example, calculating task, empty task, drawing
Enter task dispatching.For example, in View layers, Computing Task<IProps>is properly termed as a task component.Virtual
Task<IProps>is another task component.In Model layers, task component can be Computing Task Model and
Virtual Task Model。
Wherein, task component can inherit the task common package in the second layer, for example, Computing Task <
IProps>succession, Common Task<ICommon Task Props>.Task component can embody the characteristics of task oneself, can
To be further added by the stand-alone content of oneself on the basis of inheriting task common package.For example, Model layers of task component
Import TaskModel can increase the stand-alone content of oneself on the basis of inheriting SyncTaskModel
eSplitColumnTemplate()。
Model layers of also above-mentioned three layers of similar succession system, are no longer described in detail.
For three layers of above-mentioned succession system, View layers and Model layers in described three layers, every layer all corresponds.
Infrastructure component in View layers of task is corresponding with the infrastructure component in Model layers of task, the task common group in View layers of task
Part is corresponding with the task common package in Model layers of task, in the task component in the View layers of task and Model layers of task
Task component it is corresponding.
It is shown in Figure 2, explain that " correspondence " is as follows:
" correspondence " is meant, the class of View frame and Model frame is corresponding, for example View has CommonTask,
Model just has CommonTask.As soon as such as will newly plus task, that adds an XXXTask at view layer, and model layers add one
A XXXTaskModel inherits a kind of Task of the second layer.
For another example, a calculating task Computing Task, may include: View layers Computing Task <
IProps > and Model layers of Computing Task Model, i.e. every kind of specific tasks can include View layer with
Model layers.Therefore, Computing Task<IProps>is corresponding with Computing Task Model, and this correspondence can
To be " corresponding to the same task " and " the same interface function for corresponding to same task ".In another example in View layers
SyncTask<ISyncTaskProps>is corresponding with the SyncTaskModel in Model layers, wherein SyncTask<
ISyncTaskProps>for list interface present it is related to rendering, SyncTaskModel be with SyncTask<
The relevant interface state in ISyncTaskProps > presentation interface and operational administrative.
Continuing with referring to fig. 2, the exploitation of task can also be arranged and match in addition to the modular construction of three layers of above-mentioned succession system
Item is set, the specific component Rendering logic of the various situations of certain task is made into configuration item, which can use
The Dynamic Execution logic between multiple components for including in View layers of task of definition and Model layers of task.For example, data form
Interface be dynamic, for example, when in interface select a frame when, another frame will become radio box therewith,
Or can disappear, and be arranged to configuration item and mean, these logics can be described with the mode of plain text (JSON), root
According to configuration energy display interface and user's operation can be handled.
" Use " in Fig. 2 indicates the interface type that class uses, and interface therein is the type in TypeScript,
For example, the type of the ITaskStore can be used in a TaskModel class at Model layers.TypeScript interface
Interface can be used to establish certain code agreement, so that other developers are when calling some method or creating new class
It must comply with the agreement of code defined in interface.
The technical implementation way of " succession " is realized in three layers of succession system as described below:
In View layers, under TypeScript development mode, the attribute of View layers of React component can be defined with general type
(Props), general type is to state that a kind of extensive rather than specific type, program are just passed to specific type when running.Citing is such as
Under: interface IProps<br/>}<br/>interface IState<br/>export class Task
extends React.PureComponent<IProps,IState>{<br/>}.The succession of each layer assembly includes to attribute
Succession, attribute inherit can pass through father pass son Props inherit.
In Model layers, Model layers of component is object, can be mixed into formula succession using object.For example, Task
Model is an object.
Three layers of succession system of the task framework in Fig. 2 are described above, how to exist as described below according to above-mentioned system
Increase new task on data research/development platform.
When developing new task:
When increasing new task on data research/development platform, still according to the succession system development of Fig. 2.
For example, if the interface element of the corresponding data form of new task is similar with current existing frame system, for example, together
Sample is needed using the infrastructure component and task common package in existing frame system, it is possible to still continue to use above-mentioned existing
Infrastructure component and task common package, in the third layer of Fig. 2 increase a new task, including View layer with Model layers, after
Hold existing component.In addition, if the interface dynamic change of new task is had some change, configuration item can be updated, is executed new
The corresponding new component Rendering logic of task is not required to repeat to write existing component code.
In another example if the interface element of the corresponding data form of new task and current existing frame system are different,
There is the independent interface element of new task oneself, then can be multiplexed current existing component, oneself the component of redeveloping.Than
Such as, the component of new task oneself can be on the basis of inheriting existing infrastructure component, increase some and new task pair
The new function answered, can also increase the corresponding new function of new task in infrastructure component, and such case can be new function can be with
As the operation in general infrastructure component.
It can see by above-mentioned frame system, developed, can be had using the front end that the frame system of Fig. 2 carries out list
There is following effect:
On the one hand, task exploitation is more flexible.For example, the subclass in frame can rewrite the Hook Function of parent, freely
It realizes the function of oneself, and parent common logic can be multiplexed, very flexibly.
On the other hand, the scalability of task exploitation is more preferable.For example, when newly-increased task, as long as a newly-increased task
View layers of task and Model layers of task, and inherit the parent in frame.
In another aspect, the maintainability of task exploitation is more preferable.Entirely the list exploitation of task is extremely complex, not good
Good design code do not allow it is easy to maintain, and the System Framework of this example can effectively disassemble entire complex logic to frame and
Specific business, for example, View layers of frame, Model layers of frame, each layer are easy to maintain there are also different tasks.
In addition, the design philosophy of this method application object-oriented, in front end, development field devises a Similar integral system,
Develop level in front end, all uses of two layers of this View layer and Model layer be after bearing structure correspondingly it is very unique, significantly
Improve flexibility, scalability and the maintainability of front-end task exploitation.
When executing task code:
After the completion of task is developed, the corresponding data of task can be realized by executing the logical code of the task
The realization of list.Fig. 3 illustrates the process of list generation method, and during execution task, task includes View layers of task
It, can be according to the component Rendering logic of pre-configuration, to execute multiple component with the multiple components for including in Model layers of task.
Also, View layers of task and Model layers all use three layers of succession system, and View layers of task and Model layers can carry out Fig. 3
Shown in handle:
In step 300, the task component in the task is executed, the task component inherits task common package,
The task common package is the shared component of multiple tasks;
In step 302, when executing the task common package, the base set that the task common package is inherited is executed
Part;
In step 304, at least one fundamental operation function that the infrastructure component includes is executed;
Within step 306, after the completion of the View layers of task and Model layers of task execution, it is corresponding to generate the task
Data form.
The interface that at least one embodiment of this specification provides a kind of data form generates system, and the system corresponds to institute
State the task of data form;The task includes: View layers of task and Model layers of task;
The View layers of task and Model layers of task, respectively include following component part:
Infrastructure component, the infrastructure component include at least one fundamental operation function;
Task common package, the task common package inherits the infrastructure component, and the task common package is more
The shared component of a task;
Task component, the task component inherit the task common package;
Also, the infrastructure component in View layers of task is corresponding with the infrastructure component in Model layers of task, in View layers of task
Task common package it is corresponding with the task common package in Model layers of task, task component in the View layers of task with
Task component in Model layers of task is corresponding.
In one example, the task includes: the multiple components for including in View layers of task and Model layers of task;Institute
State system further include: the component Rendering logic of pre-configuration, for handling the multiple component according to the component Rendering logic
Dynamic Execution.
In one example, include at least one of following when the task is new task, in the task: task is public
The new function corresponding with the new task for including in component or infrastructure component;Alternatively, new group corresponding with the new task
Part Rendering logic.
In one example, the implementation of the succession, including following at least one:
The attribute of described View layers of React component is defined with general type, and is realized and inherited by the general type attribute that father passes son;
Alternatively, in Model layers described, formula is mixed by object realizes and inherit.
The device or module that above-described embodiment illustrates can specifically realize by computer chip or entity, or by having
The product of certain function is realized.A kind of typically to realize that equipment is computer, the concrete form of computer can be personal meter
Calculation machine, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation are set
It is any several in standby, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various modules when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each module can be realized in the same or multiple software and or hardware when specification one or more embodiment.
Each step in above-mentioned process as shown in the figure, execution sequence are not limited to the sequence in flow chart.In addition, each
The description of a step can be implemented as software, hardware or its form combined, for example, those skilled in the art can be by it
It is embodied as the form of software code, can is the computer executable instructions that can be realized the corresponding logic function of the step.
When it is realized in the form of software, the executable instruction be can store in memory, and by the processor in equipment
It executes.
For example, corresponding to the above method, this specification one or more embodiment provides a kind of boundary of data form simultaneously
It looks unfamiliar forming apparatus, which may include processor, memory and storage on a memory and can run on a processor
Computer instruction, the processor is by executing described instruction, for realizing following steps: executing appointing for the data form
Business;The task includes: View layers of task and Model layers of task;The execution of the View layers of task and Model layers of task, point
It Bao Kuo not handle as follows:
The task component in the task is executed, the task component inherits task common package, and the task is public
Component is the shared component of multiple tasks;
When executing the task common package, the infrastructure component that the task common package is inherited is executed;
Execute at least one fundamental operation function that the infrastructure component includes;
After the completion of the View layers of task and Model layers of task execution, the corresponding data form of the task is generated;And
And the infrastructure component in View layers of task is corresponding with the infrastructure component in Model layers of task, the task in View layers of task is public
Component is corresponding with the task common package in Model layers of task, the task component in the View layers of task and Model layers of task
In task component it is corresponding.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that this specification one or more embodiment can provide as method, system or calculating
Machine program product.Therefore, this specification one or more embodiment can be used complete hardware embodiment, complete software embodiment or
The form of embodiment combining software and hardware aspects.Moreover, this specification one or more embodiment can be used at one or
It is multiple wherein include computer usable program code computer-usable storage medium (including but not limited to magnetic disk storage,
CD-ROM, optical memory etc.) on the form of computer program product implemented.
This specification one or more embodiment can computer executable instructions it is general on
It hereinafter describes, such as program module.Generally, program module includes executing particular task or realization particular abstract data type
Routine, programs, objects, component, data structure etc..Can also practice in a distributed computing environment this specification one or
Multiple embodiments, in these distributed computing environments, by being executed by the connected remote processing devices of communication network
Task.In a distributed computing environment, the local and remote computer that program module can be located at including storage equipment is deposited
In storage media.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.At data
For managing apparatus embodiments, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to side
The part of method embodiment illustrates.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
The foregoing is merely the preferred embodiments of this specification one or more embodiment, not to limit this theory
Bright book one or more embodiment, all within the spirit and principle of this specification one or more embodiment, that is done is any
Modification, equivalent replacement, improvement etc. should be included within the scope of the protection of this specification one or more embodiment.