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

SitePoint PHP Blog:
Keeping Your PHP Code Well Documented
February 19, 2014 @ 10:15:19

The SitePoint PHP blog has a new post by Jacek Barecki talking about documenting your code and some suggestions for keeping this documentation useful.

Pretty much every PHP developer writes comments along with the actual code. But the language itself doesn't impose any rules on how to do so. You just have to wrap them around some specific tags and then you can write any content you want. So what exactly should be put in the comment blocks to keep them useful? Which parts of the code should be documented and which shouldn't? In this article I will present some important rules which may help you in keeping your PHP code well documented and understandable.

There's three suggestions included in the article, each with a bit of explanation and a few screenshots to illustrate:

  • Write code that explains itself
  • Keep the balance
  • Remember about the doc blocks
0 comments voice your opinion now!
documentation understandable useful tips tutorial

Link: http://www.sitepoint.com/keeping-php-code-well-documented/

Volker Dusch:
If it's not written in PHP it's irrelePHPant!
November 20, 2012 @ 09:11:51

Volker Dusch has a new tongue-in-cheek post to his site talking about a few pieces of useful software that are not written in PHP...and why not?

Dear PHP Community, we need to have a talk about the insufferable state of your software stacks. It was recently brought to my attention that there is software out there, software we use every day!, that is NOT written in PHP. This is completely unacceptable! We are PHPeople! We're not "Web" Developers, we are the web. And we sure as hell are not some fancy "Software Developer", you can ask anyone on the internet! Seriously: If it's not PHP how will we ever be able to extend and adapt it to our needs! We are slaves of our tools!

He mentions several tools that, yes, while not written in PHP are very useful to just about any developer out there (including git, Puppet and Apache). But, more seriously:

PHP is a language that enables absolute beginners to start creating on the web using FTP and notepad! It let's us realize and validate our ideas blazingly fast and allows us to adapt our successful ideas to beautifully scale with our requirements providing and relying on solid, battle-proof tools.
0 comments voice your opinion now!
written language useful tools git travis apache puppet jenkins opinion


Anthony Ferrara's Blog:
To Comment Or Not To Comment - A Tale Of Two Stories
June 08, 2012 @ 11:02:20

In this recent post to his blog Anthony Ferrara looks at commenting in your application's code and how to be effective (and not so effective) when using them.

