I’m asking myself the same question.
It was very easy for me to learn Drupal API because
- it’s pretty well documented.
- There is a very great book to learn it step by step
http://drupal.org/node/137201
I really don’t know how to use modx API for know, but i would say that
- modx is coded with POO : this far much interesting for a CMS because you can override methods, extends class etc...
- it’s harder to get how things are working if you had never used designs patterns with POO. Even if drupal is somehow "MVC" (database abstration and functions are the model part, hook_menu is the controller part, theme functions are the view part), it is far much easy to understand. You create a page with a hook menu, then write functions tp retrieve datas, then output result with a theme function. No big deal...
- Drupal has a lot of hooks because it doesn’t let to what you want most of the time. Instead, he is doing things you have to destroy( with hooks like form_alter and such) before you can rebuild something clean. So, if you know what you want, you have to implements a lot of hooks ! With modx, most of the time, you just to WHAT YOU WANT, modx doesnt add a lot of stuff you don’t need.
So the moment where you need to write php is later thant with Drupal