News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Phil Sturgeon:
What is The League of Extraordinary Packages?
October 16, 2014 @ 10:48:29

In his latest post Phil Sturgeon talks about a project that's been running for a while, the The League of Extraordinary Packages and aims to clear up some recent misconceptions about the group and what they strive for in the projects they endorse.

This is the story of group of friends, who decided to write some code, but somehow confused and angered everyone with a keyboard. [...] Where should I release this code [I was super excited about releasing]? Should I release it with a vendor name of Sturgeon? That seemed rather egotistical. I could make something up, but what is the point of a single vendor with a single package? I wondered if any of my buddies were having this problem. [...] Being as hungover as I was, I thought long and hard, for about 5 seconds until something amazing happened in my brain... The PHP Super Best Friends Club! The guys loved it, and we started making plans immediately.

He goes on to talk about The League and some of the goals of the organization including the stated desire for quality code and a constant stream of work on the project (no abandoned or stale projects). He talks about how some of the rules for inclusion were created and some of the members of the various projects it includes. He then gets to the "recent misunderstanding" part of things with the clash of the League and the PHP-FIG (see here). He clears up some of the confusion in that thread by stating that:

  • League != PHPClasses
  • League != PEAR

He finishes off the post talking some about the leadership of the group (hint: it's an organization, not really run by a person or persons) and some of the work he's doing to ensure the future of the League and the packages it includes.

0 comments voice your opinion now!
league extraordinary packages phpclasses pear compare rules community

Link: https://philsturgeon.uk/blog/2014/10/what-is-the-league-of-extraordinary-packages

Paul Jones:
Some Rules For Good Naming
April 30, 2014 @ 09:29:42

Paul Jones has a new post to his site today talking about the importance of naming when it comes to the use of different patterns in development. He also makes some recommendations to help clear up some of the confusion around different names for the same things.

[Thoughts in a] Grumpy Programmer mailing-list essay got me thinking. [...] I completely agree with the emphasis on using a common vocabulary. One issue here is that naming things properly is very, very hard. It is one of the only two hard problems in programming. Are there any rules (even rules-of-thumb) that can we use to make it easier to pick good names for the classes and concepts in our projects?

He reminds readers that code is no place for a "novel context", that is that it's not meant to be instructions for humans, but instructions for computers. He points out that patterns are more about behavior than the name you give them and that picking a name that's "close enough" isn't a good idea. He also recommends that you avoid picking a name for a special context the code might be involved in.

0 comments voice your opinion now!
naming rules opinion designpattern behavior context

Link: http://paul-m-jones.com/archives/5952

SoftLayer Blog:
Four Rules for Better Code Documentation
September 24, 2013 @ 12:07:56

On the SoftLayer blog today there's a new post with some recommendations for better code documentation - four tips to help make things clearer and cleaner.

Last month, Jeremy shared some valuable information regarding technical debt on SLDN. In his post, he discussed how omitting pertinent information when you're developing for a project can cause more work to build up in the future. One of the most common areas developers overlook when it comes to technical debt is documentation. This oversight comes in two forms: A complete omission of any documentation and inadequate information when documentation does exist. Simply documenting the functionality of your code is a great start, but the best way to close the information gap and avoid technical debt that stems from documentation (or lack thereof) is to follow four simple rules.

Their four recommendations cover several aspects of documentation:

  • Know Your Audience
  • Be Consistent - Terminology
  • Forget What You Know About Your Code...But Only Temporarily
  • Peer Review

They've also provided some examples of what they're talking about with PHPDocumentor-formatted comments.

0 comments voice your opinion now!
code documentation rules suggestion phpdocumentor phpdoc

Link: http://blog.softlayer.com/2013/four-rules-for-better-code-documentation

Project:
CodeSniffer for PSR's (PSR-0, PSR-1 & PSR-2)
June 09, 2012 @ 11:17:50

Klaus Silveira has created a set of PHP_CodeSniffer rules that can be used to test your code for the recently approved PSR-1 & PSR-2 standards.

This is a PHP_CodeSniffer sniff to check against the PHP Standard Resolutions: PSR-0, PSR-1 and PSR-2. Those standards were approved by the PHP Framework Interoperability Group. You can read more about the PHP FIG and the PSR's on this excellent article by Paul Jones.

The github repository also provides an overview of the standards themselves and how to get these sniffs installed.

0 comments voice your opinion now!
psr codesniffer rules psr0 psr1 psr2


Refulz Blog:
Yii Framework - Scenarios for Conditional Multiple Validation Rules
April 24, 2012 @ 09:18:49

On the Refulz blog there's a post showing you how to set up conditional multiple validation rules in a Yii framework application.

I am yet to write the last article of the Yii Session series. I just decided to write something about the scenarios in the Validation feature of Yii framework. Scenarios are a very useful tool for adding different validations rules for different cases on the same model. In a real life situation, you would require one validation rule for user registration but the same rule might not be applicable to the User login. Scenarios help you define validation rules for different situations within same model.

He shows you how to set up a "rules()" method in your model and a few validation configurations inside it - ensuring the password and email are set, checking the length of the password, etc. Then, by calling the "validate()" method on the model, you can easily apply these rules and check the pass/fail status.

0 comments voice your opinion now!
yii framework validation model rules tutorial


Kevin Schroeder's Blog:
What programming rules should you ALWAYS follow?
November 09, 2011 @ 09:20:37

In a quick new post today Kevin Schroeder asks his readers for feedback on what programming rules you should always follow in your development practices.

Earlier today, more for my own interest, I asked the question on Twitter "What programming rules should you ALWAYS follow, regardless of the scenario you're working in?" In other words, are there programming rules that you ALWAYS should follow. It doesn't matter if it's a script to copy a bunch of files for a one time migration or if you're building the next Facebook (DON'T try to build the next Facebook. You will fail miserably. Build something else). In other words, what was the purist of programming rules.

