Zenphoto API:
* With the help of phpdoc I created a the Zenphoto API documentation as a PDF file.
Questions:
* The PDF file size is 1080235 kb... to big for the Zenphoto Wiki? (Limit of 25600kb?)
* Also a better readable html is available, how to include it in the Zenphoto?
* How to improve the Zenphoto Wiki? It seems to me that only text and attachments are possible...
Comments
That said, send me a zip of the HTML pages and I will host them on zenphoto.org! It will be good to have even if incomplete. My email is trisweb at zenphoto's domain name. Thanks!
Email is on the way...supprising for me is, even with less comments the API PHPDocu is
very usefull (at the first glance).
Let my ask some additional questions:
* It seems to me that the Zenphoto Code is a mix of objects/Classes and functional parts.
Are you moving the code to more object oriented perception?
* How usefull will be an API Documentation? Apperently just one developer (you?) is
working on Zenphoto? If yes an API will be uninteresting for most people in the
Zenphoto forum. I use PHPDoc to get a better understanding of the Zenphoto Code Base.
* How can I support you with the further development? Now I still try to improve Exif.
1) Zenphoto uses Object-orientation where it makes sense. The representations of Gallery, Image, and Album are objects, but most of the things that deal with their control are functional. There's no reason to use objects for everything when it makes more sense for parts to be functional, like the template functions, or common utility functions. So no, I'm not "moving the code to more object oriented perception" -- it was designed exactly that way from the beginning, and it's not becoming any more or less so (until perhaps version 2.0 with a revised model and more classes of objects, but even then objects will only be used where they make sense).
2) The main use of an API doc will be for the template functions -- if I comment them enough, the PHPdoc output will be very useful, as people will be able to see exactly what each function does for their themes. Also, the class documentation will be useful for theme developers, since you can still skip the theme function layer and use the classes directly for advanced operations. Plus they will be useful for people wanting to help develop (and I want people to do that), submit patches, and understand the codebase better. So yes! Very useful.
3) You're doing great so far, if you could keep updating the PHPdoc when I add more comments that would be good, I'll let you know when I do, or you can keep track of SVN. Also, I'll try to integrate EXIF with the database so it's easier to work on with Zenphoto. Next step, just try to understand the code and begin to see what could be improved, what could be faster, etc.
You also mentioned speed problems in your e-mail -- Zenphoto is very fast algorithmically, but currently works off the filesystem, which could be a major speed bottleneck. In version 2, I'm planning on making it *based* off the database, with periodic and strategic disk checks to have the same kind of "automatic albums from folders" feel to it, but faster.
Thank you for your detailed answer and thank you for compliments. Also every
information is appreciated.
Code:
The last couple of hours I investigate your PHP Code... very powerful. I struggle a
little bit to understand the flow/structure of the different parts, but it's up to me
and my "good" PHP Skills. Is it possible to ask you a bunch of questions in a separate
topic in the next days?
Exif:
As you know, I use the Exif extension to become more familiar with Zenphoto.
Where will be the best place to put the Exif Code? Inside the Image Class? (function like addExif?). There's a place in your code where you put the image info inside
MySQL, we could extent this with the additional Exif infos...
Performance:
After using a http Performance Tool, it seems that your right. The replies are fast. If
you are interested in the Performace Details, let me know. A PHP profiler would create
more information.
PHPDoc:
Would it make sense to help you with add. code comments and also with starting to
include the PHPDoc tags? But this brings up the question how to merge this into your
code base.
Please ask any questions about the code you like, I'd be happy to answer them.
About Exif, I really would like to integrate it myself, in the way that other metadata is currently done, just to keep everything consistent. You're right, it would be in the image class as a method (most likely `getExifData()`). Fairly simple to do, so I'll take care of it.
Performance should be fairly good as I said, it would be interesting to use a profiler to see what operations are taking what amount of time, if you could do that it would be very helpful.
Commenting the functions would be great! You can actually just start a Wiki page with the comment above the function name, with the filename as a section header or something. Then I can copy them into the code. I'm not quite ready to give you SVN commit privileges yet ;-)
:-)
It seems to me that PHP and Ajax is a very powerful combination but also complex to
investigate.
Exif:
Looking forward to see Zenphoto 1.1
Comments:
Before I can start to comment the code I need a better understanding what is
behind the scene. With the help of firebug I make "reverse engineering".
Questions:
Will come...and thanks in advance for any answer/help.