Development Blog With Code Updates : Developercast.com

July 31, 2010

Site News: Job Postings for the week of 07.25.2010

Filed under: Development — @ 8:00 am

Job postings for the past week:

July 30, 2010

NETTUTS.com: How to Use CakePHP’s Access Control Lists

Filed under: Development — @ 4:13 pm

On NETTUTS.com today there’s a new detailed tutorial on how to use the access control list functionality that comes with the CakePHP framework.

If you’re building a CMS, you’ll probably need different user roles’”superusers, admins, users – with different permission levels. Too complicated to code? Enter CakePHP‘s ACL (Access Control Lists). With the right setup, you’ll be checking user permissions with just one line.

They talk about what “access control lists” are but shows you an example of one including the database tables and the full scripts for the Users controller, a model to hook into the database and the view for output to the user. They include methods for denying access, checking permissions, and modifying a user’s permissions.

Developer.com: 10 Experimental PHP Projects Pushing the Envelope

Filed under: Development — @ 3:41 pm

On Developer.com today there’s a new post listing ten experimental projects that are “pushing the envelope” in the PHP languages:

As the saying goes, “Just because you can do something doesn’t mean you should.” But in the world of programming, stretching boundaries is just part of the fun. The PHP community has never been one to shy away from bending their favorite language more ways than a shopping mall pretzel, and as the ten wild projects introduced in this article indicate, the fervor for experimentation is as strong as ever!

Here’s their list of the ten projects they see as trying to stretch the language to its limits:

Ask About PHP: Codeigniter: Creating dynamic graphs using JQuery and FusionCharts

Filed under: Development — @ 2:11 pm

On the Ask About PHP blog today there’s a new tutorial about integrating the OpenFlashCharts tool into a CodeIgniter application to display data.

I recently upgraded some of my Codeigniter applications that used OpenFlashCharts to using FusionCharts Free, and at the same time incorporated some javascript to allow me to change the graphs dynamically at the client-side. This has greatly improved the usability of my charts and graphs that I pump out. As such, I thought I would share how I did this and hopefully someone will find it useful as well.

He walks you through the steps needed to install – putting all of the files in the right places, creating a controller to use the scripts and a view to output the finished chart. A demo of the end result is also included.

Chris Hartjes’ Blog: Snakes and Elephants Playing Nice Together: PHPUnit and py.test with Hudson

Filed under: Development — @ 1:03 pm

In the latest post to his blog Chris Hartjes talks about how he got python and PHP working together as a part of his testing with Hudson.

These days, it’s becoming increasingly harder to find web applications that are homogenous in terms of the tools they use to Get Things Done. [...] Loosely coupled components, passing messages to each other, is great architecture to try and build if you have both the skills and patience to make it work.

His technique combines the testing of PHPUnit for PHP with the Py.test functionality for Python with the continuous integration tool Hudson to run them both as a part of the same build process.

Symfony Project Blog: Translations (Documentation)

Filed under: Development — @ 11:19 am

Have a flair for translation and want to help out an open source project in need? Consider helping the Symfony Project with their translation efforts for their manual.

The Symfony2 documentation is written in English and many people are involved in the translation process. First, become familiar with the markup language used by the documentation. Then, subscribe to the Symfony docs mailing-list, as collaboration happens there. Finally, find the master repository for the language you want to contribute for.

Full details on what they need help on and where/how to get involved are on the documentation page of the new Symfony 2 website.

PHPBuilder.com: The PHP Content Management/Framework Upgrades in ExpressionEngine 2

Filed under: Development — @ 9:31 am

On PHPBuilder.com there’s a recent article detailing some of the updates in the latest version of the ExpressionEngine product (CMS) from EllisLab.

This popular Web development solution recently took another major step forward with the July 12 release of ExpressionEngine 2.1, the product’s first major upgrade in several years. Version 2 sports a number of new features and significant improvements over its predecessor, many of which I’ll highlight in this article.

He touches on a few of the updates in this latest revision:

  • CodeIgniter Integration
  • Redesigned Control Panel
  • Improved Template Management
  • Integrated File Manager and Image Editor
  • Accessories (a sort of add-on feature)

You can find out more about ExpressionEngine on its site.

Site News: Popular Posts for the Week of 07.30.2010

Filed under: Development — @ 8:00 am

Popular posts from PHPDeveloper.org for the past week:

July 29, 2010

Sean Coates’ Blog: A Case of Mistaken Iterator

Filed under: Development — @ 1:48 pm

In a new post to his blog today Sean Coates talks about some of his work with Iterators in PHP and how, despite a bad example in the manual, he solved his issue (and updated the PHP manual too).

In the back end, we have models that connect to CouchDB. These models implement the Iterator pattern to allow easy traversal of a record’s keys. [...] Little did I realize that this implementation is very broken. [...] Over the past few years, I’ve implemented many iterators in this way, using PHP’s implicit array manipulation functions (reset(), current(), key(), next()).

He points out some issues with how PHP handles array index tracking and how, in the previous PHP manual example, it incorrectly checked for “false” against the current array value. His updated version doesn’t have this issue. You can see it here.

TigerFish Interactive: Drupal 6: Posting AJAX callbacks in SimpleTest

Filed under: Development — @ 12:08 pm

On the TigerFish Interactive blog today there’s a new post for Drupal-ers out there about using the SimpleTest plugin for Drupal 6 to run automated tests against Ajax callbacks.

In Drupal 6′s excellent SimpleTest module, a method called drupalPost() allows you to simulate a button press on a form by taking the form’s data and using HTTP POST to submit it. But what if you want to POST data to an AJAX callback URL? By default, SimpleTest checks which submit button you have pressed, but of course, when POSTing using AJAX, you probably won’t have pressed a button!

After doing some searching on a problem he had – submitting a form without the actual form on a page – he decided the best solution was to create a base class that inherits from DrupalWebTestCase. This base class allowed him to make a POST request (via curl) to the page and simulate a form request. The code for the method is included.

Next Page »

Powered by WordPress