Introducing CodeIgniter Sparks

If you’re familiar with package management, you’re aware of how awesome it can be. Yum, Apt, MacPorts, homebrew are examples of package managers on the Operating System level. Need to install some common software package like mysql? On OSX, it isn’t any harder than:

$ brew install mysql

For software development, you have Python’s eggs and Rails’ gems, which each work a bit differently, but generally achieve a solution to a big problem: Using, installing, and contributing other developers’ libraries should be easy.

So if you’re a CodeIgniter developer, picture this common scenario: You need a library to interact with Amazon’s new Simple Email Service, but you know someone out there must have already written one. You end up on some guy’s blog, and it looks like he has a working library. You copy/paste, download, whatever.

Maybe the lib was written to work with CodeIgniter, or maybe it’s just a general PHP lib. Maybe it works, maybe it doesn’t. Maybe it has solid documentation, maybe it doesn’t. If it’s not to your liking, back to Google you go, and search for something else. This is all time-consuming.

As of today, this problem is solved for CodeIgniter. It’s called CodeIgniter Sparks, and you can read all about it at http://getsparks.org.

CodeIgniter “Sparks” is still in an alpha state at the time of this writing, but it’s planned to be a full package manager for CodeIgniter applications. You can install it by using a one-liner.

Thanks to some early contributions, you can now get some Amazon SES functionality by:

$ php tools/spark install amazon-ses

And boom-shakalaka! It’s installed in your application. A special thanks to Joël Cox for that one.

Phil Sturgeon and Dan Horrigan each came through with their respective ‘template‘ and ‘tag‘ packages.

It’s still very early in the project’s lifetime, but I don’t think its too early to say that this could be very beneficial to the frameworks as a whole. As I put in the “GetSparks.org Manifesto”:

  1. There are plenty of feature requests for CodeIgniter, especially when it comes to libraries. 99% of the suggested libraries don’t belong built-in to the framework. We hope that Sparks helps keep CodeIgniter one of the lightest, fastest frameworks for PHP.
  2. Some fantastic and useful libraries have been written for CodeIgniter, but they remain scattered around the internet on blogs, wikis, forums, and github. Using these in your projects is a chore of copy and paste.
  3. When you’re thinking of using someone else’s code, there isn’t much of a way to gauge whether it’s ready for the big-time. Is it fault tolerant? Unit tested? Relatively recent?
  4. Most importantly: CodeIgniter developers don’t have an easy way to share their code and contribute extensions to CodeIgniter functionality.

It all comes down to making code easier to use and share among CodeIgniter developers.

If you’re interested in helping out on the project, reach out to team@getsparks.org. Right now, the team consists of me, John, Beau, and Mike. If you just want to follow along, check out http://github.com/katzgrau/getsparks.org. I’ve already received a ton of feedback, and it’s all appreciated.

PS: John and I put together a podcast explaining why we thought all this was needed by CI a couple weeks ago. Check it out!

This entry was posted in Uncategorized. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
  • http://twitter.com/bkmorse Brad Morse

    I do not want to sound naive, but you have to first browse through the getsparks listing of libraries first, or is there a command line function to search thru the different libraries?

    Also, the moderators of getsparks will only add libraries that are verified as working?

    There is a lot of potential for this, just want some clarification, thank you.

  • http://www.planetfrank.us frank

    sparks sounds great but what about people on enviroments like RackSpaceCloud ?

  • Pingback: GetSparks.org Beta Released, Big Changes

  • Asu

    Hi – I was trying to make use of Sparks for my CI apps and have ran into issues installing it on OSX Lion. I’m not yet on CodeIgniter 2, is it a dependency? I tried all 3 steps to see if I can make it work but couldn’t. Any pointers would be much appreciated. Thanks.