CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • RFC: Cheatsheet for application developers
Pages: 1 [2]

Author Topic: RFC: Cheatsheet for application developers  (Read 3161 times)

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Re: RFC: Cheatsheet for application developers
March 23, 2011, 07:27:42 pm
I like phpdoc and how the http://api.civicrm.org/v3/ looks.

I think we should push it one step futher though

1. Should provide good description and possibly code sample *or where the function has been called
2. A search interface by method name that will return classname::method_name or classname->method_name.

I think doing these 2 things can help greatly encouraging more developers to be involved in the project.


Back to Lobo: Be gladly to participate in this documentation team thingy :)



Cheers!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: RFC: Cheatsheet for application developers
March 23, 2011, 07:37:07 pm
Hey - did you see the link to code samples - e.g from activity create? I did try to do those inline (ie. like the schema in the same function) on my local machine & managed it but the same thing didn't work on the server so it would need some love if it were worth doing.

NB - I saw directing someone to this http://arms.dl.locker10.com/devel-doc/cheatsheet.html  on IRC so there's already some traction
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: RFC: Cheatsheet for application developers
March 24, 2011, 09:01:59 am
civicrm_api_{entity}_{action} are NOT supposed to be called directly.

Call civicrm_api ('entity', 'action', $params) it will do what's needed and call the right function.

If some zendstudio/sed guru wants to add automatically a line of comment DON'T CALL DIRECTLY, call civicrm_api ()

before each function, might avoid some problems

X+

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • RFC: Cheatsheet for application developers

This forum was archived on 2017-11-26.