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

NetTuts.com:
More Tips for Best Practices in WordPress Development
July 25, 2014 @ 09:18:09

NetTuts.com has published a few more WordPress tips and best practices to help you get the most out of your WordPress-based application.

Welcome to the second part of the series. In the first article, we explained the WordPress Coding Standards, how to avoid namespaces collisions, comments in the code, and some basic security tips. Today, we are going to go a bit deeper and write some more code and learn some techniques to improve performance and security of our plugins.

They look specifically at when you should include your scripts and styles, formatting Ajax calls and working with filters and actions. Code snippets are included with each point with links to some other resources for some of the topics to provide more information.

0 comments voice your opinion now!
wordpress bestpractices development ajax scripts styles filters actions

Link: http://code.tutsplus.com/articles/more-tips-for-best-practices-in-wordpress-development--cms-21013

SitePoint PHP Blog:
Best Practices REST API from Scratch - Implementation
July 24, 2014 @ 13:11:22

PHPMaster.com has posted the second part of their best practices in REST APIs series with this new post focusing more on the implementation part of things.

We ended the first part of this tutorial with all the basic layers of our API in place. We have our server setup, authentication system, JSON input/output, error management and a couple of dummy routes. But, most importantly, we wrote the README file that defines resources and actions. Now it's time to deal with these resources.

They move on and add more functionality for creating (POST) and updating (PUT/PATCH) contacts in the system. They also show how to list contacts and add in some search handling allowing for sorting and returning only certain data. There's also some code for pagination handling, locating a single contact record, basic caching and simple rate limiting.

0 comments voice your opinion now!
rest bestpractices api tutorial implementation contacts

Link: http://www.sitepoint.com/best-practices-rest-api-scratch-implementation/

SitePoint PHP Blog:
Best Practices REST API from Scratch - Introduction
July 22, 2014 @ 09:39:12

The SitePoint PHP blog has posted the second part of their series looking at building up a REST API "from scratch". In this latest post Vita Tardia introduces some of the basic topics and the best practices that are around their use.

The current internet ecosystem has literally been invaded by APIs, and for good reasons. By using third party APIs in your products or services, you have access to a ton of useful features - such as authentication or storage services - that can benefit both you and your users. By exposing your own API, your application becomes "part of the mix" and will be used in ways you've never thought before… if you do it the right way, obviously. In this two part series I'll show you how to create a RESTful API layer for your PHP applications, using a collection of real world best practices.

He talks about how a REST API is a "user interface for developers" and the actions the different verbs could take on the same endpoints (PUT, POST, GET, etc). He uses the Slim framework in his examples and helps you get an instance all set up and working. He includes a bit about getting SSL/HTTPS up and running for all requests to the site too. From there he gets into the bootstrapping of the application and the first version of controller handling. He also includes code examples touching on JSON handling, authentication and good error handling.

0 comments voice your opinion now!
tutorial rest api introduction slimframework bestpractices

Link: http://www.sitepoint.com/best-practices-rest-api-scratch-introduction/

PHPBuilder.com:
Top 11 Best Practices for PHP Development
July 07, 2014 @ 18:08:30

PHPBuilder.com has offered the top eleven practices they see as a must for any PHP developer to incorporate.

Right from its inception, PHP was widely used to develop web based applications. Since PHP is a scripting language, one must follow some rules while developing. This article will discuss the best practices that are generally followed in the PHP world.

Their "top eleven" list includes things like:

  • Error reporting should be turned on
  • Meaningful and consistent naming standards
  • Deep Nesting should be avoided
  • Use adequate comments
  • Use Cache mechanism wherever required

You can read up on their full list and the descriptions of each in the full post.

0 comments voice your opinion now!
bestpractices development tips list top11

Link: http://www.phpbuilder.com/articles/application-architecture/optimization/explore-the-top-11-php-best-practices.html

QaFoo Blog:
Testing Find the Sweet Spot
July 18, 2013 @ 11:52:01

On the QaFoo blog there's a recent post interviewing Johann Peter Hartmann, the CTO of Mayflower, about current PHP testing practices and how to find that "sweet spot" that works for your development.

Talking to interesting people spawns ideas and spreads insight knowledge. Therefore, I talked to Johann Peter Hartmann about testing culture and how PHP projects should approach testing in 2013.

They talk about things like:

  • The move from "spaghetti code" to "quality code"
  • A discussion of the current tools
  • Defining a unit testing strategy
  • Test Driven Development

