CN111198899B - Development system and method for entity rendering in application program - Google Patents

Development system and method for entity rendering in application program Download PDF

Info

Publication number
CN111198899B
CN111198899B CN201811373922.1A CN201811373922A CN111198899B CN 111198899 B CN111198899 B CN 111198899B CN 201811373922 A CN201811373922 A CN 201811373922A CN 111198899 B CN111198899 B CN 111198899B
Authority
CN
China
Prior art keywords
layer
database
base class
preset
user data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811373922.1A
Other languages
Chinese (zh)
Other versions
CN111198899A (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.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software 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 China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811373922.1A priority Critical patent/CN111198899B/en
Publication of CN111198899A publication Critical patent/CN111198899A/en
Application granted granted Critical
Publication of CN111198899B publication Critical patent/CN111198899B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]

Abstract

The application discloses a development system and a development method for entity rendering in an application program. The model layer in the system provides a preset entity class database comprising a write operation base class and a read operation base class; the website view layer acquires user data, calls a write operation base class of the model layer and sends the write operation base class to the business logic layer; rendering the read user data to a target display interface; the business logic layer calls the write operation corresponding to the write operation base class of the data access layer and writes the user data into the target database; and calling the read operation corresponding to the read operation base class in the model layer and the read operation base class in the data access layer, and reading the user data from the target database. The model layer, the website view layer and the service logic layer are connected through multiple threads, and the data access layer and the service logic layer are connected through multiple threads; the system simplifies the operation of the database, improves the safety of the network, and reduces the network transmission delay through the multi-thread connection between layers.

Description

