Welcome Guest, Not a member yet? Register   Sign In
Use CRUD library or not? if use CRUD library, which one is the best?
#1

[eluser]searain[/eluser]
Here are the questions.

1) http://ellislab.com/forums/viewthread/57514/

For my CI based CRUD programming, I like the approach from here. Form->valid->add/update database->back to the list view. No CI based crud library used.

First, when I do my non CI based php programming, I didn't use the CRUD library either. I thought that CRUD is simple, Create: form input, validate the form input, insert. Review: retrieve data from database, and display data. Update: retrieve data, display it, form input changes, update. Delete: submit id and delete.

Reuse the codes is not difficult or time consuming, just copy the codes, mass replace some fields names, add or delete some fields. Then you have another CRUD system.

And you have very clean and straightforward codes.

Use general CRUD library save some time, but doesn't save too much time and when come to read the codes and add some special fields need different validations or regroup the values before input the data etc. It may take a little bit more time than not using the CRUD library.

So my question is using CRUD library or not in CI programming? My guess is that not too much difference. It is depending on my preference. And generally speaking, I would not use CRUD library. Am I OK here with the CI coding trend?

2) If the trend is I should use CRUD library, could you recommend a lean and clean one?

I have searched CRUD libraries here. There are several libraries available from the search results. It seemed no one tops others in the views of this forum.

Thanks!
#2

[eluser]Colin Williams[/eluser]
I think the Active Record classes offer a great CRUD system:

Code:
$this->db->insert(); // Create
$this->db->get(); // Retrieve
$this->db->update(); // Update
$this->db->delete(); // Delete
#3

[eluser]Thorpe Obazee[/eluser]
I honestly don't see the point of using a CRUD 'system'.
#4

[eluser]Carlos G[/eluser]
[quote author="bargainph" date="1244612654"]I honestly don't see the point of using a CRUD 'system'.[/quote]

Why not?, i think that a good crud system could be a great tool to increase the speed of the development... but a good one that can manage the relations between entities effectively

just my opinion.
#5

[eluser]Phil Sturgeon[/eluser]
There is no solution to CRUD that is quick, easy, light and flexible other than Copy and Paste.

I find when I have made a module, a simple copy & paste gets my new module working FAR quicker than messing around configuring a massive group of libraries with a million files with the sole purpose of building me a form on the fly.

Copy, Paste, Tweak = Fast, Light and FULLY customisable.




Theme © iAndrew 2016 - Forum software by © MyBB