skip to content

DerekAllard.com : CodeIgniter, ExpressionEngine, and the World of Web Design

Thoughts on a Javascript Library Integration with Code Igniter

November 27th, 2006

For reasons I'll disclose in the near future, I've recently been convinced that Scriptaculous, despite my thoughts on its "bloat", is in fact the best library for me to focus in on if I'm going to integrate it with Code Igniter. I'm currently committed to a project that I'm just finishing off that I've been developing using Mootools, but when its done any work I do in this area will probably be on Scriptaculous integration.  I'll release the mootools library when I'm done of course!

Right now it is pretty limited, but it does support ajax nicely.

$this->load->library('mootools'); $this->mootools->update(controller/function', 'postbody=content', 'update_div', 'trigger'); $data['extraHeadContent'] = $this->mootools->load();

I like Jquery... a lot. Mootools and Jquery both suffer from a fatal flaw - They are basically 1 man projects right now. If Valerio got offered a million bucks to go work at Yahoo, do you think he would continue development of Moo, or work with YUI? I'm not saying that these aren't technically wonderful projects, they both are, but that Scriptaculous has behind it the kind of momentum right now that if Thomas Fuchs were to stop active development of it, it would continue unabated. So from a "business" sense, it offers something that these new breed of libraries can't yet offer. Maturity.

The only other framework that comes to mind to also meet this is Dojo, with its corporate support of IBM.

Again, let me be clear. I'm not saying that from a coding and quality perspective that these libraries aren't good - they are. But if I were a corporate client, I'd want Code Igniter to use the most widely-used, well-tested, mature javascript library possible. So since my desire is to build a library for CI with the widest possible appeal, I'll probably pursue Scriptaculous if I have time to develop this.

This entry was made on November 27th, 2006 @ 8:21 and filed into , .

Comments

Matthew Pennell wrote on November 27th, 2006 @ 3:41

I think jQuery is getting close to that point too - the community is pretty strong, so even if John Resig was hit by a bus tomorrow I don’t think development would stop. Personally I prefer it to Prototype+Scriptaculous, mainly just for the filesize .

Yannick wrote on November 27th, 2006 @ 15:29

Well I can’t say I have much experience with the other JS libraries you mentioned, but right now I’d say Jquery would be my choice.

I am looking forward to seeing what you do with scriptaculous though.

Andrew Kumar wrote on December 06th, 2006 @ 11:48

the same can be said for ci…

whilst the community is building, if Ellis and pMachine group walked away, would ci live on?

Go the jquery and mootools route! =D

Derek wrote on December 06th, 2006 @ 15:13

Yup, and I’ve made that argument before.  If your goal is to choose a framework that offers the most guaranteed chance of continuing, then Zend or Rails are good choices.  My goals are different - I want to see Code Igniter grow and succeed. From purely code-centric point of view, I think it has more to offer then alternatives.  But let me also state that I strongly believe that CI is in for the long haul.  The level of commitment that Rick (specifically) and pMachine (more broadly) have demonstrated is herculean.  I don’t see it dying ever… but we never know what tomorrow will bring, no matter how unlikely. Here’s what I wrote about the future of CI in the post I link to above.

If stability within the community is a primary concern (and it is a legitimate concern), then I think at this stage, one would be better off with Cake or Zend, which are both excellent established alternatives.  As for me though, I think CI has more to offer then any of those, and I’m interested in watching and helping Code Igniter grow in code, quality and popularity.

So my reasons for choosing CI are community and technical merit… not userbase or maturity.  Now contrary to that, I’m choosing scriptaculous for the opposite reasons.  I don’t care at all if Moo is a technically superior js library to scriptaculous, my primary concern in that case is just that it’ll be around in the future and is well developed and tested.
And in any event, that’s only my opinion.  The beauty of CI is the flexibility it offers.  “Helps out where you need it and get’s the hell out of your way when you don’t”.  If other people want to use my work because it works for them, then awesome!  But if one would rather build their own CI library, or roll their own solution, that’s awesome also, since the community grows and resources expand.

Post a Comment

Sorry, comments are automatically closed after 45 days, or sooner if one entry gets targetted by spammers. Why not contact me directly?