| Page 1 of 1 | [ 7 posts ] |
|
Hi,
Thomas Koch @ YMC
I'm sorry I've to write this message, but you set me in trouble. I wanted to use this weekend to learn about YUI3 and the PHP Loader to prepare an introduction for our company. I'm a big fan of YUI and have learned a lot about Frontend Engeneering from you folks at YAHOO. Therefore it made me really sad when I looked at the mess that is the PHP loader. I want to convince my collegues, that YUI is a great library. That we should maybe use it more instead of Prototype and jQuery, because it's cleaner and more elegant. But when they get to see the PHP loader, they will laugh at me and all this YUI mess. I believe, that YUI is of much better quality then the PHP loader and that you'd do all of us a great favor to abandon the current incarnation of it. It's better not to have anything but this. So the list of issues: There's absolutely no reason in 2009 to publish any code with PHP4 support. The use of the $GLOBALS variable when defining the libraries metadata, as well as defining global functions in combo.functions.inc.php is shocking! The nesting of if and foreach structures in combo.php goes down six levels. This is much more then I'd accept in our own inhouse code. It's not on your side to end my application with die() statements in loader.php! I wanna decide myself, when and how my application ends. You left debug statements and even old code in code comments: e.g. loader.php:380 There is an empty method in loader.php:389 There are methods without docblocks. This is argueable, but I think that a methodname should always contain a verb. Methods should not be too long for different reasons. One could argue what too long means, but I think getAllDependencies from loader.php is way too long. Wow! The method sortDependencies is such a mess it leaves me speachless. |
Kristopher Ives
|
I've looked at the code to PHP Loader, and I agree it's not very good and doesn't reflect YUIs code on the front-end. I've been making major changes to the code myself, many of the changes related to what you're talking about. Mostly the PHP4 stuff is what irritates me.
|
|
I believe PHPLoader is opensource and anyone can contribute to improve it, that's the whole Idea behind open source.
also Quote: Methods should not be too long for different reasons. One could argue this is absolutely incorrect what too long means, but I think getAllDependencies from loader.php is way too long. |
|
@levancho:
Thomas Koch @ YMC
a) I did not consider the name of the method getAllDependencies too long, but the method code. It's nearly 100 lines of code. b) Your it's-open-source-so-fix-it-yourself argument is in general right, but doesn't solve the problem that the name "YUI" suffers from the current state of the PHP code. It would be much better, if the YUI team would just call it a prove of concept and give it a "beta" sign to indicate that it is likely to change. |
|
Hi ,
I did not meant to sound rude, just my understanding on "opensource"-ness is following: PHPLoader is excellent source that YUI gave to community for us to elaborate on it further, to extend it, port it , and make it better, nothing is perfect, even PHP language itself, common, its 2009 and php still does not support unicode natively ,Java supported it from version 0.0.01 but those shortcomings should give community motivation to improve it. regarding methods, sorry I misread it, yes usually methods should not be too long, but than again it is PHP after all , not Java, or other "real" programming language |
|
PHP Loader is not a new effort. A version of it has been in use internally for some time now. PHP 4 was in wide spread usage when the loader was initially developed and there are still legitimate PHP 4 use cases internally. I do agree that it would be beneficial to develop a new PHP 5 version based on the learnings from the current version and in the process remove reliance on globals.
We just recently got approval to open source PHP Loader and it is still in beta. We will continue to refine it and in the meantime hope to get valuable input, patches, bug fixes, suggestions, etc from the YUI community. As we work toward beta 2, we've been doing some general cleanup. The latest github commit removes the old debug code and adds docblocks for all the various variables, methods, etc. It also contains an updated set of API documents. |
|
Thanks for clearing that up. If the loader is beta then we can work to clean this up. However I did not find the string "beta" on http://developer.yahoo.com/yui/phploader . I think it could help to mention the beta status there.
Thomas Koch @ YMC
Best regards, Thomas |
| Page 1 of 1 | [ 7 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group