News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
feed this:

Community News:
Drafts of PSR-1 (and prelim PSR-2)
May 11, 2012 @ 13:17:08

In the wake of the success of the PSR-0 standard (used in autoloading structures across frameworks and various applications), the PHP-FIG (Framework Interoperability Group) has start on drafts of other standards to help provide some guidelines to standardize PHP development across projects.

Among the group, Paul Jones has been writing serveral proposals under the PSR-1 standard banner that include:

If you want to know more about the PHP-FIG group, you should listen to this excellent panel interview of the group from the Voices of the ElePHPant podcast. Paul and others get into the point of the group and how the standards are progressing.

0 comments voice your opinion now!
phpfig interoperability group psr0 psr1 psr2 pauljones



Developer.com:
Creating a Custom ACL in PHP
May 11, 2012 @ 10:53:23

On Developer.com there's a recent tutorial showing you how to create a basic access control list in PHP (not in any specific framework). It allows you to define not only user permissions but groups and group permissions as well.

So, what are the advantages of an ACL model? The first advantage is security. Using this model will make your application more secure and less vulnerable to exploits. When securing any program, it is good to give to the user only the privileges he/she needs. That means that, for example, you should not give super administrator privileges to someone who will only manage website content. The ACL security model allows you to do just that. The second advantage is the easiness of user management. You can divide users into groups, while each group has certain access permissions. Also, you can easily add new user groups, delete the old ones or change group permissions.

They include the database structure you'll need to make the backend work (four tables) and the code to create an "Acl" class with methods to check a user+group for a permission, get the permissions for a user and get the permissions for a group. It's a pretty simple system and has a lot more that could be added to it to make it more robust, but it's a good start.

0 comments voice your opinion now!
custom acl access control permission group tutorial database


Voices of the ElePHPant Podcast:
FIG, FUD & FOMO
May 01, 2012 @ 14:01:25

On the Voices of the ElePHPant podcast, the latest episode has been released - FIG, PUD & FOMO, a discussion with members of the PHP Standards Group: Matthew Weier O'Phinney, Jeremy Lindblom and Paul Jones.

Cal's questions center around the Standards group and what kinds of discussions they have about the language and the progress the group has made so far (like PSR-0):

  • What's the purpose of the group?
  • Is the purpose of this group to take PHP from everyone's hands and enforce the "one true grace" on everyone?
  • Is the group fulfilling its purpose or is it wandering off the path?

You can listen to this latest episode either via the in-page player, by downloading the mp3 or subscribing to their feed.

0 comments voice your opinion now!
voicesoftheelephpant podcast standards group panel discussion


Mike Purcell's Blog:
PHPUnit - How to Run PHPUnit Against a Specific Test
February 01, 2012 @ 08:37:03

Mike Purcell has a quick new post to his blog showing how you can run PHPUnit on one specific test using handy grouping functionality already built into the tool.

The other day I was debugging an error in one of my unit tests, and found it hard to track down because when I ran PHPUnit, it ran all the tests contained in the file where my problem unit test was located. After some Googling and reading the PHPUnit Api Docs, I found that you can specify a test, among other tests, by adding a comment with the @group annotation.

Using this "@group" annotation tells PHPUnit to combine these tests and allows you you specify a "--group" setting on the command line to only run those. He includes some sample code showing how it can be used. This can be very useful for combining results for certain kinds of tests (say, all related to bugfixes) without having to run everything all over again.

0 comments voice your opinion now!
phpunit specific test group annotation


PHPMaster.com:
Practicing Regular Expressions with Search and Replace
November 23, 2011 @ 14:27:59

On PHPMaster.com today there's a new tutorial that shares a few regular expression tips about doing some search and replace in your content.

So how can you practice using regex if you are limited to just using them in your code? The answer is to use a utility, of which there are many, that uses regex for performing search and replace. I'm sure everyone is familiar with the standard "find x and replace it with y" type of search and replace. Most IDEs and text editors have built in regex engines to handle search and replace. In this article I'd like to walk through a series of exercises to help you practice using regex.

His examples are based on Netbeans but can be used in just about any IDE that supports regex (or even just your code). He shows how to match word boundaries, do some grouping, work with back references and doing some search/replace based on multiple groupings.

0 comments voice your opinion now!
regular expression practice search replace boundaries group backreference


Robert Basic's Blog:
Grouping Zend Framework controllers in subdirectories
April 18, 2011 @ 09:08:25

