 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: Pagination with CodeIgniter
by Chris Cornutt January 30, 2012 @ 12:15:22
On PHPMaster.com today there's a new tutorial showing you how to handle simple pagination in a popular PHP framework, CodeIgniter.
Pagination is particularly useful when you are coding an application that interfaces with a database. A large dataset might have hundreds of possible results for one query, and pagination creates a much nicer user experience. In this tutorial, I'll use CodeIgniter's pagination library to show you how you can create a paginated list of results from a MySQL database. Along the way, you'll also see how to fix a problem with the pagination links that the library might produce.
He starts on the backend, creating a model to work with Country information and includes a "fetch_countries" method to grab the limited/paged list. Next up is the controller with an "example1" method that looks to the URL to see what page it should be on. The view is simple enough - just outputting the results back without worrying about how many to show.
voice your opinion now!
codeigniter framework tutorial pagination mvc country
Paul Reinheimer's Blog: The Danger of Hooks
by Chris Cornutt January 12, 2012 @ 09:12:18
Paul Reinheimer has a recent post to his blog talking about the danger of "hooks" in your development - the functionality several frameworks and other tools come with to allow you to add functionality to the core without having to change the main source.
I ran into hooks rather simultaneously with two very different frameworks: Code Igniter and Lithium. In both cases I was using a rather nifty hook to handle ensuring that users were properly authenticated and authorized before accessing a page. [...] One day, while messing around, I accidentally turned off the hook configuration within Code Igniter (actually I clobbered a file, and restored the wrong one). Then, things came crashing down in a horrible cacophony of... actually they didn't. Everything kept working: that was the problem.
He shows two solutions he came up with to be sure that his hooks were executed - one for Lithium and the other for CodeIgniter. The Lithium one uses a "_remap" method and the CodeIgniter example uses the magic "__invoke" method to check for an "AUTH_CHECKED" constant that's only defined as a part of his hooks.
I'm no longer entirely dependent on one configuration option or file for my security to function. Should it fail, I've got a secondary check in place; this example of defence in depth allows me to be comfortable with the hooks security system once more.
voice your opinion now!
danger hook framework codeigniter lithium failure
Kenny Katzgrau's Blog: The Top 10 CodeIgniter Sparks of 2011
by Chris Cornutt January 02, 2012 @ 09:32:53
Kenny Katzgrau has a new post with the top ten Sparks (CodeIgniter packages) for the year of 2011:
It's a moderately simple app that provides a vehicle for quickly dropping other developers' code in your codebase. Many of the packages on GetSparks are very well maintained. I am continually impressed by the amount of effort spark developers pour into their submissions when I peruse the site and try new packages out. [...] GetSparks has almost clocked 50,000 package downloads at this point, but there are handful of sparks that have really stood out in terms of popularity.
Packages in the top ten list by popularity include (in no particular order) php-activerecord, template, gravatar_helper and markdown. He also thanks a few of the folks that have made the GetSparks.org site what it is.
voice your opinion now!
codeigniter sparks thanks popularity
Community News: CICONF '12 Speaker List
by Chris Cornutt December 14, 2011 @ 08:31:32
The CICONF (CodeIgniter conference) group has made a new post about the lineup for their next event including people like Adam Griffiths, Alex Bilbie, Alexis Serneels, Harrow "WanWizard" Verton, Nick Jackson and Tyler Flint.
The chances are if you are using a library, addon, Spark or tutorial for your CodeIgniter projects it will have been written by one of these guys. Adam Griffiths wrote the book, Alex Bilbie has made some amazing OAuth 2 and Mongo code, WanWizard wrote DataMapper ORM - the most popular ORM used with CodeIgniter - and I've [Phil Sturgeon] released a few blogs about CI over the years.
They'll be doing the double-event conferences this year again - this time they'll be in London (February 18th-19th and San Francisco at a yet to be determined date). If you'd like to attend the London sessions, you can already purchase your tickets - a student pass for £35 and a standard ticket for £45.
voice your opinion now!
ciconf12 conference codeigniter london sanfrancisco
PHPMaster.com: Untangling MVC with CodeIgniter
by Chris Cornutt December 08, 2011 @ 11:22:32
On PHPMaster.com today there's a new tutorial that wants to help you "untangle MVC" with the help of the CodeIgniter framework. The tutorial is an introduction to the Model/View/Controller design pattern and how it's implemented in this popular framework.
If you want to develop applications with sell-structured, readable code that you can quickly diagnose problems in, then MVC is for you. In this article I'll untangle the mysteries of MVC for you using CodeIgniter, a PHP framework based on the MVC pattern. I'll first present a high level overview of MVC, what it is and how it can help you to become a better programmer, and then guide you through writing a simple web form the CodeIgniter way so you can see how the pattern looks in action.
They briefly describe MVC (favoring instead for showing it later in the CodeIgniter examples) and help you get a copy of the framework installed. They show you how to create a first controller, the corresponding view and make a model that extends the base and inserts address information into a database table.
voice your opinion now!
codeigniter framework tutorial mvc introduction
DZone.com: Codeigniter and Object-Oriented PHP Two Guides
by Chris Cornutt December 06, 2011 @ 09:56:46
On DZone.com today John Esposito points out two CodeIgniter tutorials that can help you on your way to becoming a pro with this popular PHP framework.
As Codeigniter builds on its (already considerable) popularity, now might be a good time to think about using the massively community-supported PHP framework to its maximum potential, if you aren't already. Here are two tutorials to check out, depending on your level of familiarity with object-oriented PHP and frameworks.
Here's the two he mentions:
The second tutorial is a little older, but the functionality of the framework hasn't changed dramatically since then so most of it should still apply.
voice your opinion now!
codeigniter tutorial beginner advanced framework
NetTuts.com: Easy Package Management for CodeIgniter with Sparks
by Chris Cornutt November 25, 2011 @ 11:00:51
On NetTuts.com today there's a new tutorial showing off a package management system for the CodeIgniter framework, Sparks, that makes installing and using packages similar to Ruby's gems.
Sparks is a new package-management system for CodeIgniter that extends the core with support for gem-like sparks. This tutorial interweaves an entry-level overview of the architecture and usage of the sparks system with the creation of dovecote-a simple spark for managing RSS data.
The tutorial introduces you to the Sparks system and helps you get it installed and configured to work with a first basic package - a dovecote example. He helps organize and write the first spark as well as set up any dependencies and autoloading it might need. He follows this by adding some functionality to the package to make pushing output to the view simpler.
You can download the source for the complete tutorial's code.
voice your opinion now!
package management codeigniter sparks ruby gem
CodeIgniter.com: New User Guide in Development
by Chris Cornutt October 06, 2011 @ 09:55:48
The CodeIgniter development team is happy to announce work that's been done on the framework's user guide to help make it even better and easier to find the information you're looking for (now based on the Sphinx documentation generation engine).
In addition to handling the tedium of generating page and document tables of contents, or maintaining internal links and references, the documentation is now easier to write, as you can simply focus on the content instead of markup and presentation. Don't forget syntax highlighting of PHP, HTML, CSS, and JavaScript in code samples. Based on ReStructured Text, it's also more human readable in a text editor than HTML is, which is likely where you spend most of your time. As an added benefit, Sphinx can output HTML, PDF, and even EPUB formats all from the same source files.
There's also been a style redesign in the latest release (here on github) on the development branch of the framework. They warn of a few "bumps" that you might come across in using it, but they're working hard to take care of those quickly. If you'd like to see the new version, check out the nightly build results.
voice your opinion now!
usergruide development sphinx markup generation framework codeigniter
Phil Sturgeon's Blog: Managing CodeIgniter Packages with Git Submodules
by Chris Cornutt September 26, 2011 @ 09:27:11
Phil Sturgeon has a new post to his blog today for the CodeIgniter folks out there - a tip on keeping things organized by using git submodules for package management.
With CodeIgniter moving to GitHub we are starting to see a lot of CodeIgniter developers wanting to learn more about Git, specifically how they can use it to improve their workflows, manage their applications and move away from the horrible days of copying and pasting updated libraries off a wiki. UCK. Sparks are helping us on the whole, but there is another method that we can use to manage our packages: Git Submodules.
Submodules allow you to pull in source from a remote repository without having to merge the code into your own. It creates a dependency between the two and makes it easier to check out only what you need. He gives the example of his oauth2 package being needed in multiple other applications, so instead of including and checking in multiple versions, he made a separate repo and defined the source as a submodule. He also includes a bit about fixing issues in your submodules with a few handy commands to get on the right branch, add a remote and push the commit.
voice your opinion now!
codeigniter git submodules modular versioncontrol
|
Community Events
Don't see your event here? Let us know!
|