Home > Article > Backend Development > A framework for universal CRUD functionality in a fast backend within the IcePHP framework
This CRUD is not the CURD in TP. In TP, only the automatic data operations are completed.
I want to complete the configuration through PHP, automatically complete the entire management background, and increase the management of all tables/ Modify/delete/search/multi-select and other operations.
Similar to the scaffolding in Symfony, but I do not generate page code.
But dynamically create output during operation.
The following is a preliminary idea and is being tried
0
Controller’s action
Action
Complete the entire CRUD configuration
and call the processing method of the main CRUD object
1
Main CRUD Class
Scrud
As a container for all CRUD partition objects
As a bridge for message passing of all CRUD partition objects
Record all configurations (assigned to specific partition object records)
Complete the main control process (main specific partition object processing)
2
Table structure configuration class
SCrudConfig
Masters the information of all fields in the entire table
Processes all static judgments about table fields
3
Search bar class
SCrudSearch
As a container for all search criteria objects
Complete the display of search related subjects
Complete search processing
3.1
Exact match search condition class
SCrudSearchEqual
Generate exact match search condition Performance content
Create exact matching query conditions
based on user request parameters
3.2
Fuzzy matching search condition class
SCrudSearchLike
Generate performance content
Create query condition
3.3
Date search condition class
SCrudSearchDate
Generate performance content
Create query conditions
3.4
Radio search condition type
SCrudSearchRadio
Generate performance content
Create query condition
3.5
Check search condition class
SCrudSearchCheck
Generate performance Content
Create query conditions
3.6
Range search conditions Class
SCrudSearchRange
Generate performance content
Create query conditions
3.7
Date range search condition class
SCrudSearchDateRange
Generate performance content
Create query conditions
3.8
Drop-down list search condition class
SCrudSearchList
Generate performance content
Create query conditions
3.9
Drop-down tree search condition class
SCrudSearchTree
Generate performance content
Create query Conditions
4
New configuration class
SCrudInsert
As a container for all editable/non-editable field objects
Generate the performance content of the new record
Complete the processing of the new record
5
Modify configuration class
SCrudUpdate
As a container for all editable/non-editable field objects
Generate the performance content of the edit record
Complete the processing of the edit record
6
View configuration class
SCrudView
As Containers of all non-editable field objects
Generate the performance content of the view details
Complete the processing of the view details (that is, return the list)
7
Delete the configuration class
SCrudDelete
Complete the processing of the delete operation ( True deletion or pseudo deletion)
8
Table configuration class
SCrudGrid
As a container for all list display fields
Generate table display content
8.1
Text field class
SCrudGridText
Generate text field display
Additional function display for generating text fields
8.2
Date field class
SCrudGridDate
Generate field display and display of additional functions
8.3
Time field class
SCrudGridTime
Generate field display and display of additional functions
8.4
Image field class
SCrudGridImage
Generate field display and display of additional functions
9
Operation class
SCrudOPeration
Record the configuration information of all operations
As a container for all specific operation objects
Display the performance of all operations, Displayed by specific operation objects
9.1 Home page operation categorySCrudOperationIndex Complete the processing of homepage operationsCall relevant objects to complete the display of homepage 9.2 Search operation classSCrudOperationSearch Complete search operation processing
Calling each related object to complete the search display (Ajax) 9.3 New operation classSCrudOperationInsert Display the new operationComplete the processing of the new operationNotify that the new operation is completed 9.4 Modify operation classSCrudOperationUpdate
Display the modification operationComplete the processing of the modification operationDisplay the modification operation (completed by modifying the configuration class) 9.5 Delete operation classSCrudOperationDelete Show delete Operation completes the processing of the delete operation (completed by the delete configuration class) 9.6 Multi-select delete operation classSCrudOperationDeleteMulti Display multi-select delete operationComplete the processing of multi-select delete operation (by Deletion of configuration class completed) 9.7 View operation classSCrudOperationView Display the view operationComplete the processing of the view operation (completed by the view configuration class)
9.8 Common row-level operationsSCrudOperationRow Display a common row Level operationComplete row-level operation on a certain record 9.9 Common table-level operationSCrudOperationTable Display a common table-level operationProcess this operation 9.10 Universal multi-selection operationSCrudOperationMulti
Display a generic multi-select operationHandle this operation 10 Paging and sorting classSCrudPage Display paging, paging size, sorting basis, sorting direction
The above is the general CRUD function framework in the fast backend in the IcePHP framework Content, for more related content, please pay attention to the PHP Chinese website (www.php.cn)!