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

Anthony Ferrara:
Beyond Object Oriented Programming
November 12, 2013 @ 11:56:36

Following up on his previous post talking about going "beyond inheritance" in object-oriented development in PHP, Anthony Ferrara has a new post extends the subject, focusing more on types of classes and how his thoughts would apply.

In the last post Beyond Inheritance, we talked about looking past "types" and reasoning about objects differently. The conclusion was that inheritance wasn't necessary for OOP, and often results in more problems than it solves. Well, let's go beyond that and explore more of what will come from treating objects as containers of behavior. Let's look at what this means for various kinds of classes.

He looks at five different class types and gives a brief summary of the concepts they represent - Representers, Doers, Plumbers, Translators and Makers. He then shifts over to investigating how this all applies to the SOLID development principles. He follows this pattern of thought through and looks at how it breaks things down into decomposable behaviors and, ultimately, functional programming/code structures (including the suggestions that creating ValueObjects is directly related).

0 comments voice your opinion now!
beyond oop types solid development functional valueobject

Link: http://blog.ircmaxell.com/2013/11/beyond-object-oriented-programming.html

Jani Hartikainen's Blog:
How to use built-in SPL exception classes for better error handling
May 09, 2011 @ 08:47:12

On his blog today Jani Hartikainen looks at how you can use the SPL exception types to allow for better overall error handling in your application. Things like BadMethodCallException and OutOfBoundsException make the errors much more descriptive.

Since PHP 5, there has been a bundle of built-in exceptions - the "SPL exceptions" - in PHP. However, the documentation for these classes is quite lacking in examples, and it can be difficult to understand when you should be using them. The short answer is always.

The list of exception types he recommends include:

  • BadMethodCallException
  • DomainException
  • LengthException
  • OutOfRangeException
  • UnexpectedValueException

For each he gives an example usage of it, sometimes including a bit of code to illustrate.

0 comments voice your opinion now!
spl standardphplibrary exception handling classes types


DZone.com:
What you must know about PHP errors...
March 04, 2011 @ 13:15:06

Giorgio Sironi has a new post to the DZone.com Web Builder Zone today giving a high-level guide to some of the PHP errors you could encounter in your development time.

While pure object-oriented languages produces mainly exceptions to signal an error, PHP started out as procedural and so it has a wide range of errors that can be raised along with exceptions.

He talks about a few of the most common error related issues:

  • Exceptions
  • Errors
  • Error Types (E_NOTICE, E_PARSE, etc.)
  • php.ini directives
  • PHP functions for setting error handlers
0 comments voice your opinion now!
error exception phpini types errorhandler custom


Ralph Schindler's Blog:
Exception Best Practices in PHP 5.3
September 16, 2010 @ 10:26:17

Ralph Schindler has put together a new post for his blog about some of the best practices for using exceptions in PHP 5.3 - specifically dealing with some of the new functionality that comes with this latest PHP version.

Exception handling in PHP is not a new feature by any stretch. In this article, we'll discuss two new features in PHP 5.3 based around exceptions. The first is nested exceptions and the second is a new set of exception types offered by the SPL extension (which is now a core extension of the PHP runtime). Both of these new features have found their way into the book of best best practices and deserve to be examined in detail.

Some of the features he talks about were pre-PHP 5.3, but the focus is largely on these new features. He gives a bit of a background on exception handling in PHP and how custom exceptions could be thrown. He then moves on to the new features - first nesting exceptions and then some about the new core exception types (found here). All that being said, he includes some code to show the dynamic/logic/runtime exceptions in action including a look at best practices in library exception handling.

0 comments voice your opinion now!
exception bestpractices spl types logic dynamic runtime library


Jani Hartikainen's Blog:
The three types of programmers
August 13, 2009 @ 14:48:08

In this recent post from Jani Hartikainen he looks at the three different categories he sees developers fitting into - "smart-and-get-things-done", smart and "just a" programmer.

The other day I was thinking of programmer types. In a way, I think there are three kinds of programmers when looking at a high level [...] So how do you determine if a programmer goes into one of these categories?

The "just a programmer" is the developer that writes code because it's a better job with little passion. The "smart programmer" are talented developers but they miss the big picture things. The "smart and get things done programmer" can be the most ideal of the three - they're the ones with the vision and passion to really make great applications.

0 comments voice your opinion now!
types programmers smart justa get done


Chris Hartjes' Blog:
What Is Really Considered Documentation?
July 23, 2008 @ 10:26:33

In this new post, Chris Hartjes takes a look at something that is one of the banes of most programmers' existence - documentation. In it he wonders what should really be considered documentation and the importance of it.

