Jump to content

Recommended Posts

So, in my never ending brainstorming I've landed on creating some sort of CRUD system. I've not really dealt with any in practice... so question 1 is: are there any lightweight CRUD systems that you suggest? I'd prefer to not sort through a framework that does it, but more of a standalone system.

 

If that doesn't prove fruitful here is what I'm thinking:

 

Request comes in for whatever module/table type deal. I query that table and pull back a list of fields and datatypes. Form is generated based on the DB datatypes. TEXT => textarea, VARCHAR => text, TINYINT => checkbox or something like that. Depending on the action the form gets prefilled or not, and has some buttons available.

 

Problem is you're typically going to have foreign keys and what not, so while a text field would technically work, you'll have to lookup primary keys to enter here. So, the above will function as the default action, but can be overrode. So like, I'll first look for /Views/CRUD/Update/news.php or some crap, if it exists I'll load up the form, if it doesn't I'll use the default method as stated above.

 

As usual, these are just random firings going on in my head. I'm very interested in hearing more from the folks who have dealt with these systems or who have built their own. Really interested in more the approach than the actual development.

 

Thanks guys!

Link to comment
https://forums.phpfreaks.com/topic/96919-crud/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.