News Feed
Jobs Feed
Sections




News Archive
feed this:

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

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


International PHP Magazine:
Poll Question The Rules of PHP Throwdown Include
December 05, 2006 @ 15:46:00

The International PHP Magazine has posted the results from their latest poll of the week. This time they asked the slightly odd question of opinions on the PHP Throwdown event - "The Rules of PHP Throwdown Include".

Seems like the question might have confused some others because the votes were notably lower than in some previous weeks. There was a tie for first place, though - both coming in with 6.8% of the votes were the "You can use PHP4 or PHP 5, MySQL or SQLite, Ajax, HTML, XHTML, and Javascript but no Flash" and "All" options. Dead last with no votes was the "All applications must be licensed with a CC compatible license" option.

They've also posted a new poll for this week asking which of the options you think still ring true when it comes to PHP:

  • PHP administrators like to compile PHP in Summer
  • Register global is not dead
  • memory_limit is not used
  • PHP applications handle 100 Mb files

0 comments voice your opinion now!
throwdown rules poll question php5 mysql ajax html license throwdown rules poll question php5 mysql ajax html license


Joshua Eichorn's Blog:
Official WebThumb Contest rules published
October 23, 2006 @ 13:56:00

Joshua Eichorn has posted the official contest rules for the WebThumb Contest announced a short while back.

The contest runs until November 30th, and the top 5 submitters will all win upgraded WebThumb accounts. The top submitter will also win a copy of my book, Understanding AJAX.

Since previously, all that was required was a comment on this blog entry, people who've posted there need to listen up - an official submission needs to be made. Check out this page for the complete rules and all of the information you need to include in the submission email.

0 comments voice your opinion now!
official contest rules posted webthumb api demo application official contest rules posted webthumb api demo application



Community Events











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


security application overview hhvm symfony2 component opinion code example package unittest introduction facebook language framework release composer podcast hack install

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