CodeIgniter’s Future?
Since I use CodeIgniter pretty much every day here at doof, I’ve been thinking alot about what it could do to improve future releases, and really bring it to the foreground for a much wider reach.
Here’s a few ideas for improvements and enhancements:
- New Validation Class
CI’s validation class is pretty good right now, but it isn’t exactly ruby-on-rails is it? Right now, there’s an awful lot of steps involved in validating data. CI should really try to re-think its validation class to allow for a much simpler implementation with a DRY-er approach, and a more intuitive method.
Example:
$model_validation = $this->model_name->validation(); $this->load->library('validation', $model_validation);
Something like this with just a couple of lines of initiation would be fantastic, and much, much, sexier.
- AJAX
It’s at the heart of so-many web applications now. CodeIgniter would be fantastic if it had an improved native AJAX support which returned data in XML - Handled by the framework itself. - Better Scaffolding
Something like ‘ActiveScaffolding’ for rails would be a very nice addition.
This would allow developers to very quickly build administration sections for the applications without having to re-use large sections of code.
Well, there’s a few ideas, what do you think? - What things would you like to see in CI?


















October 4th, 2007 at 11:27 am
Well, first, I’d really like to see a really session class and/or an authentification class, since scaffolding is not very efficient for managing an application, so we must code it by ourselves.
And yes, I would love to see natural AJAX. And additionaly, being able to switch CI in HTML 4.01 without modification.
I’m french, I recommand CodeIgniter all over the internet and I will really happy if it developp positively.
October 4th, 2007 at 12:42 pm
Hi!
It’s nice to see you again !
Talking about CI, I agree that the validation class is a bit redundant to use. You have to set manually all the rules, register the fields and so on..
It would be nice if the library looks directly in the html code, registers all the fields, looks for required fields (with a CSS class that would be necessary for all the fields that need validation, for example? or with the little * we often see in forms).
Maybe I’m dreaming, but it could be very useful…
The idea of the “ActiveScaffolding” is pretty good ! I guess it is not complicated to make something with a basic user managing system, and with the current features of scaffolding. Something protected by login/password.
Because I don’t use AJAX very often, I can’t say anything about it…
So, have fun at doof, and continue posting so useful messages !
P.S. : sorry for my bad english
October 5th, 2007 at 8:39 am
Hi Eliot!
i just jumped by to say thank u for ur video files where ur xplaining more about ci.
they were very helpfull and i am looking forward for ur next guides!
thank u
October 6th, 2007 at 2:30 am
I agree - the Validation class definitely needs an update. Not in the automation way that metalking mentioned (sorry buddy), but a way to make it a bit more modular and DRY. There have been a lot of advances from third-party developers, but I think it’s time for EllisLab to address this themselves.
AJAX - I’m kind of fond of the lack of AJAX in CI, it truly gives us the freedom to select the library we are most comfortable with (without any pressure to select a particular package). On the downside, it is a key feature sought for by many visitors (and the reason CI is bypassed a lot of the time). I’d be willing to bless this if it was pulled off amazingly well.
Scaffolding… meh - who uses it anyways? I think CodeCrafter adequately fills the void you mention, with ActiveScaffolding.
October 8th, 2007 at 11:43 am
I think CodeIgniter may need some work, but the only one that bothers me is the validation class.
The validation class is annoying because of all the setup and redundancy.
If you want object oriented ajax, just download mootools. It’s just like codeigniter, maybe they should integrate mootools in the next codeigniter since they are both object oriented.
I think they didn’t expand on their scaffolding because they DO offer ExpressionEngine which is like a ’secure’ version of scaffolding. If they expand on CI’s scaffolding they could lose out on some business in my opinion.
October 9th, 2007 at 2:09 pm
I agree on the validation class and the scaffolding. There is still a void the could be filled by automation. The freedom and flexibility CI gives is you is great and it is left to you whichever AJAX library you choose, I love that. Still, in the fields of authorization and ACL, scaffolding and validation there is a big gap between CI and the other frameworks around.
October 9th, 2007 at 5:46 pm
Yeah, validation is a spot I’d like to see improved - good observation.
Ajax - something like this will probably eventually make its way into CI, but I honestly wonder if I’d ever use it? There are so many different ajax libs, and so many personal prefs… and honestly, its pretty straightforward. I’m still not sold on this one.
Scaffolding? The problem here is that as scaffolding gets “better” people try to use it in real, live-facing apps. Ack! There had better be some very serious thought about that.
October 17th, 2007 at 6:07 pm
would love to see as well:
- a global $config[] for setting the DB connection for UTF-8
- an integrated CRUD builder (CodeCrafter allready does an amazing job) for making the tedious job of building forms based on table fields less time consuming
- integration of the many optimization tips that have been mentioned on the CI forum
October 22nd, 2007 at 2:25 pm
Yup, validation could create a mess, and a nicer way to do it is really necessary in future CI. It’s always cumbersome to initiate and worst when it comes to multiple form view for one controller, so i have to create different validator init function for each form… and that’s one bad looking code
I agree with using CSS class for exclusion/inclusion, and maybe making the validation class to ignore any form element that isn’t exist in particular context, so we can initiate once and use it for any form view… or maybe it’s just me not knowing that it’s already possible to do in current CI ?
enlighten me if it is so…
RoR do this by having to explicitly load javascript library, even the default one. I think what’s really needed is inclusion of some js library specific helper like projax / pquery from ngcoders, i haven’t use them tough, because i feel better weaving javascript code into raw xhtml view files
my bad, my bad… ( i even use jquery *and* prototype/scriptaculous, because i’m lazy and couldn’t be bothered to replace jquery flash message from freakauth, while i also have to use prototype’s autocomplete because all jquery autocompletes just sucks and unreliable )
Ajax… native support is good, at least as default option, while we can still choose any other library to our liking, or simply not load any of them inclusing the default
CRUD, hmm, i think current CI scaffold is good enough, codecrafter/rapyd is okay too, but built in instant admin page like Django is super, because it can do relational CRUD among multiple tables, but… then it will need ORM, then convention, then… well, i guess i just switch job becoming a cake baker
oh well, maybe i just simply need a small script to create substantial resources, like bake or rake.. that will make life a bit easier, or so i thought…
October 25th, 2008 at 2:27 pm
[...] of all, there’s a new form validation class (finally!) as long as a year ago I’ve been wanting to see a fresh validation class, and this one is much much better. It’s far less complicated, take, for example, setting [...]
October 27th, 2008 at 2:58 am
[...] of all, there’s a new form validation class (finally!) as long as a year ago I’ve been wanting to see a fresh validation class, and this one is much much better. It’s far less complicated, take, for example, setting [...]