VersionControl_SVN review
Published 2004-09-23 22:48:48
I've been having a little attempt revamping my subversion viewer, seeing if I can
- Integrate it into the new site
- Use VersionControl_SVN, rather than the quick hack I wrote, Subversion_Stream.
- Uses PEAR_ErrorStack, which hides errors, even worse than PEAR_Error used to.. DataObjects uses a ErrorStack style system, you can print_r the dataobject, and it shows you the last error as a propery of the object... (simple).
Error stack seems to insist on you loading it, then only using it's methods to check stuff. - the actually error is hidden away in the stack object..
Trouble is, that a number of the functions in DataObjects needed to return true/false (fetch, for example), so returning an PEAR_Error, was problematic then (in hindsight, alot of the other methods should have returned PEAR_Error, but that broke BC - and in the future it should throw exceptions).
So, DataObjects had some logical justification for messing with the standard a little, VersionControl_SVN hasnt really, and it just adds a dependancy on a eventually redundant package.
- Trying to make things easy ending up with a messier API,
$x = VersionControl_SVN::factory(array('list','cat'), $options);
$x->list->run()....
while this is cute, it adds an horrific amount of complexity to the API, and only saves you a little bit of typing, at the expense of clarity and readibility. - Counterintuative program flow.
- direct API mapping makes it a little unclear how it should work:
example -
require: svn list -v {mysite}
command:
$svn->list->run(array({mysite}), array('v'=>true));
(and if you get it wrong, not much happens)
ok - how is this simpler than:
$svn->run('list -v ', $mysite);
class VC_SVN {
.... function run() {
....... $this->prepare();
....... exec in here..
....... $this->parseOutput();
}
VC_SVN_List extends VC_SVN {
..... function prepare() {
So you call run on the base class, and the body of what happens is in the extended class. - so if you look at the 'action' classes, it is impossible to follow the flow of the application, without having a perfect memory of the base class..
it would have been far better to have a run method in each action class, and call some generic methods from the base class.
Mentioned By:
google.com : VersionControl_SVN (198 referals)
google.com : december (54 referals)
google.com : april (53 referals)
google.com : php VersionControl_SVN (22 referals)
google.com : php exec svn (18 referals)
google.com : PEAR_ErrorStack (13 referals)
google.com : PEAR_ErrorStack example (13 referals)
google.com : VersionControl_SVN examples (9 referals)
google.com : using VersionControl_SVN (7 referals)
google.com : how to use VersionControl_SVN (6 referals)
google.com : versioncontrol_svn php (6 referals)
google.com : pear_errorstack examples (5 referals)
google.com : exec svn php (4 referals)
google.com : pear VersionControl_SVN (4 referals)
google.com : php exec "svn list" (4 referals)
google.com : php exec svn list (4 referals)
google.com : using PEAR_ErrorStack (4 referals)
google.com : VersionControl_SVN.php (4 referals)
google.com : VersionControl_SVN::factory (4 referals)
google.com : using pear_Error (3 referals)
google.com : VersionControl_SVN (198 referals)
google.com : december (54 referals)
google.com : april (53 referals)
google.com : php VersionControl_SVN (22 referals)
google.com : php exec svn (18 referals)
google.com : PEAR_ErrorStack (13 referals)
google.com : PEAR_ErrorStack example (13 referals)
google.com : VersionControl_SVN examples (9 referals)
google.com : using VersionControl_SVN (7 referals)
google.com : how to use VersionControl_SVN (6 referals)
google.com : versioncontrol_svn php (6 referals)
google.com : pear_errorstack examples (5 referals)
google.com : exec svn php (4 referals)
google.com : pear VersionControl_SVN (4 referals)
google.com : php exec "svn list" (4 referals)
google.com : php exec svn list (4 referals)
google.com : using PEAR_ErrorStack (4 referals)
google.com : VersionControl_SVN.php (4 referals)
google.com : VersionControl_SVN::factory (4 referals)
google.com : using pear_Error (3 referals)
Follow us
-
- Some thoughts on the language server and its usefulness in the roobuilder
- Roo Builder for Gtk4 moving forward
- Clustered Web Applications - Mysql and File replication
- GitLive - Branching - Merging
- PDO_DataObject Released
- PDO_DataObject is under way
- Mass email Marketing and anti-spam - some of the how-to..
- Hydra - Recruitment done right
Blog Latest
-
Twitter - @Roojs