Development system and method for entity rendering in application program
Technical Field
The present application relates to the field of communications technologies, and in particular, to a system and a method for developing entity rendering in an application.
Background
NET MVC is currently a Web application development framework based on the NET native, where the native is the own program function part of the NET core. MVC (Model View Controller) is an abbreviation of Model (Model) -View (View) -Controller (Controller). The Model represents an application core (such as a database record list) and is data logic used for processing an application in the application; view is the part of processing data display in an application program and is created according to data in a model; the Controller is the part of the application that handles user interactions, and typically the Controller is responsible for reading data from the view, controlling user input, and sending the data to the model.
Net MVC has not been able to meet the needs of developers with the development of web site development technology.
Mainly characterized in the following points:
1. when the MVC framework processes the database in the Model, operations such as adding, deleting, modifying, and checking the database are realized by a call mode of a spliced Structured Query Language (SQL) statement, a large number of SQL statements need to be introduced each time a related operation method is called, the execution process is complicated, and if a user inputs an illegal spliced SQL statement in a text input frame of a display page, the execution of the illegal SQL statement when data is acquired in the Model may cause SQL statement injection attack.
2. The existing network is based on data packet transmission, and the transmission process of each data packet needs a certain time, resulting in network delay.
Disclosure of Invention
The embodiment of the application provides a system and a method for developing entity rendering in an application program, which are used for solving the problems in the prior art, simplifying the operation on a database, improving the network security and reducing the network transmission delay.
In a first aspect, a development system for entity rendering in an application program is provided, where the system includes a model layer, a data access layer, a business logic layer, and a website view layer; the system comprises a model layer, a website view layer, a service logic layer, a data access layer and a service logic layer, wherein the model layer, the website view layer and the service logic layer are connected through multiple threads;
the model layer is used for providing a preset entity class database, and the preset entity class database comprises a write operation base class and a read operation base class;
the website view layer is used for acquiring user data input by a user, calling a writing operation base class in the model layer, and sending the user data and the writing operation base class to the service logic layer; rendering the read user data to a target display interface;
the data access layer is used for providing writing operation and reading operation on a target database, and the target database is a database mapped by the preset entity class database;
the service logic layer is used for calling the write operation corresponding to the write operation base class in the data access layer and writing the user data into the target database through the write operation; and calling a read operation corresponding to the read operation base class in the model layer and the read operation base class in the data access layer, reading user data from the target database through the read operation, and sending the user data read from the target database to the website view layer.
Therefore, the database operation is packaged in advance, and the packaged database operation is called to obtain entity data required by the service, so that the operation on the database is simplified, the network safety is improved, and the network transmission delay is reduced through the multi-thread connection between layers.
In an optional implementation, the system further comprises: a common layer;
and the general layer is used for providing preset general operations for operating the target database for the business logic layer, and the preset general operations comprise reminding operations and exception handling operations.
The general layer is connected with the service logic layer through multiple threads.
The generic layer further simplifies the operation of the system on the database.
In an optional implementation, the website view layer includes a user authority management module;
the model layer is also used for configuring the authority parameters of the display page in a preset entity class database;
and the user authority management module is used for carrying out authority management and control on the display page based on the user operation and the authority parameters of the user after the authority parameters of the display page are configured in the preset entity database by the model layer.
Therefore, the user authority management module can control the addition, deletion, modification, checking and other authorities of each page, developers are not required to write corresponding authorities from beginning to beginning every time, and user experience is improved.
In an alternative implementation, the website view layer includes a view module;
and the view module is used for acquiring the packaged user data based on a preset packaging format, wherein the preset packaging format is a data packaging format for realizing the local refreshing of the display page, and rendering the packaged user data to a target display interface.
The view module renders the user data packaged by the preset packaging format to the target display interface, so that local refreshing of webpage operation is realized, and user experience is improved.
In an optional implementation, the preset entity class database further includes at least one operation base class of an operation base class query and an operation base class modification;
and when the preset entity class database further comprises a query operation base class and a modification operation base class, the data access layer is further used for respectively executing query operation and modification operation on the preset entity class database based on the query operation base class and the modification operation base class.
In a second aspect, a method for developing entity rendering in an application program is provided, the method including:
acquiring user data input by a user;
writing user data into a target database through multithreading based on write operation corresponding to a write operation base class of a preset entity class database, wherein the target database is a database mapped by the preset entity class database;
reading the user data from a target database through multiple threads based on the read operation corresponding to the read operation base class of the preset entity class database;
rendering the read user data to a target display interface.
In an alternative implementation, prior to obtaining user data input by a user, the method further comprises:
and configuring preset general operations, wherein the preset general operations are used for operating the target database, and the preset general operations comprise reminding operations and exception handling operations.
In an alternative implementation, prior to obtaining the user data input by the user, the method further comprises:
configuring authority parameters of a display page in a preset entity class database;
and performing authority control on the display page based on the user operation of the user and the authority parameters.
In an alternative implementation, before rendering the read user data onto the target display interface, the method further comprises:
acquiring packaged user data based on a preset packaging format, wherein the preset packaging format is a data packaging format for realizing partial refreshing of a display page;
and rendering the packaged user data to a target display interface.
In an optional implementation, the preset entity class database further includes at least one operation base class of an operation base class query and an operation base class modification;
and when the preset entity class database further comprises a query operation base class and a modification operation base class, respectively executing query operation and modification operation on the preset entity class database based on the query operation base class and the modification operation base class.
In a third aspect, an application server is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any of the above first aspects or the method steps of any of the above second aspects when executing a program stored in a memory.
In a fourth aspect, a computer-readable storage medium is provided, having a computer program stored therein, which computer program, when being executed by a processor, performs the method steps of any of the above-mentioned first aspects or the method steps of any of the above-mentioned second aspects.
The model layer in the system provided by the application provides a preset entity class database comprising a write operation base class and a read operation base class; the website view layer acquires user data, calls a write operation base class of the model layer and sends the write operation base class to the business logic layer; rendering the read user data to a target display interface; the service logic layer calls write operation corresponding to the write operation base class of the data access layer and writes the user data into the target database; and calling the read operation corresponding to the read operation base class in the model layer and the read operation base class in the data access layer, and reading the user data from the target database. The model layer, the website view layer and the service logic layer are connected through multiple threads, and the data access layer and the service logic layer are connected through multiple threads. The system simplifies the operation of the database, improves the safety of the network, and reduces the network transmission delay through the multi-thread connection between layers.
Drawings
Fig. 1 is a schematic structural diagram of a development system for entity rendering in an application according to an embodiment of the present invention;
FIG. 2 is a schematic view of a website view layer of FIG. 1;
fig. 3 is a schematic flowchart of a method for developing entity rendering in an application according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a development apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without any creative effort belong to the protection scope of the present application.
The development system for entity rendering in the application program provided by the embodiment of the invention can be applied to a server. As shown in fig. 1, the system may include: the system comprises a Model Layer, a Data Access Layer (DAL) Layer, a Service logic Service Layer and a Website view Website Layer.
The Model layer implements the DB first entity class database of the prior database and the entity Model again for the system through an Object Relational Mapping (ORM) technology. The ORM technology is generated along with the development of an object-oriented software development method, and is used for mapping an object represented by an object model to a relational model database structure based on SQL statements. Therefore, when the entity object is specifically operated, no complex SQL statement needs to be added or reduced, and the operation difficulty is reduced. The ORM technology provides a bridge between objects and relationships, and the object type data on the display interface and the relational data in the database are mutually converted through the bridge, and it should be noted that the Model layer may be a Model module or a device in the system.
The Website layer is a User Interface (UI) implementation layer of the system, can call a Service logic method stored in the Service layer and an operation base class of the Model layer, and implements various data interactions with the User Interface, including data binding between data acquired by Service logic and the User Interface, style rendering and the like.
The DAL layer encapsulates the relevant operations of the target database mapped to the preset entity class database, such as writing, reading, adding a row, deleting a row, modifying a row, querying a row, paging, and other operations.
The Service layer is a Service logic layer of the system, and can perform data interaction with the Website layer, and it should be noted that the Service layer may be a Service module or device in the system.
In order to facilitate processing of high-concurrency access of a Website, adapt to the requirement of large Website development and reduce the transmission delay of a network, the Model layer, the Website layer and the Service layer can be connected through multiple threads, and the DAL layer and the Service layer can be connected through multiple threads to realize related reference or calling.
Optionally, the Model layer can also be connected by the DAL layer through multiple threads to implement the relevant references or calls.
The code format is exemplified as follows:
public async Task<ActionResult>Index()
{
----await Task.Factory.StartNew(()=>
----{
--------BaseService<Test>baseS=new BaseService<Test>();
--------var res=baseS.GetList(g=>true);
----});
----return View();
}
optionally, the system may further include a Common layer;
and the Common layer is used for providing preset general operation for operating the target database for the Service layer. The Common layer further simplifies the operation of the system on the database, and it should be noted that the Common layer may be a Common module or device in the system.
The system provided by the application can realize entity rendering, the entity rendering realizes the encapsulation of database operation, such as operations of adding, deleting, changing, searching and the like to the database through a Data Access Layer (DAL) Layer and a separate abstraction Layer for entity mapping, and the entity Data required by service is obtained by calling the encapsulated database operation, and is rendered on an interface. Secondly, the system completes asynchronous multithreading of business logic by adding an encapsulated multithreading shell outside the detailed business logic code, and realizes support for high-concurrency scenes.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The specific functions of the above layers in the entity rendering of the development system shown in fig. 1 are as follows:
and the Model layer is used for providing the invokable entity class database for other layers.
The entity class database comprises operation base classes such as a write operation base class, a read operation base class, a query operation base class and the like for various target databases. The entity class database may include a SQL service (Server) database, an Oracle database, a MySQL database, and the like. After the entity class database is established, developers can directly view various target databases mapped by the entity class in a development tool (such as Visual Studio), and the analysis of the developers is facilitated.
Optionally, the Model layer is further configured to configure a permission parameter of the display page in the preset entity class database, where the permission parameter is used to manage operation permissions of the display page, such as addition, deletion, modification, and check of the operation permissions. The permission parameters may include role information of the user, button access permission corresponding to the role, and the like.
And the Website layer is used for acquiring user data input by a user, calling the write operation base class in the Model layer, sending the user data and the write operation base class to the Service layer, and rendering the user data to a target display interface.
Alternatively, as shown in fig. 2, the Website layer may include a view module and a user rights management module.
The view module can realize a cshtml file interface and realize data interaction of a foreground and a background through a preset asynchronous or synchronous webpage development Ajax method.
And the view module is used for acquiring the packaged user data based on a preset packaging format, and rendering the packaged user data to a target display interface, wherein the preset packaging format is a data packaging format capable of locally refreshing a display page.
The data interaction mode of the MVC in the front and back of the server used in the prior art is to directly insert background program codes on a front-end display interface through data structures such as a Model and a ViewBag provided by the MVC, render background data on the front-end display interface, although certain convenience can be brought to data binding, the current display page can be wholly refreshed during data interaction of the front and back platforms at each time.
The preset asynchronous or synchronous Ajax method comprises a layer framework and is used for realizing an animation loading function during front and back data interaction, the Ajax method is packaged into a calling mode similar to a Jquery method, rewriting extension method calling based on a Jquery domain is realized, parameters corresponding to the method comprise an Ajax communication address, transmitted data and a callback function executed by a server, and a javascript calling method comprises the following steps:
--$.FLPOST("/Material/ExportExcel",{
---------MATERIAL_NO:$("#MATERIAL_NO").val(),
---------EMPTY_MATERIAL_NO:$("#EMPTY_MATERIAL_NO").val()
--},function(result){
-------self.location.href=result.pathValue;
--});
examples of implementation code are as follows:
Figure BDA0001870258090000081
Figure BDA0001870258090000091
Figure BDA0001870258090000101
optionally, the user permission management module is configured to invoke a permission parameter of a display page in the Model layer preset entity database, and perform permission management and control on the display page based on user operation and the permission parameter of the user. Therefore, the user authority management module can control the addition, deletion, modification, check and other authorities of each page, developers do not need to write corresponding authorities from beginning to end every time, and user experience is improved.
The user authority management module comprises a verification Login Role valid log Role function module, and the valid log Role function module is used for rewriting MVC native authority control through system, web, mvc, action Filter Attribute rewriting of override class. The inheritance way is as follows:
----public class ValidateLoginRoleAttribute:ActionFilterAttribute
and the DAL layer is used for providing write operation, read operation, row adding operation, row deleting operation, row modifying operation, row inquiring operation and the like for a target database mapped by the preset entity class database.
The Query line operation comprises a true paging operation, the true paging is relative to the false paging, the main implementation method of the false paging is to acquire all data in a target database through database connection, then render all the data, namely, the data in the target database needing paging is extracted at one time, then page rendering is performed, the true paging is to process the data through a Language Integrated Query (Linq) technology, the data of a corresponding page is extracted and rendered when a page needs to be clicked and checked, and the data acquisition speed and the rendering speed are higher than those of the false paging.
In the prior art, the MVC processes the target database by splicing SQL statements when operating the target database, and if a user inputs an illegal splicing string in a text input box and executes an illegal SQL statement when a Controller acquires data, an injection attack may occur.
Specifically, the DAL layer encapsulates a series of operation interfaces for the target database, the operation interfaces are encapsulated and are operation methods for operating the target database, the operation interfaces include a GetListForPaging interface for implementing a foreground report true paging, a QueryJoin interface for implementing an SQL join statement function, and the like, and the operation interfaces can implement operations such as adding, deleting, modifying, checking, and the like for the target database and implement prevention of SQL statement injection attack. The database factory class in the entity class database ensures the unique EF in the thread, so that only one tool instance in the application program is used for carrying out target database operation, and the atomicity and the consistency of data are ensured.
The code is as follows:
publicclassDBContextFactory
{
----publicstaticDbContextCreateDbContext()
----{
--------DbContextdbContext=(DbContext)CallContext.GetData("DbContext");
--------if(dbContext==null)
--------{
------------dbContext=newFLEntities();
------------CallContext.SetData("DbContext",dbContext);
--------}
--------returndbContext;
----}
}
the generic basic DAL operation implementation interface is as follows:
publicinterfaceIBaseDAL<T>whereT:class,new()
{
----FLEntitiesDb{get;}
----IQueryable<T>GetList(Expression<Func<T,bool>>where);
----IQueryable<T>GetListForPaging<s>(Expression<Func<T,bool>>where,Expression<Func<T,s>>order,intageIndex,intpageSize,boolisAsc,outinttotalCount);//methodforpaging
----boolDeleteEntity(Tentity);
----boolUpdateEntity(Tentity);
----TAddEntity(Tentity);
----boolSaveChanges();
----IQueryable<T>QueryJoin(Expression<Func<T,bool>>where,string[]tablesName);
}
the Service layer comprises an Inversion of Control (IoC) module, and is used for calling write operation corresponding to a write operation base class in the DAL layer and writing user data into a target database through the write operation; and calling the reading operation corresponding to the reading operation base class in the Model layer and the reading operation corresponding to the reading operation base class in the DAL layer, reading user data from the target database through the reading operation, and sending the user data read from the target database to the Website layer.
Optionally, the system may further include a Common layer;
the Common layer is used for providing preset general operations for operating the target database for the Service layer, and the preset general operations can include general operations such as reminding, exception resolution, encryption, file uploading, format conversion and the like, such as Helper classes and methods, so that the Service is convenient to call, and a modular tool function is realized. The generic layer further simplifies the operation of the system on the database.
The Model layer can be multithreaded by Common layer, and Common layer can be multithreaded by Service layer to implement reference or calling.
In one example, to present the resume to the user on the display page, a polarity class needs to be created in the pre-set entity class database. The Website layer obtains personal data input by a user on a display page, the personal data can comprise data such as name, gender and height, a writing operation base class in the Model layer is called, and the personal data and the writing operation base class are sent to the Service layer. And the Service layer calls the write operation corresponding to the write operation base class in the DAL layer and writes the personal data into a database mapped by a preset policy class. And then calling a reading operation base class in the Model layer and a reading operation corresponding to the reading operation base class in the DAL layer, reading personal data from a target database through the reading operation, and sending the personal data read from the target database to the Website layer. The Website layer renders the read personal data to a target display interface, and display of the personal resume is achieved.
The system embodiment of the invention comprises a model layer, a data access layer, a business logic layer and a website view layer; the model layer, the website view layer and the service logic layer are connected through multiple threads, and the data access layer and the service logic layer are connected through multiple threads; the model layer is used for providing a preset entity class database, and the preset entity class database comprises a write operation base class and a read operation base class; the website view layer is used for acquiring user data input by a user, calling a writing operation base class in the model layer, and sending the user data and the writing operation base class to the service logic layer; rendering the read user data to a target display interface; the data access layer is used for providing write operation and read operation for a target database, and the target database is a database mapped by a preset entity class database; the service logic layer is used for calling the write operation corresponding to the write operation base class in the data access layer and writing the user data into the target database through the write operation; and calling a reading operation corresponding to the reading operation base class in the model layer and the reading operation corresponding to the reading operation base class in the data access layer, reading user data from the target database through the reading operation, and sending the user data read from the target database to the website view layer. The system obtains entity data required by the service by encapsulating the database operation in advance and calling the encapsulated database operation, thereby simplifying the operation of the database and improving the safety of the network.
Fig. 3 is a flowchart illustrating a method for developing entity rendering in an application according to an embodiment of the present invention. As shown in fig. 3, the method may include:
step 310, user data input by a user is acquired.
And step 320, writing the user data into a target database through multiple threads based on the write operation corresponding to the write operation base class of the preset entity class database, wherein the target database is a database mapped by the preset entity class database.
And step 330, reading the user data from the target database through multiple threads based on the read operation corresponding to the read operation base class of the preset entity class database.
Step 340, rendering the read user data to a target display interface.
Optionally, before acquiring the user data input by the user, the method further comprises:
and configuring preset general operations, wherein the preset general operations are used for operating the target database, and the preset general operations comprise reminding operations and exception handling operations.
Optionally, before acquiring the user data input by the user, the method further comprises:
configuring authority parameters of a display page in a preset entity class database;
and performing authority control on the display page based on the user operation and the authority parameters of the user.
Optionally, before rendering the read user data onto the target display interface, the method further includes:
acquiring packaged user data based on a preset packaging format, wherein the preset packaging format is a data packaging format for realizing partial refreshing of a display page;
and rendering the packaged user data to a target display interface.
Optionally, the preset entity class database further includes at least one operation base class of an inquiry operation base class and a modification operation base class;
and when the preset entity class database further comprises a query operation base class and a modification operation base class, respectively executing query operation and modification operation on the preset entity class database based on the query operation base class and the modification operation base class.
The embodiment of the method obtains the entity data required by the service by encapsulating the database operation in advance and calling the encapsulated database operation, thereby simplifying the operation of the database, improving the safety of the network, and reducing the transmission delay of the network through multi-thread connection between layers.
Corresponding to the above method, an embodiment of the present invention further provides a development apparatus, as shown in fig. 4, the development apparatus includes: a fetch unit 410, a write unit 420, a read unit 430, and a render unit 440.
An obtaining unit 410, configured to obtain user data input by a user.
The writing unit 420 is configured to write, based on a write operation corresponding to a write operation base class of a preset entity class database, user data into a target database through multiple threads, where the target database is a database mapped by the preset entity class database.
The reading unit 430 is configured to read the user data from the target database through multiple threads based on a read operation corresponding to the read operation base class of the preset entity class database.
And a rendering unit 440, configured to render the read user data onto a target display interface.
Optionally, the apparatus further comprises a configuration unit 450;
the configuration unit 450 is configured to configure a preset general operation before acquiring user data input by a user, where the preset general operation is used to operate a target database.
The preset general operation may include a reminding operation, an exception resolution operation, and the like.
Optionally, the apparatus further includes a rights management unit 460;
the configuration unit 450 is further configured to configure, before acquiring user data input by a user, an authority parameter of a display page in a preset entity class database;
and the authority control unit 460 is configured to perform authority control on the display page based on the user operation and the authority parameter of the user.
Optionally, the obtaining unit 410 is further configured to obtain the packaged user data based on a preset packaging format before rendering the read user data on the target display interface, where the preset packaging format is a data packaging format for implementing partial refresh of the display page;
the rendering unit 440 is specifically configured to render the packaged user data to a target display interface.
Optionally, the preset entity class database further includes at least one operation base class of an inquiry operation base class and a modification operation base class;
and when the preset entity class database further comprises a query operation base class and a modification operation base class, respectively executing query operation and modification operation on the preset entity class database based on the query operation base class and the modification operation base class.
The functions of the functional units of the development apparatus provided in the above embodiment of the present invention can be implemented by the specific functions of the layers in fig. 1, and therefore, the specific working processes and beneficial effects of the units in the development apparatus provided in the embodiment of the present invention are not described herein again.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, including a processor 510, a communication interface 520, a memory 530, and a communication bus 540, where the processor 510, the communication interface 520, and the memory 530 complete mutual communication through the communication bus 540.
A memory 530 for storing a computer program;
the processor 510, when executing the program stored in the memory 530, implements the following steps:
acquiring user data input by a user;
writing user data into a target database through multithreading based on write operation corresponding to a write operation base class of a preset entity class database, wherein the target database is a database mapped by the preset entity class database;
reading the user data from a target database through multiple threads based on the read operation corresponding to the read operation base class of the preset entity class database;
rendering the read user data to a target display interface.
In an optional implementation, before obtaining user data input by a user, a preset general operation is configured, where the preset general operation is used to operate a target database, and the preset general operation includes a reminding operation and an exception handling operation.
In an optional implementation, before user data input by a user is acquired, configuring authority parameters of a display page in a preset entity class database;
and performing authority control on the display page based on the user operation and the authority parameters of the user.
In an optional implementation, before rendering the read user data to a target display interface, obtaining the encapsulated user data based on a preset encapsulation format, where the preset encapsulation format is a data encapsulation format for implementing partial refreshing of a display page;
and rendering the packaged user data to a target display interface.
In an optional implementation, the preset entity class database further includes at least one operation base class of an operation base class query and an operation base class modification;
and when the preset entity class database further comprises a query operation base class and a modification operation base class, respectively executing query operation and modification operation on the preset entity class database based on the query operation base class and the modification operation base class.
The aforementioned communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Since the implementation manner and the beneficial effects of the problem solving of each device of the electronic device in the foregoing embodiment can be implemented by referring to each step in the embodiment shown in fig. 2, detailed working processes and beneficial effects of the electronic device provided by the embodiment of the present invention are not described herein again.
In another embodiment of the present invention, there is also provided a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to execute the development method for entity rendering in an application program described in any of the above embodiments.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the development method for entity rendering in an application program as described in any of the above embodiments.
As will be appreciated by one of skill in the art, the embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
It is apparent that those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, provided that such modifications and variations of the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalents, the embodiments of the present application are intended to include such modifications and variations as well.