They also talk some about the training that the QaFoo folks provided to help them (Mayflower) work all of this out for their organization.

0 comments voice your opinion now!
unittest bestpractices company organization

Link: http://qafoo.com/blog/051_testing_sweet_spot.html

Brandon Savage:
"Do This, Not That" Now Available!
December 20, 2012 @ 10:50:36

Brandon Savage has officially released his book, "Do This, Not That" - a book targeted at beginners to the PHP language, trying to teach them best practices for some of the most common situations they might come across.

Too many books on best practices read like a manual. They are dry, boring and cover topics that you don't care about. "Do This, Not That" is different. A collection of essays, it highlights those areas for which best practices are either not well known or not well defined. It offers clear solutions that will be easy to implement. I've taken the time to research and identify what I feel are the best practices, and condensed it into a two hour read that will leave you feeling empowered, not exhausted.

If this sounds interesting to you, you can pick up a copy on the official site for about $30 USD and, if you're more of a try-before-you-buy sort, you can read a sample chapter covering type hinting.

0 comments voice your opinion now!
dothisnotthat book published language bestpractices introduction


Joshua Thijssen:
Introducing the REST cookbook
December 13, 2012 @ 10:18:57

In an effort to share the REST-related information he's been helping people out with over time, Joshua Thijssen has created a new resource that's less about the basics of REST and more about how to handle specific situations - restcookbook.com.

This is why I decided to setup a simple website, that pretty much tries to answer any question about REST. It's not completed yet.. Actually, it hasn't got many posts to begin with :), but a start has been made and we will fill it with questions and answers about REST and HTTP issues.

As of the time of this post, it only has a few articles, but they're a good start like:

0 comments voice your opinion now!
rest cookbook resource bestpractices api resource


Brandon Savage:
Private Methods Considered Harmful ("Do This, Not That" Excerpt)
December 10, 2012 @ 11:26:42

A while back Brandon Savage mentioned a book he was writing ("Do This, Not That") to help PHP developers learn some of the best practices associated with the language. Today he's posted an excerpt from the book for your enjoyment.

This great series of highly focused e-books will offer tips, tricks and best practices focused on core areas of PHP development, including databases, security, filtering, regular expressions, configuration and more. Since it will be a series of tightly targeted solutions, developers will be able to pick all, some or just one of the offerings that solves their specific problem(s).

This excerpt looks at private method use in your applications and why they could be considered "evil" if not used correctly.

0 comments voice your opinion now!
book excerpt private method dothisnotthat introduction bestpractices


Community News:
PHPBestPractices.org - A Short Practical Guide
August 23, 2012 @ 10:07:01

There's another site tossing their hat into the "best practices in PHP" ring (the other being PHP The Right Way) with what they call a "short, practical list for common and confusing tasks" in PHP - PHPBestPractices.org.

[Outdated tutorials and information is] one of the reasons why new PHP programmers are so frequently blamed for ugly, outdated, or insecure code. They can't help it if the first Google result was a four year old article teaching a five year old method! This document tries to address that. It's an attempt to compile a set of basic instructions for what can be considered best practices for common and confusing issues and tasks in PHP. If a low-level task has multiple and confusing approaches in PHP, it belongs here.

The site has sections for topics like:

If you're interested in helping out and adding more content to the site, contain the maintainer and let him know.

0 comments voice your opinion now!
guide bestpractices common issues confusing


Anthony Ferrara's Blog:
The Secure Programmer's Pledge
July 17, 2012 @ 12:23:22

Anthony Ferrara has posted a pledge he recommends all developers take to improve the security of their applications.

Every day I come across code that is insecure. Sometimes the code is so hilariously insecure that any 10 year old could break it. I've also gotten into discussions with people who should know better about their practices. It's very, how to put this, disheartening. It's sad that the average developer knows (and cares) so little about proper security practices. So, I've put together a simple pledge (or manifesto, if you'd like).

The pledge includes the ideas of data storage techniques, taking responsibility for user data, reusing existing/tested libraries instead of writing your own and being open to constantly learning. He elaborates on each point, giving a little context for each.

Are you a secure programmer? Do you want to be? Then take the pledge, and fight for the security of your applications. It's all of our responsibility, so do your part!
0 comments voice your opinion now!
security programmer pledge bestpractices



Community Events





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


laravel zendserver podcast release development introduction list series interview framework developer code language conference community api version tips deployment application

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