[pLog-general] On php5...

su baochen subaochen at 126.com
Mon Nov 8 14:35:39 GMT 2004


在2004年11月08日的01:05,Oscar Renalias写道:
> Hello,
> 
> I have decided to start the php5 thread based on Su's first few 
> comments... Hope Su doesn't mind :-)

Never mind:-)

> 
> > 1 Will only work under php5, because I use some php5 concepts such as
> > abstract, static, final, private... and etc.
> 
> As I said, we shoulnd't release anything which can only be run in php5 
> for a while but that doesn't mean that we shouldn't work on it. A php5/ 
> branch in svn sounds like the best idea to me. Would you like to take 
> care of it?

I agree that php5 is not so popular by now, but things always change
faster than our imagination:-).

For a php5 branch of plog, I vote +1 and like to take care of it;-).

Now, first step, how to name the new branch? any idea?

> 
> > 2 Rename class name according to its real class name, borrowed from
> > java. Such as, action.class.php -> Action.class. I rename the class 
> > name
> > because:
> > a) Borrowed from Java:-)
> > b) I want to use phpunit2, and this is a must change.
> 
> you mean, you transformed the class names to upper case?

Yes, transformed most of the class by now, but not all, because I want
to do step by step.
> 
> Also, are you writing unit tests? If so, that sounds very good and it's 
> about time somebody did it!

I DO think unit test is very important, also borrowed from Java.
I have tested phpunit2, seems good, how about build out unit tests based
on phpunit2?

Yes, writing tests maybe tedious, and time consuming, but the project
will benifit from it in a long run view of point.
 
> 
> > 3 Add module support, and move admin class,view and etc to
> > modules/admin,sumamry action,view and etc to modules/summary,other
> > module can be added too. More generally, I think only plog core classes
> > should be putted into class directory, others should be treated as
> > modules or plugins.
> 
> I don't quite agree with this but I think we could discuss about it...

If only considering blog system, moudle support maybe redundent. I want
to add module support because:

1 New branch of plog will not only a blog system, but also an
application framework for php to develope more complex system.
2 Module support is easy to implement:-)

But, I have no idea which is suitable,module or plugin?

> 
> > 4 And, I give up log4php,but using PEAR::Log, because I just can not
> > make log4php work under php5:-(, but PEAR::Log works fine.
> 
> There are several classes borrowed from PEAR in the code but I have 
> never been very fond of PEAR as a framework itself. First of all, 
> because plog is already based on its own framework so we already have 
> our own Object, Execption, etc classes, there is no need to carry the 
> burden of additional PEAR, PEAR_Error, etc classes. If you take a look 
> at things like class/data/Date.php, or class/xml/parser/Parser.php, 
> you'll see that I spent some time removing all references to PEAR in 
> them...

> Also, another negative opinion about PEAR: 
> http://www.sitepoint.com/blog-post-view.php?id=172065
> 
> What was the reason for log4php not to work in php5? I understood that 
> the last version was supposed to work fine... I liked the package very 
> much and I don't think we should get rid of it just like that! 
> Specially after you recommended it so strongly!!!
> 
> Would you care to reconsider your decision?

In fact, I also prefer to log4php, but I can not make log4php works
under php5. If anyone help to point out how to run log4php under php5,
many thanks in advance:-)

And, for PEAR::Log, this is just a log utility, very similar with
log4php, but much smaller than log4php.

I think before log4php can work under php5, we can use PEAR::Log as our
log utility for php5 branch plog(again, we need a name for this
branch:-)). And when log4php is ready for php5, replace PEAR::Log with
log4php is very easy, just change few codes of object class, all other
class will not be involved in.

In another word, PEAR::Log is the only PEAR package I added to the new
branch, and can be treated as a temperary solution.

> 
> > I'd like to open another thread to discuss porting plog to php5, anyone
> > interested in it?
> 
> We can consider this first message as the start :-)

PS, how about write some documentations for the new branch, such as
roadmap, code style guide and etc?

> 
> Oscar
> 
> _______________________________________________
> pLog-general mailing list
> pLog-general at devel.plogworld.org
> http://devel.plogworld.org/mailman/listinfo/plog-general
-- 
su baochen <subaochen at 126.com>





More information about the pLog-general mailing list