Claims (12)

1. The development system for entity rendering in the application program is characterized by comprising a model layer, a data access layer, a business logic layer and a website view layer; the model layer, the website view layer and the service logic layer are connected through multiple threads, and the data access layer is connected with the service logic layer through multiple threads;
the model layer is used for providing a preset entity class database, and the preset entity class database comprises a write operation base class and a read operation base class;
the website view layer is used for acquiring user data input by a user, calling the writing operation base class in the model layer, and sending the user data and the writing operation base class to the service logic layer; rendering the read user data to a target display interface;
the data access layer is used for providing write operation and read operation on a target database, and the target database is a database mapped by the preset entity class database;
the service logic layer is used for calling the write operation corresponding to the write operation base class in the data access layer and writing the user data into the target database through the write operation; calling the reading operation corresponding to the reading operation base class in the model layer and the reading operation corresponding to the reading operation base class in the data access layer, reading the user data from the target database through the reading operation, and sending the user data read from the target database to the website view layer.
2. The system of claim 1, wherein the system further comprises: a common layer;
the general layer is used for providing preset general operations for operating the target database for the business logic layer, and the preset general operations comprise reminding operations and exception handling operations;
and the general layer is connected with the service logic layer through multiple threads.
3. The system of claim 1, wherein the website view layer includes a user rights management module;
the model layer is also used for configuring the authority parameters of the display interface in the preset entity class database;
and the user authority management module is used for carrying out authority control on the display interface based on the user operation of the user and the authority parameters after the authority parameters of the display interface are configured in the preset entity class database by the model layer.
4. The system of claim 1 or 3, wherein the website view layer includes a view module;
and the view module is used for acquiring the packaged user data based on a preset packaging format, wherein the preset packaging format is a data packaging format for realizing the local refreshing of the display interface, and rendering the packaged user data to a target display interface.
5. The system of claim 1, wherein the pre-defined entity class database further comprises at least one of a query operation base class and a modify operation base class;
when the preset entity class database further comprises a query operation base class and a modification operation base class, the data access layer is further configured to respectively perform a query operation and a modification operation on the preset entity class database based on the query operation base class and the modification operation base class.
6. The development method for entity rendering in application program is applied to the development system for entity rendering in application program according to claim 1, and the method comprises the following steps:
acquiring user data input by a user;
writing the user data into a target database through multithreading based on the write operation corresponding to the write operation base class of a preset entity class database, wherein the target database is a database mapped by the preset entity class database;
reading the user data from the target database through the multiple threads based on the read operation corresponding to the read operation base class of the preset entity class database;
rendering the read user data to a target display interface.
7. The method of claim 6, wherein prior to obtaining user data entered by a user, the method further comprises:
and configuring a preset general operation, wherein the preset general operation is used for operating the target database, and the preset general operation comprises a reminding operation and an exception handling operation.
8. The method of claim 6, wherein prior to obtaining user data entered by a user, the method further comprises:
configuring the permission parameters of the display interface in the preset entity class database;
and performing authority control on the display interface based on the user operation of the user and the authority parameters.
9. The method of claim 6 or 8, wherein prior to rendering the read user data onto a target display interface, the method further comprises:
acquiring packaged user data based on a preset packaging format, wherein the preset packaging format is a data packaging format for realizing partial refreshing of the display interface;
and rendering the packaged user data to a target display interface.
10. The method of claim 6, wherein the pre-defined entity class database further comprises at least one of a query operation base class and a modify operation base class;
and when the preset entity class database further comprises a query operation base class and a modification operation base class, respectively executing query operation and modification operation on the preset entity class database based on the query operation base class and the modification operation base class.
11. The client is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 6 to 10 when executing a program stored on a memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 6-10.
CN201811373922.1A 2018-11-19 2018-11-19 Development system and method for entity rendering in application program Active CN111198899B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811373922.1A CN111198899B (en) 2018-11-19 2018-11-19 Development system and method for entity rendering in application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811373922.1A CN111198899B (en) 2018-11-19 2018-11-19 Development system and method for entity rendering in application program

