[Solar-talk] Move Solar.php to Solar/Solar.php ?

Paul M Jones pmjones at ciaweb.net
Wed Sep 5 19:30:43 CDT 2007


On Sep 5, 2007, at 6:50 PM, Clay Loveless wrote:

> On Sep 5, 2007, at 4:21 PM, Paul M Jones wrote:
>
>> On initial consideration, I'm not sure that we *can* get rid of  
>> it.  Solar::factory() and Solar::dependency() and Solar::registry 
>> (), for example, are key underpinnings.  Having to type a longer  
>> prefix class-name would be a bit  of a hassle.  (Yes, I know that  
>> "more to type" is not a good reason, but still.)
>
> Yeah, that would be a bit irritating ... but the benefits of being  
> able to more easily unit test a base class that didn't rely on  
> static methods might outweigh the burden of extra typing.

Nitpick: it's an "arch" class, not a "base" class.  ;-)

Having said that, unit testers will tell you that statics are to be  
avoided entirely, if at all possible, so moving from a arch-class of  
static methods to one or more (sub-)classes of static methods is not  
much of a gain.

Even so, moving *some* of the arch-class functions (e.g., the file- 
related ones) to their own class does make sense to me.  But that  
doesn't help with the original point; i.e., how best to help out the  
svn:externals folks.



--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.  <http://solarphp.com>

Join the Solar community wiki!  <http://solarphp.org>

Savant: The simple, elegant, and powerful solution for
templates in PHP.  <http://phpsavant.com>




More information about the Solar-talk mailing list