Responses he received ranged from the simple to slightly more complex including:

  • Always comment your code
  • Test your code
  • Use source control
  • "Think. Think again. Then write code"
  • Use a good debugger to help track down problems
  • Make effective use of logging/output
0 comments voice your opinion now!
programming rules opinion recommendation twitter


Anson Cheung's Blog:
Optimize Web Site Performance by using YSlow
October 03, 2011 @ 11:12:08

In a recent post to his blog Anson Cheung guides you through another tool that can help you optimize your web applications - using YSlow for the frontend to detect trouble spots early (whether they're actually caused by the frontend or not).

He goes through the thirteen rules to help improve your website's performance including:

  • Make fewer HTTP requests
  • Gzip components
  • Make JS and CSS external
  • Remove duplicate scripts
  • Configure ETags

For more information about the YSlow extension (available for Firefox, Chrome, Opera and mobile devices), check out the project's page on Yahoo's Developer section (including ten more rules it checks).

0 comments voice your opinion now!
yslow optimize frontend performance extension browser rules


Noupe.com:
Ten Simple Rules for Choosing the Perfect CMS + Excellent Options
July 13, 2009 @ 12:13:56

Noupe.com has a few suggestions for you when you go to pick out your next content management system with ten guidelines that can help:

The content management system you choose can really make a huge difference in how much time you (or your clients) spend keeping a site updated and maintained. There's a huge variety out there-some estimates put the number at around 1700 different options. Some are great...some, not so much.

Among the suggestions are things like:

  • A CMS needs to work intuitively.
  • The backend needs to be logical and well-organized.
  • The right CMS shouldn't have a ton of extra functionality you'll never use.
  • The right CMS should be easy for non-geeks to use.
  • The pages it creates should be fast-loading and have simple code.

They also mention a few options available that might be a good fit for you and your organization: WordPress, SilverStripe, Joomla! and a few more.

1 comment voice your opinion now!
suggestion cms choose rules


Jonathan Snook's Blog:
Multiple Validation as Behavior in CakePHP 1.2
July 31, 2008 @ 08:44:30

Jonathan Snook has posted an update to a previous post about validating multiple input fields at the same time in a CakePHP application. This update changes the way the validation is handled and moves it over into a Behavior.

Using the new behavior is much like using the script as it was before. You can name the validation properties to include the action name and it'll automatically set that validation set as the default.

His behavior lets you define validation rules, both included in a default set and as callbacks. He includes an example of its use and the full code (all thirty lines of it) for the behavior itself.

1 comment voice your opinion now!
multiple validation behavior cakephp framework rules


Nick Halstead's Blog:
PHP Programming Contest - Win Zend Studio
June 14, 2007 @ 07:11:13

Nick Halstead has announced a contest on his blog today for PHP developers everywhere to participate in - a programming competition surrounding a challenge he's created.

It has been a lot harder than I thought to come up with a fair programming challenge that would not take too long or require lots of knowledge in any particular framework or other associated technology. It could have been to make use of a whole host of currently available API's and to make a useful mash-up but these again require other external knowledge beyond just PHP. I finally settled on a logic problem that is hopefully not too hard to solve but will test a range of PHP skills.

The problem he's worked up involves changing a word, one letter at a time, into another word using user-defined lists and choice of word. There's several requirements you'll need to follow an d rules for things like the submission process and what server setup can be used.

So, what's the motivation? First prize is a copy of Zend Studio Professional and a year of support, second prize is a Zend t-shirt, and third is a Zend Pen. For full information on participating and on all of the rules you'll need to follow, check out Nick's full post.

0 comments voice your opinion now!
zendstudio programming contest rules prize problem solve zendstudio programming contest rules prize problem solve



Community Events





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


release introduction framework package install update community laravel interview language opinion tips deployment zendserver podcast symfony series library list api

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