开发者

Should I use Drupal or Kohana-type framework for a web "application"

The debate is that I need a PHP Framework/Drupal with the flexibility to add custom features to a potentially large application (web and with an api).

However, with 开发者_StackOverflow社区a framework, like Kohana, I see myself tackling and re-inventing the wheel with the simple stuff like account management and cms stuff. Account management and quick data collection, like fast form creation, are tedious in Kohana but appear incredible simple in Drupal. On the other hand, based on my limited Drupal experience, I doubt building rapid custom "features" and allowing users to create "groups" and to manage their own roles within those groups is something Drupal can easily accomplish.

To simplify, is Drupal capable of true Web Applications; where the application is a service and provides custom results to each user? Can it provide a dashboard-like interface for users to change their settings or preferences? Can it aggregate data from particular users to provide better results/info to others?

If so, please point me to some knowledge :-)


I'll admit right away I'm a big fan of Drupal and I have never used Kohana, so this post will be one-sided.

In the company I work for they use Drupal or Zend Framework for pretty much all projects (Drupal being in the majority). Many ZF-oriented people dislike Drupal as it's structure is so far from the object oriented ZF-stuff, and Drupal is "just an CMS". As I see it Drupal is more of a Framework than "just" a CMS, and the best part being that it is incredibly flexible: everything is possible.

And yes there is indeed a module for everything. To be more specific:

On the other hand, based on my limited Drupal experience, I doubt building rapid custom >"features" and allowing users to create "groups" and to manage their own roles within >those groups is something Drupal can easily accomplish.

I can only guess what you mean with rapid custom features, but imo it's easy to expand Drupal with your own modules. Most features are available as (free, community contributed) modules, and many advanced looking features can be easily created for example with the "views" and "cck"-modules. http://drupal.org/project/cck http://drupal.org/project/views

Creating groups: "organic_groups" ( http://drupal.org/project/og)
"og_user_roles" ( http://drupal.org/project/og_user_roles )

These modules together are what you need to create groups that have group spefic roles (and roles having specific rights). There are probably other ways than using "og_user_roles", but I'm advertising it because I've made a few patches for it a few years ago. The problem is usually a bit too many options.

If you want to extend group specific options you could code your own module, but most likely you don't need to because there already is a module for it. For example, there are at least 120 modules that integrate somehow with the "organic_groups"-module: http://drupal.org/taxonomy/term/90?page=19

To simplify, is Drupal capable of true Web Applications; where the application is a >service and provides custom results to each user? Can it provide a dashboard-like >interface for users to change their settings or preferences? Can it aggregate data from >particular users to provide better results/info to others?

In short, yes. There are so many ways to achieve something you described. But probably they would involve at least the excellent "views"-module. I think of views as some kind of ultimate abstraction SQL layer and UI for anyone. And there are over 300 modules that somehow integrate with Views... ( http://drupal.org/taxonomy/term/89?page=55 )

This sounds that Drupal is all about the modules.. and I know some of my collegues even dislike it for that, because you never get to code fun stuff because it's already been done. At least you can look at the module code and learn from that. Or laugh at it, there's lots of badly programmed modules around too.

When you get to coding modules, you'll probably need lots of time to get used to the Drupal API, Forms API, Module hooks, the Theme override system, and the endless options from contrib modules. But it's worth the trouble.

I find this site very usefull to find a module for some specific need. The site shows the same module info as Drupal.org, but also user feedback/ratings, to find the best option: http://drupalmodules.com/

If it's unclear, my answer would be go with Drupal :)

PS: D7 should be out very soon. Some might wait for it instead of starting with D6. During D5 people would wait a long time before upgrading to D6 because of missing modules. I believe for D7 the most important modules will be available for D7 very fast. Some research at the moment (04.12.2010):

About 190 modules promise to have a Drupal 7 version the day D7 is released: http://drupal.org/project/modules?solrsort=sort_title%20asc&text=d7cx&display=table

About 130 modules are already available for D7 (most are included in the previous link): http://drupal.org/project/modules?filters=drupal_core:103&solrsort=sort_title%20asc&text=d7cx&display=table

EDIT: As a newbie I'm only allowed to post one link, so, I removed http:// from the drupal.org-links


I worked with both Drupal and Kohana.

In my insight it really depends what you want to do. If you are going to make a web application that needs to grow a lot and should be flexible for it's growth then I recommend using Kohana. Kohana is made to keep your codebase clean and supporting in DRY (Don't Repeat Yourself). While it likely doesn't have as many modules as Drupal it does have some Auth and ACL modules.

If you want to be done fast and you don't mind making your application out of others their modules Drupal will get your work done fast. But keep in mind that when you are going to extend you will most likely run into problems that come from modules you don't know. Also it takes a bit flexibility from you.

Ultimately it's your choice. But I recommend using a MVC framework if you are going to write it from scratch.


There is no impossible thing to accomplish. The question is do you want to work with someone else code and try to figure out how to dig inside and extend so it can fit your needs or you want to go with a light framework like Kohana or maybe CodeIgniter(my personal favorite) and drive your own car, although you might need to "invent" some of the wheels.

Go ahead and research what plugins are there to your framework of choice as there are a lot of frameworks providing very good solutions which can provide you with these wheels.

In my personal opinion the time you will spend studying Drupal will be equivalent to the time needed for you to create your basic CMS functionality, but the nerves you will use dealing with stuff out of your control like the core Drupal code will shift the scales in favor of Framework.


The fun stuff about Drupal is what the community calls jokingly rule #35: there is a module for it. Unless you want to do something really tricky, you will often find that the functionality has already been implemented and you just need to configure it.


I am new to both Drupal (7.12) & Kohana (3.2.0)... My experience thus far is that Kohana's documentation SUCKS (or at least, what I've seen of it). And if their website and/or forum is written in Kohana, it sucks as well (slooooow, with overlapping fields, etc.). Whereas with Drupal, it has been clean and so far, very efficient (as best I can tell thus far).

I guess I'm wondering if the comments thus far were focusing on Drupal 6.x and haven't taken into consideration the more recent innovations in Drupal. Any thoughts/comments? Thanks.


As a newbie web developer, I can tell you that you need to analyze the use cases for your web application very strictly. If you are able to cover at least 75% of the use cases you foresee, that's a good start.

With that done, you need to figure if Drupal/Joomla/CMS(x) will give you all of that and with another potential unknown 5-10% feature creep. If so, you maybe better off getting in with Drupal etc.

Else, I think CodeIgniter or Symfony are great PHP frameworks to jump in with. Both offer solid tutorials, video and otherwise, and a helpful community. Kohana, which I am working on, I think you should get into if you really understand PHP and its flaws and realize that speed will be a critical factor. Those are the two big strengths that KO3 brings to the table and you should really need them to use it.

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