The main dialog class has some OOP problems that could be eas...

Recommend this page to a friend!

      PHP Dialog  >  All threads  >  The main dialog class has some OOP...  >  (Un) Subscribe thread alerts  
Subject:The main dialog class has some OOP...
Summary:Package rating comment
Messages:1
Author:Michael Cummings
Date:2015-01-05 03:12:40
 

 

Michael Cummings rated this package as follows:

Utility: Not sure
Consistency: Not sure
Documentation: Insufficient
Examples: Sufficient

  1. The main dialog class has some OOP...   Reply   Report abuse  
Picture of Michael Cummings Michael Cummings - 2015-01-05 03:12:40
The main dialog class has some OOP problems that could be easily solved. The author explain in the DocBlock that you should not try get an instance of the dialog class but use the factory instead and has the constructor trigger an error but it would be better if the class was just made abstract and the constructor as well. This way PHP triggers a fatal error if someone tries to get an instance of the dialog class and the author still has control over the arguments needed when getting an instance. I feel this limits the utility of the class.

Another area that seems to reduce the utility is some of the plug-in classes seem to do more processing and type check of the user input than others with for example Calendar appearing to do none and has a TODO comment.

On to the method DocBlocks some of them have @public, @protected, etc but no all and none of the properties do. This tags are legacy now anyway and should just be removed.

In the README.txt file it says near the end to download the zip file to get additional documentation in a docs directory and about there being an index.html file as well but neither of them exist in the zip. It might be helpful for readability to change to a markdown format as well or at least not do the boxes around what look to be titles and simplify the code guards wouldn't hurt either.

I notice that PHP Classes is generating some default Composer info you can use but it would probably make the class much more useful if it was actually updated for use with Composer.

One additional thing I think would help is if some unit testing was added. They would probably help point out some other areas that could be improved and would give me and I'm sure other programmers a better feeling when looking to use the classes.

 

For more information send a message to info at phpclasses dot org.