ramblings on PHP, SQL, the web, politics, ultimate frisbee and what else is on in my life
back

Getting that darn thing documented

Well I am very happy to announce that LiveUser and LiveUser_Admin are now very well documented. Not completely yet .. but sufficiently to get anyone going to a very advanced level. Better yet, Dominique is still constantly adding new stuff.

MDB2 however is currently fairly undocumented. Since its based on the DB and PDO API you can manage by looking at these docs. So for example MDB2 uses the same DSN format as DB. Of course MDB2 has full API docs, but especially since the class hierarchy is fairly complex this can be hard to navigate. Some aspects are documented like the supported datatypes, but not what these data types natively map to for each RDBMS. Some aspects have been mentioned in talks I have held.

MDB2_Schema is also fairly undocumented. I do plan to refactor the API slightly eventually, but I am looking for feedback here and I fear its hard to give feedback without giving people a good overview of what is there. The XML schema format is decently documented though.

So I guess what I am looking for is people willing to help in documenting MDB2. In what ever format they please. Preferably in peardoc, alternatively inside the MDB2 wiki or as html or plain text. Whatever gets the job done.

The main tasks are as follows:

  • convert the introduction tutorials in the DB documentation to MDB2
  • note that the tutorials will obviously need to be expanded to cover some of the added MDB2 features ..
    • expand the sequences tutorial to also cover the auto increment based alternative methods
    • expand the fetch tutorial to talk about custom wrapper classes (especially Iterators)
    • expand prepare tutorial to mention oracle style placeholders
    • etc .. this can be enhanced one by one
  • add new tutorials for how the module loading works
  • add tutorial for each of the modules (extended, datatype, manager, reverse, native, function)
  • add overview page for each drivers explaining the specific DSN formats, options, native data types and other peculiars of the given RDBMS in the quest for portability
  • add tutorial explaining all the standard options like unbuffered queries, multi queries, custom wrapper fetch classes, sequence and index name formats
  • write tutorial for special features like subSelect(), replace(), getServerVersion(), standaloneQuery(), internal debugging

I think that is the bulk of the work to get solid MDB2 documentation. While the list may seem long, starting with porting the DB documentation should quickly get up a nice basis on which one can expand later on.

As for MDB2_Schema it would probably not be all that much work. Just explaining the core public methods and concepts.

I wonder what could motivate someone to step up here? I am willing to help, but I must admit that the task seems too heavy to lift on my own. I would even be willing to donate up to 100 Euros in total to pay for some wish list items for people who make significant contributions to this effort.

Comments



Re: Getting that darn thing documented

Hi Lukas, I think the prepare/execute stuff also needs some docs ;-)
I wrote some lines of code using the autoPrepare() and had some trouble with the module loading but probably due to some mistakes in my __autoload() implementation... ;-)

I think the best would be to give some examples to solve 'typical problems'.. insert, update, queryRow|All... etc. this seems to be easy but took me some time to learn to use all these nice features, datatypes, sequences and so on..

I think I can add some kind of a basic quick start info to the wiki.. Merely I stole these basic information from MDB2_Schema, LiveUser and even the WebBuilder.

Cheers,
Matthias

Re: Getting that darn thing documented

I could help port the DB tutorial examples to mdb2, if nobody else is doing it?

--
Regards
Lars Olesen