A few weeks ago I was sparked into a twitter conversation with Larry Garfield (@Crell) about the value of comments in code. [...] A pretty innocuous comment [about code that doesn't have comments] that is quite insightful. [...] That led to an interesting discussion that just couldn't fit on twitter. So let me explain...

He defines what he means by "comments" (DocBlock, general comments and legal information) and what sort of things should be inside of them. He also points out a few things not to do in you comments including being overly descriptive and restating what the code is doing (they should be less about that and more about the "Why"). Of course, there's exceptions and he touches on those briefly to finish out the post.

0 comments voice your opinion now!
comment code opinion useful


Phil Sturgeon's Blog:
Why Write A New Framework?
April 11, 2011 @ 11:30:37

Phil Sturgeon, a developer on the Fuel framework project, has a new post to his blog asking a common question of all developers that set out to make the "Next Big Framework" - why write a new framework?

So we all know that the internet is full of frameworks. They've been the popular thing for the last 5 or 6 years and it seems to have become the "barrier for entry" or the "passage of rights" that 8 or 9 years ago used to be "hey I just wrote a phpBB clone!". There are plenty around but in this day in age, why would anyone write a new one? As somebody involved in a new PHP framework - Fuel - that has shaken a few opinions up I thought it would be interesting to share my thoughts and views on the situation.

While he agrees that there are plenty of other frameworks out there, maybe too many to choose from, he thinks that there's value in making something that's useful to you and the toolsets you're already used to. One of their goals with Fuel is to "make PHP as fun to use" as possible and things like built-in migrations and scaffolding (along with a command-line tool, Oil) help towards that goal.

A framework is essentially a way to put all of your best practises into a single place so that you can reuse them over and over again. This should make you more efficient and make your time more financially viable to clients. If the framework you use slows you down or does not cater for the way you like to develop then sack it off and do your own thing.
0 comments voice your opinion now!
opinion fuelphp framework new existing reinventthewheel useful


CatsWhoCode.com:
10 super useful PHP snippets
April 05, 2011 @ 08:38:10

The CatsWhoCode.com blog has a new post today with what they call super useful PHP snippets that could help you out in a pinch.

Having the right code snippet at the right time can definitely be a life saver for web developers. Today, I've compiled 10 really awesome PHP code snippets that will, I hope, be very helpful in your forthcomming developments.

Their list of ten includes bits of code for:

  • Super simple page caching (file-based)
  • Convert seconds to time (years, months, days, hours...)
  • Get current weather using Google API
  • Get latitude and longitude from an address
  • Save url to PDF
2 comments voice your opinion now!
snippet useful helpful


Developer.com:
10 Powerful PEAR Packages
December 02, 2010 @ 09:06:27

On Developer.com there's a new article with what they think are the top ten PEAR packages that every developer should know and use in their applications.

PHP developers also have another community-driven treasure trove at their disposal, one which is host to almost 600 high-quality libraries yet never seems to garner the attention it deserves. I'm referring to the PHP Extension and Application Repository, better known as PEAR, and in this article I'll try to shine the spotlight just a bit brighter on this fantastic community resource by highlighting 10 useful PEAR libraries (better known as packages) that have become an indispensable part of my programming toolkit.

Included in their list of "Top Ten" are things like:

0 comments voice your opinion now!
pear package topten useful


Web Builder Zone:
5 features of PHP that seem hacks, but save your life
November 02, 2010 @ 08:40:00

On the Web Builder Zone today there's a new article that talks about five things that, while they may seem like hacks in your development, they might come in very handy in the right situations.

Ilia is one of the people that get his hands dirty in the PHP core, and PHP has indeed many overlooked features. [...] However, thinking about this load of features inspired me to write this article: I'll include here 5 features that at first seem an hack, but can save your life while coding in PHP. In fact, you probably use or will use them every day without noticing.

His list of five is made up of the access our scripts have to private properties via Reflection, using eval, the __DIR__ constant, the fact that a closing "?>" isn't needed and the fact that PHP has "__sleep()".

0 comments voice your opinion now!
hack feature language useful overlooked


John Hamelink's Blog:
Top codeigniter libraries I can't live without.
July 26, 2010 @ 14:12:28

In a new post to his blog John Hamelink lists top CodeIgniter libraries he couldn't live without in his framework development.

CodeIgniter is a great framework. I use it exclusively because of it's flexibility and relative 'lightness' but what use is a framework without libraries to extend its usefulness? (well, not much use, naturally.) Here is my personal list of CodeIgniter libraries I would struggle to live without.

His list includes:

1 comment voice your opinion now!
codeigniter library opinion useful


Stefan Koopmanschap's Blog:
Your error page can be better
May 10, 2010 @ 09:16:53

Stefan Koopmanschap has shared some of his thoughts on something that a lot of sites could be doing better - making their sites fail gracefully.

Error pages. Most people don't really consider error pages when building a website or application. They usually contain some debug information so that when something goes wrong the developer knows what is wrong. But in a lot of cases when an application goes into production, this information is still exposed.

He points out a specific example of a recent time when the only thing thrown to the page was an error about a database connection rather than anything more informative or useful to the typical visitor. He recommends that, at the very least, a website should still present these errors in a template similar to the rest of the site.

Your average visitor will come to your site expecting information. If something goes wrong (which can always happen), they only need to know that something went wrong, and perhaps they should get a phone number or e-mailaddress where they can report the error.
0 comments voice your opinion now!
error page useful opinion suggestion


CatsWhoCode.com:
8 useful code snippets to get started with WordPress 3.0
April 13, 2010 @ 14:56:31

On the CatsWhoCode.com blog today there's a list of 8 useful snippets of PHP code you can use in the upcoming WordPress version - 3.0 - to take advantage of the new features it includes.

WordPress 3.0, scheduled to launch May 1st, 2010, will be a real revolution for the blogging system. With new functionalities such as custom post types, developers will be able to create more complex and more powerful sites based on WordPress. In this article, I have compiled the most useful resources to get you started with WordPress 3.0.

These eight code snippets deal with:

  • Create a custom post type
  • Custom post types with custom taxonomies
  • Query custom post types
  • Enable multisite feature
  • Custom author profiles
  • Add custom backgrounds
  • Style WordPress editor using CSS
  • Make your theme compatible with WordPress 3.0 menus

You can find out more about WordPress 3.0 on the project's site.

0 comments voice your opinion now!
wordpress useful snippet code blog



Community Events





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


laravel api conference bugfix language framework symfony tips voicesoftheelephpant interview library release deployment developer community podcast introduction series list zendserver

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