Publications (2)

Publication Number Publication Date
CN111198899A CN111198899A (en) 2020-05-26
CN111198899B true CN111198899B (en) 2022-12-13

Family

ID=70743726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811373922.1A Active CN111198899B (en) 2018-11-19 2018-11-19 Development system and method for entity rendering in application program

Country Status (1)

Country Link
CN (1) CN111198899B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732734A (en) * 2020-12-31 2021-04-30 上海瑞家信息技术有限公司 Information processing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826018A (en) * 2010-05-20 2010-09-08 瑞斯康达科技发展股份有限公司 Interactive development system and method for interface of network element management system
CN105630472A (en) * 2014-11-03 2016-06-01 中国科学院沈阳自动化研究所 Quick client development frame for manufacturing execution system and software development method for frame

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826018A (en) * 2010-05-20 2010-09-08 瑞斯康达科技发展股份有限公司 Interactive development system and method for interface of network element management system
CN105630472A (en) * 2014-11-03 2016-06-01 中国科学院沈阳自动化研究所 Quick client development frame for manufacturing execution system and software development method for frame

Also Published As

Publication number Publication date
CN111198899A (en) 2020-05-26

Similar Documents

Publication Publication Date Title
CN110825362B (en) Low-code application software development system and method
US20230057335A1 (en) Deployment of self-contained decision logic
WO2017124952A1 (en) Webpage script loading method and device
US8418134B2 (en) Method for efficiently managing property types and constraints in a prototype based dynamic programming language
US11797273B2 (en) System and method for enhancing component based development models with auto-wiring
US20120166977A1 (en) User programming access to data model in user interface design
US20150067664A1 (en) System, method and apparatus for transparently enabling software applications with adaptive user interfaces
CN109960709B (en) Database driver processing method, device, equipment and storage medium
US10970135B2 (en) Infrastructure base model API
CN111198899B (en) Development system and method for entity rendering in application program
US9280361B2 (en) Methods and systems for a real time transformation of declarative model and layout into interactive, digital, multi device forms
CN112860347A (en) Generation method and device of certificate-storing file in applet
KR101902191B1 (en) Apparatus and method for dynamic customization and execution of query based software logic for multitenant
US10325002B2 (en) Web service framework
CN108804088B (en) Protocol processing method and device
CN111966704A (en) ORM framework implementation method, system, computer equipment and storage medium
Caspers React and redux
CN114489645A (en) Form generation construction method, system and storage medium based on Vue and Element-UI
CN116107669A (en) Operator registration method, device and equipment of deep learning framework and storage medium
CN113050927B (en) Authority control method and device based on custom instruction and computer equipment
CN110837367B (en) User interface processing method and device and electronic equipment
US9898314B2 (en) Javascript extension tool
CN112732252A (en) Method and device for dynamically generating UI (user interface) and electronic equipment
US20160092505A1 (en) Framework for handling wrapper procedures
US8069178B1 (en) System for creating and using heterogeneous arrays

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
GR01 Patent grant
GR01 Patent grant