Robert Basic has a new post today showing you how you can group your controllers in your Zend Framework application into subdirectories for easier organization.

Thanks to a discussion on the Zend Framework mailing list I learned about a new feature, a feature that allows for grouping action controllers in subdirectories! Well, this is more of an unknown and undocumented feature than new, as it is the part of the framework for at least 3 years. Why am I so hyped about this? Because it allows for better code organisation on larger projects. Heck, it might be useful on smaller ones too.

He gives an example of how it might be laid out and a few helpful hints he learned when trying it out:

  • The subdirectory separator in the URI is the underscore and not the slash.
  • The subdirectory name is uppercase: Subdirectory, not subdirectory. In the URI it's lowercase.
  • The view directories for these subdirectories are lowercased, and not uppercase.
0 comments voice your opinion now!
zendframework controller subdirectory group


php|architect:
php|architect Announces the First Annual Impact Awards
April 01, 2011 @ 09:51:12

php|architect has announced a new effort they've launched to recognize the groups and projects in the PHP community that have had an impact. The Impact Awards is a yearly effort to recognize those contributions.

In short, we at php|architect recognize that we are standing on the shoulders of giants. We build our site, our training and our magazine using tools created by developers who are giving freely of themselves. We want to recognize a few of those who have had an impact specifically on the PHP community. The full details can be found on the Impact Awards page. Voting is open through the end of April to all php|architect subscribers. The winners will be announced at php|tek '11 in Chicago.

To vote, go over to the Impact Awards site and pick from their selections of people from categories like: the groups around various frameworks, integration/development, data management and up and coming projects. The winner will be presented with an actual award as designed by Toronto-based architect Alex Ilievski.

0 comments voice your opinion now!
impactawards group technology recognize award


CodeIgniter.com:
The Official CodeIgniter Fork
November 18, 2010 @ 09:52:50

According to this new post on CodeIgniter.com, EllisLab is announcing an official fork of the current CodeIgniter framework that will be driven by a group of six community members.

Yes, you read that right, EllisLab will be creating a CodeIgniter fork. For you. By you. We need six talented, opinionated, critical coders from the community who have a heavy personal and/or professional interest in CodeIgniter's ongoing development to act as deputies for the repository. [...] You can also nominate someone else for one of the six seats by emailing the above information on their behalf.

EllisLab will be going over the applications for the next few weeks and may ask the community to help them narrow things down. An NDA will have to be signed by the selected group and a rollout of this new fork is planned for sometime in Q1 of 2011.

0 comments voice your opinion now!
codeigniter fork official community group ellislab


Gonzalo Ayuso's Blog:
Pivot tables in PHP
January 25, 2010 @ 08:45:51

In this new post today Gonzalo Ayuso shows how to make "pivot tables" (at least the concept) in a PHP script to modify a data set and transform it into something else.

It's not very difficult to handle pivot tables by hand but the work is always the same: groups by, totals, subtotals, totals per row... Now I want to write a class to pivot tables in PHP with the most common requirements (at least for me).

His examples takes a few rows of records from a MySQL result and shows how, with the help of a library he's developed, he can make a few commands and fetch just the data he needs including the column to pivot on. A few more examples are also included.

0 comments voice your opinion now!
pivot table tutorial library group


Greg Beaver's Blog:
How to put the FAIL in open source
November 19, 2009 @ 10:04:53

There's been a lot of controversy around the PHP Standards group that was formed around May of 2009 and how they've handled the decision making process. They want to provide a standard that frameworks and other applications can follow to help making them all play nicely together a much easier process. Unfortunately, they decided to go the "closed source" way. Greg Beaver has posted some of his thoughts on their approach.

The idea is a wonderful one, and at first things looked like they were nothing but good. [...] At this point, signs of trouble began to crop up, and the good intentions began to result in a chill on the openness with suggestions of reducing input through moderation and discussions of who was a "member" of the standards group. [...] Since then, I have made several pleas, off-list and some on, to open the discussion and move things back to the way open source and specifically PHP works.

Greg's comments are shared by several in the community who wonder why something that could be such a key point for so many applications only involved a handful of the community. Be sure to check out the comments to hear the community voicing some of their own opinions on the subject, both for and against the way the standards group has been handled so far.

0 comments voice your opinion now!
opensource opinion standards group



Community Events





Don't see your event here?
Let us know!


introduction conference language zendframework application symfony2 testing podcast opinion framework voicesoftheelephpant phpunit unittest api zendframework2 interview injection community release database

All content copyright, 2012 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework