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

Doctrine Project:
Our HHVM Roadmap
December 24, 2013 @ 11:57:58

The Doctrine project has posted an update about the work being done in collaboration with and to help its performance with HHVM (the HipHop VM from Facebook) and talking about their future plans.

Facebook has been pushing HHVM alot lately, helping open source projects to get their test-suite running 100%. For Doctrine HHVM is particularly interesting, because of the performance gains that the complex PHP algorithms inside ORM would probably get. From my current feeling Doctrine will be the PHP open-source project getting the most gain from running on HHVM. However with the tests not yet passing on the ORM, we can only imagine how big that performance improvement will be.

One of their goals is to be able to run DBAL/ORM on HHVM with 100% passing tests. So far they've been working on Common project functionality and have three as fully supported under HHVM - Collections, Inflector and Lexer. Work is still being done on other parts of the codebase, with the ORM and DBAL being the lion's share of the job.

0 comments voice your opinion now!
doctrine project hhvm facebook orm dbal common

Link: http://www.doctrine-project.org/blog/our-hhvm-roadmap.html

Reddit.com:
Why don't you contribute to PHP?
September 05, 2013 @ 13:26:29

On Reddit.com today nikic asks you why you don't contribute to PHP, that is to the language itself or the community around its improvement.

I know many of you care about PHP and have suggestions about how to improve it. My questions is: What prevents you from writing a mail to the internals mailing list with your suggestion/proposal (or to participate in existing discussions)? [...] I'd be interested in your opinions and hope that things can be improved based on them.

Some of his own examples to kick off the discussion include time constraints, not being able to write the patch themselves and some of the issues with the culture of the internals mailing list. Other suggestions from the comments include lack of confidence in coding skills (C++), the possible lack of interest in the RFC and the current state of the language's codebase.

0 comments voice your opinion now!
contribute language reason common list

Link: http://www.reddit.com/r/PHP/comments/1lsha2/why_dont_you_contribute_to_php/

NetTuts.com:
20 All Too Common Coding Pitfalls For Beginners
November 12, 2012 @ 14:52:59

On NetTuts.com there's a great list of tips and things to keep in mind if you're a budding programmer - a set of common pitfalls to watch out for as you hone your skills.

Regardless of our current skill level, we all were beginners at one point in time. Making classic beginner mistakes comes with the territory. Today, we've asked a variety of Nettuts+ staff authors to chime in with their list of pitfalls and solutions - in a variety of languages. Learn from our mistakes; don't do these things!

The article starts off with some Javascript tips, but quickly gets into some more PHP specific things like:

  • Use Ternary When Appropriate
  • Use Guard Clauses
  • Keep Methods Maintainable
  • Avoid Deep Nesting
  • Don't Overuse Variables

There's also two "extras" thrown in more concerning general programming practices - using methods to represent actions and some basic code readability suggestions.

0 comments voice your opinion now!
common issue beginner developer javascript general


Ulf Wendel:
Not only SQL injection I don't trust you!
September 26, 2012 @ 08:34:59

On his site today Ulf Wendel talks about SQL injection and some comments that came up during a recent webinar about common MySQL mistakes PHP developers make.

Never trust user input! Injection is a threat . You are the new web developer, aren't you?. Never trust user input is the first rule I had to learn as a web developer in anchient times. Injection can happen whenever user input is interpreted or used to compose new data. A quick recap of the #3 mistake from todays Top 10 MySQL Tips and Mistakes for PHP Developers web presentation. A webinar recording should be available in a couple of days.

He points out a few "don't" things to avoid - like directly injecting superglobal values into your query and to remember that not all SQL injections are because of escaping issues. The real key? Validating input - be sure you're putting values into your query that are of the correct type and contain what you expect.

0 comments voice your opinion now!
sqlinjection mysql webinar common mistake


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


PHPMaster.com:
Layer Supertype Pattern Encapsulating Common Implementation in Multi-Tiered Systems
July 04, 2012 @ 17:13:39

On PHPMaster.com there's a new post looking at a design pattern that's commonly in use by developers but they might not know its name - the Layer Supertype pattern and its use in multi-tiered systems.

Inheritance offers a straightforward way to easily spawn a large number of objects that are semantically related to each other without having duplicate code. The concept is ridiculously simple - yet powerful: you first drop as much logic as possible within the boundaries of a base type (usually an abstract class, but it could be a concrete one), and then start deriving refined subtypes according to more specific requirements. [...] Not surprisingly, this repetitive encapsulation/derivation cycle lays down on the formalities of a design pattern known as Layer Supertype.

