Tag: CodeIgniter

2010-06-08

Book Review: CodeIgniter 1.7 Professional Development

by Charles — Categories: OOP, PHP — Tags: , , Leave a comment

I was recently provided a review copy of CodeIgniter 1.7 Professional Development by Adam Griffith (Packt Publishing). It claims that it will help the reader “Become a CodeIgniter expert with professional tools, techniques and extended libraries.” As someone who has used CodeIgniter and found it to be very useful, I was looking forward to learning more and becoming a CI power user. However, I cannot say that my wish was fulfilled.

While some of the second half of the book introduced me to a few CI features I did not know about or at least had not yet used, most of the book was either about things I already knew or things I didn’t really care much about.

Most of the first half of the book essentially reiterated things you can find in the CI documentation, and that documentation is one of the strong points of CI. Also, some of the organization of the material was odd, such as detailing the image manipulation library before discussing a basic functionality such as session data handling. Some of the code samples seemed to be less than optimal as good examples of object-oriented PHP, such as the large switch/case block in the “Rest” class in Chapter 8.

My overall response to this book is therefore that it might be of use to intermediate-level PHP users who are new to CodeIgniter (with the caveat that it is not necessarily a good source for learning good OOP practices), but the experienced CodeIgniter user probably will find little in this book to make it worth purchasing. I’d probably only give it 2-1/2 stars out of 5.

2009-09-22

Book List App: Using Auto-Suggest with CodeIgniter

by Charles — Categories: PHP — Tags: , , , 1 Comment

I had a couple fields on the form for adding authors/books to the DB for which I wanted to use an “auto-suggest” feature via JavaScript; one of those things where after you start typing it pops up a list of matching choices from which you can select the one you want. After trying several different scripts that I could not get to work for one reason or another, I ended up using Ajax Auto Suggest v.2.

I did, however, have to change one line of that JavaScript file in order to get it to play nicely with CodeIgniter “friendly” URLs. I just got rid of the bit that set a varname= part of the URL:

	// create ajax request
	//
	if (typeof(this.oP.script) == "function")
		var url = this.oP.script(encodeURIComponent(this.sInp));
	else
		// var url = this.oP.script+this.oP.varname+"="+encodeURIComponent(this.sInp);
		var url = this.oP.script+encodeURIComponent(this.sInp);

Then when activating it within the page (CI view), I simply specified the CI URL to the controller/function with a trailing slash, to which the JS script then appends the value which my CI method will receive as its first (and only) parameter:

<script type='text/javascript'>
// <![CDATA[
	var options = {
		script:"/index.php/ajax/author_auto_complete/",
		json:true
	};
	var as_json = new bsn.AutoSuggest('author', options);
// ]]>
</script>

2008-11-24

CodeIgniter Framework Looks Promising

by Charles — Categories: PHP — Tags: , 1 Comment

It’s been almost a month since my last article. It seems work and other aspects of my life have contrived to keep me plenty busy lately. So to keep some level of activity going here, I thought I’d mention one of the things I’ve been up to lately.

I’ve been looking at a few PHP frameworks over the last several months as time permits (i.e.: not often!). The latest one I’ve tried is CodeIgniter. My initial impression is very positive–this one might be a keeper.

One thing I like about it is that it does not dictate a specific methodology with an iron fist. But what really stands out to me compared to others I’ve looked at is the quality of its documentation. Take a look for yourself at the online copy of the user manual, and I think you’ll see what I mean.

If you’re in the market for a PHP framework and have found others to be too inflexible and/or too difficult to learn, take a look at CodeIgniter and see what you think.

© 2012 PHP Musings All rights reserved - Wallow theme v0.46.4 by ([][]) TwoBeers - Powered by WordPress - Have fun!