Sep 08, 2008, 10:54 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: [1]   Go Down
  Print  
Author Topic: API documentation suggestion  (Read 1266 times)
0 Members and 1 Guest are viewing this topic.
Mitch
Full Member
***
Posts: 220


« on: Apr 21, 2006, 01:03 PM »

I have a suggestion for the API documentation. In most API calls I miss an explanation about what the return value of a function actually is. For example http://www.modxcms.com/dbapi-update.html From the information about the function I don't know what the value of $rows_affected is supposed to be after I call the API function. Does it return the number of rows that were updated? Does it return true if the update was succesfull and false if the update failed? The only way to figure it out is by reading the code Sad

The nice thing about an API is that you don't have to know about how the function is implemented, only how you need to call it.

Also the code that is shown in the documentation does not match the code in MODx itself. I would suggest to remove the code from the documentation. It is just too hard to keep it in sync with each release and is not needed cause if someone wants to have a look at the code you can just look into the MODx code.
Logged
OpenGeek
MODx Co-Founder
Foundation
*
Posts: 4,675


looking a little more like my avatar again...


WWW
« Reply #1 on: Apr 21, 2006, 02:37 PM »

Hello Mitch

Points well taken and agreed.  MODx 1.0 is in development and will feature a new object-oriented API complete with proper API documentation including descriptions of variables, parameters, and return values.  This will be generated automatically when we build a new release of MODx from 1.0 forward, so multiple versions of the documentation can be maintained in archives for back-reference, and the latest will always be available from the site.  And since the API documentation will be generated from the code comments, all the information will also be available to programmers who prefer to check out the code.

I'll try and get some of the current documentation updated for the 0.9.5 release in the interim, but can't make any promises.  If someone wants to volunteer for such a task, feel free to contact me via PM to discuss.
Logged

Jason Coward
MODx Co-Founder
xPDO Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
If you think of yourselves as helpless and ineffectual, it is certain that you will create a despotic government to be your master. The wise despot, therefore, maintains among his subjects a popular sense that they are helpless and ineffectual.
  — Frank Herbert
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!