They describe the "supertype" as a replacement for an overly bloated domain-related model. Their example replaces a PostInterface/CommentInterface with a more generic "AbstractEntity" that handles some of the basics for you - getting/setting, checking a field, setting an ID and outputing the information to an array.

0 comments voice your opinion now!
layersuprtype designpattern inheritance common logic


Court Ewing's Blog:
Common, Cryptic PHP Errors
May 01, 2012 @ 13:09:51

Court Ewing has a new post to his blog describing some of the most common cryptic errors that you might come across in your day-to-day development.

If you've been programming for awhile, then you've probably experienced your fair share of cryptic error messages. It's understandable that building in detailed error messages that are clear to even novice developers is not always a high priority for programming languages when there are so many other features to create and issues to address. The PHP language has decent error messages, but it is by no means an exception to this rule.

The three errors he covers are probably familiar to anyone that's been working with PHP for any length of time:

  • Fatal error: Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM
  • Fatal error: Can't use function return value in write context
  • Fatal error: Exception thrown without a stack frame in Unknown on line 0
0 comments voice your opinion now!
common cryptic error message language


ServerGrove Blog:
Common problems designers have when working with Symfony
May 01, 2012 @ 12:17:28

On the ServerGrove blog there's a new post that helps to bridge a gap between Symfony PHP developers and the designers that might be working with the result of their hard work. The post shares solutions to four common problems the designer might have.

For designers, Symfony2 has been a welcome change from those old flat PHP files. Twig is beautiful, the framework separates the code from the layout, and we no longer have to find our way through lines of PHP code. But if you are a designer working on a symfony project for the first time, these are a few tips that can help you get up and running quickly.

The four common problems they've seen are:

  • How do I disable the toolbar at the bottom of the page?
  • Errors about missing libraries/files
  • No Javascript or no-css showing up
  • A completely blank page
0 comments voice your opinion now!
symfony common problem designer framework


Padraic Brady's Blog:
Interfacing The PHP World Would Be Good
October 27, 2011 @ 11:36:30

Padraic Brady has posted his own response to some of the recent talk about making standard interfaces in PHP applications. His perspective focuses on interfaces and coupling as related to the Zend Framework.

Every PHP framework has it's own unique set of interfaces for common operations such as logging, caching, http clients, filtering, validation, etc. This creates a situation where a framework tends to be loosely coupled but only within the scope of its own interfaces. [...] Loose coupling is therefore a bad joke. It is a narrowly defined concept usually described within the scope of one particular application. We never really apply the concept across multiple applications written with different frameworks because, at that point, the disparate interfaces of both frameworks would immediately make loose coupling unobtainable.

He goes on to talk about a simple example, ZendFeedReader, and how it's very difficult to swap something as simple as the HTTP client out for one from another framework. He mentions the common scapegoat for over-interfacing - Java - and how PHP's is a bit more "practical and flexible" in that department (a good and bad thing).

So yes, common interfaces would benefit PHP and would make framework libraries more interoperable and thus usable within competing frameworks. Hey, if you can't beat them at least make sure you can inject your classes into them. Hmm, still sounds dirty.
0 comments voice your opinion now!
interface discussion common opinion zendframework symfony2


DZone.com:
Debate - How to Interface the PHP World
October 26, 2011 @ 08:33:53

In a new post to DZone.com today Mitchell Pronschinske responds to some comments that were made by Lukas Smith about working with interfaces in PHP and what he sees as an ideal "drop in" solution.

The PHP community was reacting to Lukas Smith's "Interfacing the PHP world" for most of last weekend. [...] It's a pretty major propositon to start 'interfacing the PHP' world. Catch up on the conversation and let us know what you think.

Mitchell summarizes Lukas' thoughts into three points - interfaces in separate repositories, PHP frameworks not adopting 5.3 yet and the customization of method names/naming conventions across frameworks and tools. Another response to Lukas came from Herman Radtke with Lukas following up his original post with "Why Bother?"

0 comments voice your opinion now!
debate interface lukassmith common functionality framework



Community Events











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


framework hack package performance security series opinion install language symfony2 facebook component release podcast hhvm application unittest introduction composer database

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