Posted by sharique on October 28, 2007 at 4:24pm
Drupal is a really good CMS for building almost any kind of site.
What I'm trying to do is to use Drupal as framework like zend or asp.net for developing web applications. Where I just need to include some files to get all drupal functionality, like include of php or C/C++. And to display a block I just call display_block('blockname',...),, like this.
Did anyone has tried this? Is it possible?

Comments
Reach any conclusions?
I develop large scale web applications and have been wondering whether Drupal can be a good generic application framework (not just CMS Framework). Did you ever get any answers or reach any conclusions about this topic?
I'm doing this
Since the beginning of 2009, i'm using Drupal as a framework, but not "removing" the CMS tier. Instead, i use all the benefits of the visual administration and plug my code where my business rules need. And i can say that everyday i get more and more satisfied with my decision to use Drupal for almost anything.
I tried to use what some people call "headless" Drupal, but i really don't see advantages to see Drupal as a framework like CakePHP, Symphony, etc. It's different and that's the real advantage.
See http://awebfactory.com.ar/node/320 for some of the great benefits from using modules like Views, Panels and their great API, with arguments and that sort of things.
This is the style im trying
This is the style im trying to use drupal in. I like having all my settings in code so i can run a code wide search and find in my IDE for any settings that needs to be changed.
I can see many benefits in using drupal but also wish there was more documentation on how to bypass the admin pages for settings and store all settings in code.
It would be nice to not have to search "could be in the admin panel", "could be in the code", "could be in the database" when your looking to update something sitewide.
Code versioning is a must for me too
I've seen some good discussion about how to export settings to code in the Packaging & Deploymentgroup(http://groups.drupal.org/packaging-deployment).
When i say to leverage the admin interface, is to test & create, but EVERYTHING should be exported to code, if you are a talking about big projects, teams working together, etc.
But actually, i'm versioning without problem everything(that i use) but settings. With settings, i'm trying to find the perfect way, but seems that no one have this yet, so i'm using a combination of sql querys in the installation of the module and strongarm.
There is CTools export hook, that i didn't read much about yet, but seems the way many people are exporting things.
For reference, i'm exporting:
* Nodes - with the Features module (http://drupal.org/project/features)
* Views - the module itself provide hook_views_default_views() to do that (http://drupalcontrib.org/api/function/hook_views_default_views/6)
* Context - the module provide a builtin and extreme easy way to export
* Variables - the Strongarm module (http://drupal.org/project/strongarm)
Hi pedrorocha, Very
Hi pedrorocha,
Very interesting post, what has been your experience about this matter after a year ?
I am interested on using Drupal as a powerfull framework that covers the presentation layer and some business logic, but I still don't know how to work with complex relations of data, is it writing very custom modules with custom content types ?
Thanks
Hi @joseche, You can build
Hi @joseche,
You can build your application based on:
- nodes (entities in drupal7) or custom content types
- your own data sources meaning: tables in the main database, other databases, files, distributes data sources like webservices...
Nodes are heavy. I saw recommendations in the past for its use only if you are going to need: taxonomy, comments, node version control, input formats (text formats in D7), predefined templating files naming patterns... All of this can be used with your own data estructures but with a little more effort and coding. Or you can always use a proxy pattern. Views can work with your own tables.
If you have performance restrictions or have a very decoupled data you may go with your own data estructures. Otherwise go for a custom content type (or CCK one). In the las case I recommend D7.
In either cases you may find useful this references:
+ http://drupal.org/project/schema
+ http://drupal.org/project/autoadmin
+ http://www.lullabot.com/articles/module-in-a-box
+ http://www.mattfarina.com/2008/01/08/drupal-without-nodes
+ http://engineeredweb.com/blog/10/3/pluggable-entity-operations-drupal-7
Hope this info is helpful.
Alessandro Mascherpa.