General CRUD functional framework in the quick backend of the IcePHP framework

Source: Internet
Author: User
This CRUD is not a CURD in TP. only automatic data operations are completed in TP. I want to complete the configuration through PHP, automatically complete the entire management background, add, modify, delete, search, multiple select operations for all table management. similar to the scaffolding in Symfony, but I do not generate page code. instead, the output is dynamically created during running. this CRUD is not a CURD in TP. only automatic data operations are completed in TP.

I want to complete the configuration through PHP, automatically complete the entire management background, add/modify/delete/search/multiple select operations for all table management.

Similar to the scaffolding in Symfony, but I do not generate page code.

Instead, the output is dynamically created during running.


The following is a preliminary idea.


0

Controller action

Action

Complete the configuration of the entire CRUD

And call the processing method of the main CRUD object

1

Primary CRUD class

Scrud

Containers used as all CRUD partition objects

Serves as a bridge for transmitting messages to all CRUD partition objects

Record all configurations (records assigned to specific partition objects)

Complete the master control process (process the specific partition objects of the master node)

2

Table structure configuration class

SCrudConfig

Measure the test taker's knowledge about all fields in the entire table.

Process all static queries on table fields

3

Search bar

SCrudSearch

Container used as all search condition objects

Complete the search for the subject

Complete Search processing

3.1

Exact match search criteria

SCrudSearchEqual

Generate content that exactly matches search criteria

Create exact matching query conditions based on user request parameters

3.2

Fuzzy match search condition

SCrudSearchLike

Generate performance content

Create query conditions

3.3

Date search criteria

SCrudSearchDate

Generate performance content

Create query conditions

3.4

Single-choice search criteria

SCrudSearchRadio

Generate performance content

Create query conditions

3.5

Select search criteria

SCrudSearchCheck

Generate performance content

Create query conditions

3.6

Range search condition class

SCrudSearchRange

Generate performance content

Create query conditions

3.7

Date range search criteria

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

Add configuration class

SCrudInsert

Container used as all editable/uneditable field objects

Generate the performance content of the new record

Complete the processing of new records

5

Modify configuration class

SCrudUpdate

Container used as all editable/uneditable field objects

Generate the performance content of the editing record

Complete Record Editing

6

View configuration classes

SCrudView

As a container for all non-editable field objects

Generate performance content for viewing details

View details (return list)

7

Delete configuration class

SCrudDelete

The deletion operation is processed (real deletion or pseudo deletion)

8

Table configuration

SCrudGrid

Container used as the display field of all lists

Generate table display content

8.1

Text field

SCrudGridText

Generate text field display

Additional Function Display for generating text fields

8.2

Date field

SCrudGridDate

Generate field display and display of additional functions

8.3

Time field

SCrudGridTime

Generate field display and display of additional functions

8.4

Image field

SCrudGridImage

Generate field display and display of additional functions

9

Operation

SCrudOPeration

Record configuration information for all operations

Containers used as all specific operation objects

Show the performance of all operations, displayed by specific operation objects

9.1

Homepage operations

SCrudOperationIndex

Complete homepage operations

Call related objects to display the homepage

9.2

Search operations

SCrudOperationSearch

Complete search operations

Call related objects to display the search results (Ajax)

9.3

New Operation class

SCrudOperationInsert

Show new operations

Complete New Operations

Announcement added

9.4

MODIFY operation class

SCrudOperationUpdate

Show modification operations

Complete modification

Display the modification operation (completed by modifying the configuration class)

9.5

Delete operation class

SCrudOperationDelete

Show delete operation

The deletion operation is completed (the deletion configuration class completes)

9.6

Select multiple delete operation classes

SCrudOperationDeleteMulti

Show multiple-choice delete operations

Process the multiple-choice delete operation (completed by the delete configuration class)

9.7

View Operation class

SCrudOperationView

Show View operations

The view operation is processed (by the view configuration class)

9.8

Common row-level operations

SCrudOperationRow

Display a common row-level operation

Complete row-level operations on a record

9.9

Common Table-level operations

SCrudOperationTable

Display a common table-level operation

Process this operation

9.10

General multi-choice operation

SCrudOperationMulti

Display a common multiple-choice operation

Process this operation

10

Paging and sorting

SCrudPage

Display page, page size, sorting basis, and sorting direction


11

Data Model

SCrudModel

Indicates that the entire Crud system performs database operations.

The above is the content of the general CRUD function framework in the quick backend of the IcePHP framework. For more information, see The PHP Chinese website (www.php1.cn )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.