I've read many articles on themes and modules, but now I am just starting to actually do my own custom themes. Despite all this reading, I'm a little fuzzy on some things that I just wanted to clear up before really sinking my teeth into Drupal. Basically, I am a heavy PHP coder and if Drupal didn't have such an amazing community, I'd probably just write my own CMS. My concerns are that Drupal won't give me the flexibility I need to run some advanced custom PHP and Ajax without having to write a module for it - and modules seem like another level of complexity. I've noticed that I can sneak certain amounts of PHP into the actual .tpl file, but certain things like includes don't seem to work and depending on which version of Drupal you use Javascript can be a pain to integrate as well.
The perfect scenario for me would be to design each page of my site in HTML/CSS/PHP as I would normally, leaving areas for content to be inserted dynamically via Drupal -- while still being able to put code on the page as I set fit. So far it seems like that is possible, but I'm not sure if I need a module or not. Do I have the wrong idea here?
Thanks in advance.
Comments
Don't be scared of writing modules
Modules themselves aren't complex. Sure some things that you can do with the Drupal API can be complex, but if you are doing that stuff anyway it can be simpler to do it in a module than trying to force it into a theme. And frankly it completely breaks the clean separation of functionality that themes and modules have.
Drupals API is designed for easy extensibility with modules - thats what they are there for. If you want to code extensions to the Drupal core, you will be making things unnecessarily difficult (if not impossible) for yourself if you artificially avoid using modules.
Modules are just collections of PHP functions. Drupal has a function naming convention for deciding which of those functions are 'hooks' that should be run at certain times. The rest is just details :)
--
Anton