As a committed user of open source technologies, the difference between me using something and not using something is the documentation. Is there documentation for it? Is it easy to find? Does it answer my questions? Is there someone I can call an idiot if I disagree with the level of documentation? These are all very important questions.

He uses the illustration of the documentation of the CakePHP framework that's helpful, but only really after you learn how to use the framework in the first place. He mentions people on both sides of the fence - those that love the framework and love the documentation and those that moved on to something simpler because they just couldn't get it.

He also mentions the variety of sources that can provide "documentation" for the framework when you're getting a bit stuck - everything from blogs to The Bakery to a different sort of documentation, unit test.

0 comments voice your opinion now!
consider documentation types cakephp example unittest manual blog


Xaprb's Blog:
Four types of database abstraction layers
August 14, 2006 @ 07:55:26

In this new posting from Xaprb's blog today, there's a look at four different types of database abstraction layers, each with their own unique strengths.

Quite a few people have chimed in on a recent discussion about PHP, MySQL, database abstraction layers, and performance. I think enough viewpoints have been covered that I don't need to comment, but one question I don't see answered is "what are the qualities of a good SQL abstraction layer?" I think it's a very interesting - and complicated - question. As it turns out, the term has several meanings, and I think it's important to understand them.

The four types he lists are:

  • Libraries that provide access to a database
  • Libraries that present a common interface to different server software
  • Libraries that write portable SQL
  • Object-relational mapping software
Each has their own description and example packages that show the strength. Following these notes, he shares some opinions on each, mentioning his likes and dislikes about the state of support for them.

0 comments voice your opinion now!
database abstraction layer four types opinion database abstraction layer four types opinion


PHPBuilder.com:
PHP Filtering with OWASP
June 29, 2006 @ 06:15:37

On PHPBuilder.com today, there's a new tutorial that looks at a method to protect your PHP applications with the filters the Open Web Application Security Project provides.

OWASP (Open Web Application Security Project ) released a top ten list for web application security vulnerabilities in 2003 and 2004; you can find the latest information about their Top Ten Project here.

Most of the top ten vulnerabilities including (A1) Unvalidated Input, (A2) Broken Access Control, (A4) Cross Site Scripting (XSS) Flaws, and (A6) Injection Flaws, can be avoided by using these filters.

They walk through the installation before talking about the types of filters at your disposal - paranoid, SQL, system, HTML, int/float, UTF-8, and LDAP. The check() function looks at the inputted value to see if it passes the test (the other option the function takes).

They also give an example of combining filters as well, making more secure validation even easier.

0 comments voice your opinion now!
filtering security open web application project check types filtering security open web application project check types


SitePoint PHP Blog:
PHP to the Rescue!
May 01, 2006 @ 07:34:45

In his latest post on the SitePoint PHP Blog, Harry Fuecks has linked to a rather long look at error codes and exceptions in PHP, courtesy on Damien Katz.

If you're looking for a thoughtful Saturday read, you won't go far wrong with Error codes or Exceptions? Why is Reliable Software so Hard? by Damien Katz, which is worth it just for the visual interludes.

In fact it's less about error codes / exceptions and more about what you do when something does go wrong-how to you "bail out" of the mess you're in?

There's a few different error handling types that Damien mentions

, including the "Get the Hell Out of Dodge" Error Handling, "Reverse the Flow of Time" Error Handling, and "Plan B" Error Handling as well as some suggestions to help you and your code cope.
0 comments voice your opinion now!
error handling codes exceptions reliable software tips types error handling codes exceptions reliable software tips types


Jim Plush's Blog:
MyBic Goes Charitable - Work an hour for the kids
April 25, 2006 @ 07:05:26

After having his MyBic PHP/Ajax framework, Jim Plush has decided to use some of this popularity to drive some charitable work for some underprivileged kids at a school that it wife works with. He specifically mentions some with more technology-related needs, such as a specialized left-handed keyboard.

So, how can I help, you ask yourself sitting there behind your keyboard? Well, it's simple, really - Jim has set up a CafePress shop with some great t-shirts for purchase - and 100% of the funds made from the shirts will go right back to the kids at the school.

Slogans on the shirts include:

  • "You're so Web 1.0"
  • "You should be tested for latency"
  • "I used XMLHttpRequest() when it was underground"
  • "I was going to put a bunch of cool tech words on this shirt, but you wouldn't know them anyway"

    When donations are made, the results of them will be shared with contributors via pictures of how they're actually helping.

  • 0 comments voice your opinion now!
    mybic charitable donate t-shirt cafepress types school mybic charitable donate t-shirt cafepress types school



    Community Events











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


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

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