Hello,
Can you use Drupal core as a PHP development framework? Suppose you want to create a custom in-house web application which is not necessarily going to be a Drupal module. What would you use?
I am the maintainer of a custom PHP application. It's quite poorly written and I'm stuck maintaining it. I have been thinking that I'd like to rewrite it from scratch. I don't *need* any third party software to rewrite it, but it occurred to me that the final product might be better if I used a good PHP development framework. So I started googling for PHP application frameworks and I hit a Wikipedia page saying that some people use Drupal as a development framework. So I thought I'd ask about that here. Any thoughts?
I don't have a solid idea of what I'm looking for. I'm just looking to see what's available.
Cheers, Daniel.
I tend to think of Drupal as (at least) two things: 1) A web/PHP platform/framework and 2) A CMS constructed using that framework
On Fri, Dec 19, 2008 at 9:51 AM, Daniel Carrera daniel.carrera@zmsl.comwrote:
Hello,
Can you use Drupal core as a PHP development framework? Suppose you want to create a custom in-house web application which is not necessarily going to be a Drupal module. What would you use?
I am the maintainer of a custom PHP application. It's quite poorly written and I'm stuck maintaining it. I have been thinking that I'd like to rewrite it from scratch. I don't *need* any third party software to rewrite it, but it occurred to me that the final product might be better if I used a good PHP development framework. So I started googling for PHP application frameworks and I hit a Wikipedia page saying that some people use Drupal as a development framework. So I thought I'd ask about that here. Any thoughts?
I don't have a solid idea of what I'm looking for. I'm just looking to see what's available.
Cheers, Daniel. -- [ Drupal support list | http://lists.drupal.org/ ]
Without knowing what the PHP application does makes it difficult to answer.
But you might possibly be better off reverse-engineering a clear set of features / user stories, and then the question would be, can I implement these features using Drupal.
Drupal can serve as a CMS Application Framework, but since it is extensible, and uses the module architecture to add more functionality to core, you will have to write a module, which either uses Drupal functionality or else hooks up Drupal to your via some form of integration. Both will require modules, which simply means code running in the Drupal namespace.
Victor Kane http://awebfactory.com.ar
On Fri, Dec 19, 2008 at 12:51 PM, Daniel Carrera daniel.carrera@zmsl.comwrote:
Hello,
Can you use Drupal core as a PHP development framework? Suppose you want to create a custom in-house web application which is not necessarily going to be a Drupal module. What would you use?
I am the maintainer of a custom PHP application. It's quite poorly written and I'm stuck maintaining it. I have been thinking that I'd like to rewrite it from scratch. I don't *need* any third party software to rewrite it, but it occurred to me that the final product might be better if I used a good PHP development framework. So I started googling for PHP application frameworks and I hit a Wikipedia page saying that some people use Drupal as a development framework. So I thought I'd ask about that here. Any thoughts?
I don't have a solid idea of what I'm looking for. I'm just looking to see what's available.
Cheers, Daniel. -- [ Drupal support list | http://lists.drupal.org/ ]
Daniel, Short answer: Yes.
I have been previously and currently am involved with a few web app projects that were started or rewritten from scratch on Drupal. In fact, the reason that Drupal was chosen over any of the other CMS's available is specifically because of its superiority amongst its peers in the CMS space as a PHP development framework.
The most important thing in my experience is to make sure that you approach the project from a correct perspective. You'll get the best results if you think of the app being constructed *with* Drupal, doing it the Drupal way. This is a very different thing than building it *on top of* Drupal, where you try to reach down and leverage Drupal functionality when it suits you. This approach might cause you to rethink a lot of the application and data architecture in a rewrite. Drupal can do the job wonderfully, but know that it probably won't just be a "rewrite", but rather a "redesign", from the data model on up. Allowing Drupal to handle all of your user management, for example, sounds great, but thinking of how Drupal users are going to interact with your application's data will force you to rethink how Drupal will best do this. Ideally, it would become less and less your application's data and more and more Drupal's content, structured in the way that Drupal organizes its content (nodes, CCK, possibly OG's, ...), and accessed the way that Drupal accesses content (Views, perms, ...)
...if that makes sense ;)
Seth
Daniel Carrera wrote:
Hello,
Can you use Drupal core as a PHP development framework? Suppose you want to create a custom in-house web application which is not necessarily going to be a Drupal module. What would you use?
I am the maintainer of a custom PHP application. It's quite poorly written and I'm stuck maintaining it. I have been thinking that I'd like to rewrite it from scratch. I don't *need* any third party software to rewrite it, but it occurred to me that the final product might be better if I used a good PHP development framework. So I started googling for PHP application frameworks and I hit a Wikipedia page saying that some people use Drupal as a development framework. So I thought I'd ask about that here. Any thoughts?
I don't have a solid idea of what I'm looking for. I'm just looking to see what's available.
Cheers, Daniel.
Hi Seth,
Thanks. That's a very useful answer, about how I should think about the application if I used Drupal. That I shouldn't see Drupal as a library that use, but rather see my app as a Drupal component.
I'll need time to think about whether this is what I'm looking for. I don't have a clear picture of what I want yet.
Thanks.
Daniel.
Seth Freach wrote:
Daniel, Short answer: Yes.
I have been previously and currently am involved with a few web app projects that were started or rewritten from scratch on Drupal. In fact, the reason that Drupal was chosen over any of the other CMS's available is specifically because of its superiority amongst its peers in the CMS space as a PHP development framework.
The most important thing in my experience is to make sure that you approach the project from a correct perspective. You'll get the best results if you think of the app being constructed *with* Drupal, doing it the Drupal way. This is a very different thing than building it *on top of* Drupal, where you try to reach down and leverage Drupal functionality when it suits you. This approach might cause you to rethink a lot of the application and data architecture in a rewrite. Drupal can do the job wonderfully, but know that it probably won't just be a "rewrite", but rather a "redesign", from the data model on up. Allowing Drupal to handle all of your user management, for example, sounds great, but thinking of how Drupal users are going to interact with your application's data will force you to rethink how Drupal will best do this. Ideally, it would become less and less your application's data and more and more Drupal's content, structured in the way that Drupal organizes its content (nodes, CCK, possibly OG's, ...), and accessed the way that Drupal accesses content (Views, perms, ...)
...if that makes sense ;)
Seth
Daniel,
Yeah, if you're thinking of Drupal as a library, you are approaching it from the wrong direction.
Knowing nothing about your app or experience level with Drupal, I'm going to assume 3 things: - Your app is in a production environment and in use by your users - You are the only person supporting this app - Drupal is new to you.
If those three things are all true, I would probably lean away from porting to Drupal, it probably wouldn't make good business sense. You may find yourself spending significant amounts of time just learning Drupal before you even begin to think about your app in a Drupal environment.
On the other hand, if you are looking to build more apps going forward and want to learn a robust framework to build those on, the time spent now will be a valuable investment, especially, if this particular app is one that has a small user base and will not significantly suffer for being a learning environment (aka: guinea pig)
-Seth
Daniel Carrera wrote:
Hi Seth,
Thanks. That's a very useful answer, about how I should think about the application if I used Drupal. That I shouldn't see Drupal as a library that use, but rather see my app as a Drupal component.
I'll need time to think about whether this is what I'm looking for. I don't have a clear picture of what I want yet.
Thanks.
Daniel.
Seth Freach wrote:
Daniel, Short answer: Yes.
I have been previously and currently am involved with a few web app projects that were started or rewritten from scratch on Drupal. In fact, the reason that Drupal was chosen over any of the other CMS's available is specifically because of its superiority amongst its peers in the CMS space as a PHP development framework.
The most important thing in my experience is to make sure that you approach the project from a correct perspective. You'll get the best results if you think of the app being constructed *with* Drupal, doing it the Drupal way. This is a very different thing than building it *on top of* Drupal, where you try to reach down and leverage Drupal functionality when it suits you. This approach might cause you to rethink a lot of the application and data architecture in a rewrite. Drupal can do the job wonderfully, but know that it probably won't just be a "rewrite", but rather a "redesign", from the data model on up. Allowing Drupal to handle all of your user management, for example, sounds great, but thinking of how Drupal users are going to interact with your application's data will force you to rethink how Drupal will best do this. Ideally, it would become less and less your application's data and more and more Drupal's content, structured in the way that Drupal organizes its content (nodes, CCK, possibly OG's, ...), and accessed the way that Drupal accesses content (Views, perms, ...)
...if that makes sense ;)
Seth
Seth Freach wrote:
Knowing nothing about your app or experience level with Drupal, I'm going to assume 3 things:
- Your app is in a production environment and in use by your users
- You are the only person supporting this app
- Drupal is new to you.
Very good assumptions. The last one is only "partly true". I have managed Drupal sites for years, but I have never written a module or a theme. I don't know Drupal's internals.
If those three things are all true, I would probably lean away from porting to Drupal, it probably wouldn't make good business sense. You may find yourself spending significant amounts of time just learning Drupal before you even begin to think about your app in a Drupal environment.
On the other hand, if you are looking to build more apps going forward and want to learn a robust framework to build those on, the time spent now will be a valuable investment, especially, if this particular app is one that has a small user base and will not significantly suffer for being a learning environment (aka: guinea pig)
Thanks. Again, that's very useful. I have a couple hundred users and they are paying customers, so I can't experiment on them very much. I'll look for generic PHP framework.
Thanks for the help.
Cheers, Daniel.
You can use Drupal as such a framework, but it probably won't make sense unless you either (1) already know Drupal and hence will save time by using it, versus learning a new framework, or (2) intend to use Drupal for something else anyway, in which case learning Drupal only instead of Drupal plus another framework again saves you time.
As Victor Kane points out, it also depends on what you want to do. If it is similar enough to what Drupal and its contributed modules can already do, it might be more efficient to use Drupal rather than a more generic framework.
Otherwise, there are a number of other good frameworks out there you could learn and use, and those frameworks might be more generalized over the entire problem space of "PHP application building".
-- ..chris
On Fri, Dec 19, 2008 at 8:51 AM, Daniel Carrera daniel.carrera@zmsl.com wrote:
Hello,
Can you use Drupal core as a PHP development framework? Suppose you want to create a custom in-house web application which is not necessarily going to be a Drupal module. What would you use?
I am the maintainer of a custom PHP application. It's quite poorly written and I'm stuck maintaining it. I have been thinking that I'd like to rewrite it from scratch. I don't *need* any third party software to rewrite it, but it occurred to me that the final product might be better if I used a good PHP development framework. So I started googling for PHP application frameworks and I hit a Wikipedia page saying that some people use Drupal as a development framework. So I thought I'd ask about that here. Any thoughts?
I don't have a solid idea of what I'm looking for. I'm just looking to see what's available.
Cheers, Daniel. -- [ Drupal support list | http://lists.drupal.org/ ]
Hi Chris,
Thanks for your comments. Based on what you say, I think I lean toward a generic PHP framework. I do want some Drupal integration, but probably not enough to warrant writing the whole thing in Drupal (I just want to create Drupal users from within my app).
Is CodeIgniter a good framework? There are so many PHP frameworks, I don't know which ones are worth researching in detail.
Chris Johnson wrote:
You can use Drupal as such a framework, but it probably won't make sense unless you either (1) already know Drupal and hence will save time by using it, versus learning a new framework, or (2) intend to use Drupal for something else anyway, in which case learning Drupal only instead of Drupal plus another framework again saves you time.
As Victor Kane points out, it also depends on what you want to do. If it is similar enough to what Drupal and its contributed modules can already do, it might be more efficient to use Drupal rather than a more generic framework.
Otherwise, there are a number of other good frameworks out there you could learn and use, and those frameworks might be more generalized over the entire problem space of "PHP application building".
* Daniel Carrera [19/12/2008 16:04] :
Can you use Drupal core as a PHP development framework? Suppose you want to create a custom in-house web application which is not necessarily going to be a Drupal module. What would you use?
As an example :
I was looking at GCStar and Tellico (Gnome and KDE applications for managing collections, respectively) when I realized that Drupal can do everything that I'm looking for in these apps :
a) Ability to define the properties of an item in the collection b) Being able to tag these items in any way I want c) Displaying the items in any number of different ways
a and c require cck and views, b just requires activating taxonomy.
The only thing I'm missing is the ability to script adding a node (so that I can scrape a web page and use its data to create an item). I'm sure this can be done but I need to find out how.
Emmanuel
Look into http://drupal.org/project/feedapi. You may only have to write a custom parser for your specific situation, but the rest is there.
Greg
...
The only thing I'm missing is the ability to script adding a node (so that I can scrape a web page and use its data to create an item). I'm sure this can be done but I need to find out how.
Emmanuel