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

Jacob Santos's Blog:
Don't Advocate Inner Classes
August 11, 2006 @ 07:38:43

Jacob Santos talks in this new blog post about something that, if added to PHP, just might be more trouble than it's worth - inner classes.

Inner Classes are contained in parent classes and offer a sort of namespace mechanism for the public and open private class data transfer for private subclasses.

The functionality is already available in other languages, but the question is whether it is needed in PHP. The short answer is no. With PHP execution model, it would further slow down and bloat PHP compilation.

He demonstrates their purpose with some simple examples but also gives the reasons why it would be a bad thing to try to include them, including the better choice of namespaces over inner classes.

0 comments voice your opinion now!
inner classes advocate purpose namespaces choice inner classes advocate purpose namespaces choice


Vidyut Luther's Blog:
PHP Namespaces - Working with external teams and possibly frameworks
March 01, 2006 @ 07:04:27

Vidyut Luther has posted a new item on his blog today that presents a situation he's been given concerning namespaces.

I've run into an issue, or rather a friend of mine has. He asked me for advice, I gave it to him, but I'm curious how others would do this. The problem is this:

Team A, has been working on some code for a few months, Team A has a class called "SomeClass". Team B, is an "outsourced" team, who is writing a SOAP interface to Team A's code. Somehow, due to whatever reasons, Team A and Team B developers didn't talk.

Team B also created a class and called it "SomeClass". These classes are in files called "Aclass.class.php" and "Bclass.class.php" . There are some files, that include both files.. obviously, you end up with a "cannot redeclare class" fatal error.

Vidyut's suggestion was to just to change the class names. Unfortunately, this might not work if there is no communication between the two parties - they cannot come to a compromise on the naming.

He question to the community is "How do you handle an issue of single namespace, or rather no namespace ?"

0 comments voice your opinion now!
namespaces php6 external teams frameworks namespaces php6 external teams frameworks


Codewalkers.com:
Namespaces in PHP
December 05, 2005 @ 07:22:44

On Codewalkers.com today from Matt, there's a new post with a look at the talk that's been flying around about namespaces in PHP.

It has come up many times in the past and it is now squarely on the table again - Namespaces in PHP. If you are interested in seeing this feature come to light, you might be interested to check out php:namespaces.

Namespaces are on the discussion table for PHP6. Why not for a version 5.2? If you feel that Namespaces should be included in PHP and included sooner rather than later, sign the PHP Namespaces Petition.

With the patch that's already been developed by Jessie Hernandez, namespaces in 5.2 is less of a fantasy that one might think...

0 comments voice your opinion now!
namespaces patch petition namespaces patch petition


Christian Stocker's Blog:
PHP is (most presumably) getting namespaces
November 29, 2005 @ 05:28:49

According to this new post from Christian Stocker today, PHP is "(most presumably) getting namespaces".

If you're not subscribed on the internals mailinglist of PHP, you may have missed a (most of the time very ridiculous) discussion about namespaces in PHP. The important part of the whole discussion is, that it looks like PHP 6 is getting namespaces. I don't care that much about namespaces, I prefix my classes anyway, but it's a nice to have certainly.

The annoying part of the discussion (with dozens of redundant posts) was about which namespace separator should be used. [...] Anyway, at the end it boils down to either :: or ::: or as separator, the double colons have some technical limitations, the backslash looks somehow strange.

For those that aren't sure what "namespaces" refers to, think about this example: two PHP files both have the function read() in their classes. If you wanted to use things from both clases at the same time, it'd be impossible - one read() would override the other. Namespaces would allow you to separate them out, referring to them as seperate, distinct items in their own classes...

2 comments voice your opinion now!
namespaces operator namespaces operator


Sean Coates' Blog:
+1 for Shalosh Nekudotayim (Namespaces in PHP)
November 28, 2005 @ 05:46:11

From Sean Coates today, there's this post with his follow-up to some of the issues that have arrised from the PHP Developer's Meeting notes posted the other day.

If you don't read the PHP Internals mailing list, you've probably missed most of the recent discussion on namespaces.

Since you're reading this entry, there's a good chance you've read one of the other posts about the results of the 2005 PDM, though. Of particular interest (especially given the recent Date class debacle) is the point on namespaces.

He mentions specifically one topic causing a lot of discussion - the current suggestion for a namespace operator (the ""), and, of course, the differing of opinions on either side...

0 comments voice your opinion now!
namespaces developers meeting namespaces developers meeting



Community Events





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


tips laravel podcast api zendserver list community introduction symfony deployment install language update release interview framework library series package opinion

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