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

Seth May's Blog:
The 5 Ws of Data Validation - Part 1
April 26, 2012 @ 11:14:03

With a reminder about the best practice of always validating your data, Seth May has this new post about the "Five Ws" of validation - why, when, where and who.

As web developers, the applications you write are complex data processing engines. They try and convince your users to enter good, meaningful data and to respond in solid, predictable ways based on what was entered. Robust data validation will allow the rest of you application to work effectively. [...] Data is scrutinized in various ways to make sure that it adheres to basic restrictions and to fundamental properties. It's no good receiving a sandwich when you expect a car.

The questions he answers are:

  • Why is Data Validation Important?
  • Where Should I be Validating Data?
  • When Should My Data Be Validated?
  • Who is Responsible for Validation?
  • How Do I Validate My Data? (yes, there's a "w" in there!)
In the real world data is ugly, crazy, and untrustworthy. Your only hope to taming the data beast is to diligently, methodically validate your data.
0 comments voice your opinion now!
data validation series five w reason bestpractice


Kristian Kohntopp's Blog:
Annotations to "Five Common PHP database problems"
August 11, 2006 @ 07:49:33

Building on this article from the IBM developerWorks site talking about "Five Common Database Problems", Kristian Kohntopp adds in some of his own comments for the five common problems from his perspective.

My experience in the field differs slightly from his observations, and so I thought a few annotations may be in order.

Each of the five in the list have large explainations following them, with slightly different takes on what was said before on the subject and sometimes even a few agreements here and there.

0 comments voice your opinion now!
five common database problems annotations five common database problems annotations


IBM developerWorks:
Five common PHP database problems
August 02, 2006 @ 06:08:41

It seems like there's not a site out there anymore that doesn't use a database of some sort. Frankly, they're just a simple way to get the storage you need without the hassle of having to manage the resource yourself. It even comes with its own language to help query the data! Of course, with the good comes the bad, and this new article from IBM's developerWorks site about five common database mistakes.

If only there were one way to use databases correctly... You can create database design, database access, and the PHP business logic code that sits on top of it in any number of ways, and you often end up getting it wrong. This article illustrates five common problems in database design, in the PHP code that accesses databases, and how to fix these problems when you see them.

The problems they discuss are:

  • Using MySQL directly
  • Not using auto-increment functionality
  • Using multiple databases
  • Not using relations
  • The n+1 pattern
Each of the items is discussed and explained with code samples for both the good and the bad side to make comparison easier. Knowing these issues before you develop your system definitely makes it easier, but they're still useful as a tool to fix things as well.

0 comments voice your opinion now!
common five database problems mysql autoincrement relations common five database problems mysql autoincrement relations


php|architect:
Five Top PHP Mistakes
July 21, 2006 @ 06:00:25

New to the A/R/T article repository from php|architect today is this look at the "Top Five PHP Mistakes" from Marco Tabini.

These topics have been beaten to death, and will likely continue to be beaten well after their bones have turned to dust. However, I have never had the opportunity to explore some aspects of PHP that obviously are mistakes-not just to understand their origin, but to analyze their impact on PHP and the way they have been dealt with.

His list of mistakes is:

  • Objects in PHP 4
  • Function Naming Consistency
  • Safe Mode and Magic Quotes
  • Register Globals
  • Lack of Unicode Support

Under each he explains them, noting why they are important enough to mention is the list. He does, however, end on a bit lighter note - the PHP, for all its problems and woes, is just like any other laugnage out there. It has its problems, but its learned from them and, as Marco puts it "has grown because of them".

0 comments voice your opinion now!
top five mistakes safe_mode register_globals unicode objects function name top five mistakes safe_mode register_globals unicode objects function name


IBM developerWorks:
Five common PHP design patterns
July 19, 2006 @ 06:09:24

The IBM developerWorks site brings us yet another fine PHP-related article with this new tutorial today, a look at five common design patterns (and how to use them).

It's difficult to demonstrate the value of patterns using small examples. They often look like overkill because they really come into play in large code bases.

This article can't show huge applications, so you need to think about ways to apply the principles of the example -- and not necessarily this exact code -- in your larger applications. That's not to say that you shouldn't use patterns in small applications. Most good applications start small and become big, so there is no reason not to start with solid coding practices like these.

The five patterns they cover are:

  • the Factory pattern
  • the Singleton pattern
  • the Observer pattern
  • the Chain-of-Command pattern
  • the Strategy pattern
For each, they explain (basically) how it works and include some sample code to show it in action. There's also diagrams showing how the different parts of the pattern relate to each other.

0 comments voice your opinion now!
common five design patterns example tutorial common five design patterns example tutorial


Chris Shiflett's Blog:
PHP Lightning Talks
May 10, 2006 @ 14:49:43

Chris Shiflett has posted some new information about this year's O'Reilly Open Source Conference - this year's Lightning Talks.

If you're attending OSCON this year, be sure to check out the PHP Lightning Talks being hosted by George and Laura.

In the meantime, you can learn all about lightning talks, read some tips on giving lightning talks, or submit a PHP lightning talk proposal of your own to lightningtalks-oscon2006@omniti.com. Proposals are being accepted until 21 Jul 2006.

The talks are collections of 5-minute talks given by the presenters (PHP community) with topics ranging from new ideas to Q&A sessions, even rants. If you'd like to enter your suggestions for a lightning talk of your own, be sure to get them in before July 21st, 2006!

0 comments voice your opinion now!
oscon conference lightning talks five minute oscon conference lightning talks five minute


SecurityFocus.com:
Five common Web application vulnerabilities
May 03, 2006 @ 06:59:25

Sephiroth.it has a quick post pointing out this helpful article on the SecurityFocus site looking at five common web application vulnerabilities.

This article looks at five common Web application attacks, primarily for PHP applications, and then presents a case study of a vulnerable Website that was found through Google and easily exploited. Each of the attacks we'll cover are part of a wide field of study, and readers are advised to follow the references listed in each section for further reading.

It is important for Web developers and administrators to have a thorough knowledge of these attacks. It should also be noted that that Web applications can be subjected to many more attacks than just those listed here.

The list they share contains all of the usual suspects:

  • remote code execution
  • SQL injection
  • format string vulnerabilities (unfiltered user input)
  • cross-site scripting (XSS)
  • username enumeration

For each, they give a definition of what it is and how it's done, a rating on how critical it is, some of the previously vulnerable products, some code examples of how it might work, and some countermeasures/reference material for more information.

0 comments voice your opinion now!
web application vulnerabilities five sql injection xss user input web application vulnerabilities five sql injection xss user input


Heartscripts Blog:
5 Scripts to Start a Webservice
April 17, 2006 @ 13:13:43

In a quick bit of linkage today, the heartscripts blog has posted a new item with references to five scripts to get you started down the road of offering services on your site.

The links are:

  • a URL shortening service
  • One-click hosting service
  • the creation of your own Amazon Bookstore
  • an image hosting service
  • the Million Pixel Page script

For each, there's a brief description given, as well as the link.

0 comments voice your opinion now!
web service scripts five free web service scripts five free


Lukas Smith's Blog:
The top 5 of PEAR bugs
April 17, 2006 @ 06:49:59

PEAR, the large repository of useful PHP libraries, is steadily growing even more in popularity. The PEAR server packages introduced have made it even easier for people to share their own libraries with the world. Unfortunately, all of this useful code doesn't come without a few issues, and in this new blog post, Lukas Smith mentions the top five packages with the most number of bug reports.

The 5 packages with the most bug reports are all pretty popular although the quality of the code varies. They are all also fairly complex and/or large. I have gone through the bugs of most of them now and then to see if I spot an obvious bogus report.

As of the time of this post, the top five are:

  • Spreadsheet_Excel_Writer
  • SOAP
  • HTML_QuickForm
  • Mail_Mime
  • PhpDocumentor

  • Lukas also puts out a call for help, hoping that there are users out there that would like to help conquer these bugs, to help out with making the packages a cleaner place. All it takes is a little time, some inititave, and a glance at the bug reports for the packages to get started.

  • 1 comment voice your opinion now!
    top five pear bugs soap html_quickform mail_mime phpdocumentor top five pear bugs soap html_quickform mail_mime phpdocumentor


    Codewalkers.com:
    Book Raffle - Pro PHP XML and Web Services
    April 03, 2006 @ 07:29:55

    Codewalkers.com has an announcement today about a new book raffle they're doing with a new book from APress - "Pro PHP XML and Web Services.

    On April 7th, we will be giving away five copies of Pro XML and Web Services. This is a great new book authored by Rob Richards and published by Apress. All you need to do in order to get a free copy is to sign up below. We promise we will not use the information you give us for anything other than contacting you if you win.

    There's a bit more about the book, including its table of contents [PDF], the book's home page, and a sample chapter [PDF] for those interested.

    If you're interested at all, be sure to register 0 comments voice your opinion now!
    book raffle xml web services five copies book raffle xml web services five copies



    Community Events











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


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

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