Which external frameworks does Drupal use, if any?
Theme-wise there are a couple of very good base themes that make use of SASS/Compass (and therefore Ruby) such as


Omega, and
Zen


(I prefer Omega, having just discovered its power).

There are some good integration modules such as LDAP for single sign on, and loads of third party service integrations from paid services such as MailChimp.

But, when it comes to handling the database and rendering pages, the core system really shines.  I'd really recommend learning Drupal's database API because it does an excellent job of defusing potentially unsafe queries and is quite easy to use once you get the hang of it.

[edit] Another resource I keep going back to time and again is the form API.