Welcome Guest, Not a member yet? Register   Sign In
On CRUD, Scaffolding, ORM and the like.
#1

[eluser]Colin Williams[/eluser]
I'm interested to hear any horror stories or tales of triumph from any of you out there who have experience with the currently available development tools in CI, like BackendPro, CodeCrafter, IgnitedRecord, DataMapper, etc.

I've been entertaining the idea of distributing a replacement to the deprecated Scaffolding class, which in the end would be some mix of scaffolding, CRUD prototyping, and a different flavor of ORM. You, the CI developer, could interact with it and benefit from it on a number of levels: Use it for expediting model development; use it to prototype your application's object models; use it to generate working CRUD-ready MVC; use it to quickly enter test data or even rely on it for a ready-baked backend interface (all supported by GREAT documentation and a slick API and GUI).

I have little experience with the above-mentioned tools, but I have a good sense of the climate around each based on daily forum perusal. So I'd love to hear what you all are longing for. I have a very specific direction for this project but wouldn't want to move forward without some valuable input de todos mis compaƱeros de codigo de ignicion.

Fire away.
#2

[eluser]TheFuzzy0ne[/eluser]
I don't really use CRUD, and although I've read about ORM, I still don't get it. But we definitely need a replacement to the deprecated scaffolding class. I'd be very interested to see what you can come up with.
#3

[eluser]brianw1975[/eluser]
a good piece of CRUD functionality would, imo, go a long way to taking CI to the next level.

i, personally, would like to see a "plugin" (for lack of a better term) that can easily be dropped in the necessary folder (controllers, models, views, etc, with the hope that they could be in sub-directories for easy removal before sending the site to production)

basically i would love a script that would take the ease of something like Toad for MySQL or MySQL Manager than when you get done selecting the tables and the field relations, devise requirements based on table definition (ie. most pk's will be hidden fields, enum will be options or selects (user choice), varchar will be converted to text input, text/tinytext/mediumtext/largetext converted to textarea, the list goes on and on) you click submit and it builds a basic webform (in a view file) with the input fields based on the table fields, an option of html or xhtml syntax... but i digress... this is a bit beyond basic CRUD functionality.

Anyways, yeah, i think it would be a great idea.

I've got a few more details on this if you are interested.
#4

[eluser]m4rw3r[/eluser]
Note: Bias present in this post Tongue

I really like ORM tools, I've made a "light version" of my ORM too - for use when I don't need the "semi-heavy" code for the relations and flexibility.
But I haven't really made a good CRUD interface, which I will probably also do.

IgnitedRecord has really helped me in some projects (database interaction is much easier to handle, because of the record objects and the built in relation handling), and it is extremely helpful for creating small scripts for modifying db tables (using factory and a foreach, it takes about 6-8 lines of code to move data from one (or three) table(s) to another one, while changing it's structure).

I previously (read about a year ago) disliked ORM tools, because of three facts:
- They usually don't have any real flexibility
- Forcing you to structure your data in a certain way
- Performance (I can agree that IR lowers it a bit, but that is the work of AR - mostly)

But when I made IgnitedRecord, I tried to get rid of these disabilities, and I think I've succeeded with the first two (performance is always bad when extra layers of abstraction are used).
#5

[eluser]Colin Williams[/eluser]
Thanks for the replies so far. And, Martin, the bias is welcome. I'm not at this point considering building in any sort of automatic handling of relational data, like IgnitedRecord and DataMapper do. The focus will be mostly on providing a scaffolding feature that can be used as a learning vehicle. Some sort of ORM-like automation is kind of required on the backend, so I expect it to come about as a consequence of building the CRUD/Scaffolding stuff. It sounds like people would enjoy some sort of automatic handling of relational data, so I might play around with it.
#6

[eluser]m4rw3r[/eluser]
I'm currently debating whether to rewrite IgnitedRecord from scratch (for PHP 5) or not.

CI's database abstraction isn't really sufficient to make it perform well (I loose about 10-20% performance on CI's abstraction, because of DB_result::result() - even with a very streamlined version).
On the other hand is it hard to do a nice remake which still retains backwards compatibility, yet enables IgnitedRecord to interact with it on a very basic level (almost like IR is calling the database functions).

So if anybody has some wishes for what a good ORM should include (syntax, structure, features, focus, etc.) tell me, because that may convince me to make something awesome!
#7

[eluser]Colin Williams[/eluser]
Yeah, again this project has a very different vision; it's purpose is not to generate a robust, fully-abstracted ORM library. But I do think as a natural outcome there will be some sort of ORM-like solution because the scaffolding/CRUD will be able to handle any kind of data setup the user has. I think IR and DM look like good solutions already. Whatever this endeavor produces probably won't nearly support the feature set that these do.
#8

[eluser]Xeoncross[/eluser]
Seems like we're both look'n for the same thing again. I built a nice CRUD that ran off plugin calls for handling editing table columns before/after showing them to the admin for editing. But it was only half OO...

Anyway, yet again I am tired of making HTML forms (and the logic to go with them) for each new blog, comment, video upload, and anything else. We need a new scaffolding that allows us to tie into the processing of table rows.

So I'll race you, first one to build a nice CRUD wins. Wink
#9

[eluser]m4rw3r[/eluser]
You will have a quite large lead on me, because I need to make myself acquainted with my new MacBook Pro.
Then I also have to rewrite IR (or parts of it, again), so you'll probably have something ready to test before I start on the CRUD Smile
#10

[eluser]Xeoncross[/eluser]
Nice, I guess we all can't be that cool eh?

Anyway, I just looked over your IR and even if I gave you a week head start - I still think I would finish first. That system you built is a monster! Good job man.




Theme © iAndrew 2016 - Forum software by © MyBB