DruBB architecture discussion.

tounano@drupal.org's picture

Hi friends,

As I stated at one of my comments, I am on holiday now, so I hope to make some progress. But first I would like to hear your opinion on my DruBB implementation ideas.

The main component of the module will be a new node type, let's name it "DruBB Topic". This node's only purpose is to act like a container. So, for example, if you would like to post a poll, you actually post new node of "DruBB Topic" that contains the "Poll" node. The "DruBB Topic" module will make all the permission checks and only then it will invoke the needed hooks of the "Poll" type.

In that way we can take advantage of Drupal's core components such as the node system and the Taxonomy system. We'll be able to promote our nodes into the site.

Another thing, the forum categories will be taxonomy terms that will be themed by the needs of the forum.

IMHO, after lot of thoughts, this is the best way to implement a forum module, without tweaking too much things and causing Memory/Processing issues.

I would like to hear your opinion before I start coding....

Have a nice day.

Comments

Did you catch this exchange

Did you catch this exchange I had with webchick? Basically, the suggestion was that rather than having a forum-specific node type/container, you could enhance Drupal's existing books module to become a general-purpose content container and grouper. This grouper could contain nodes of any type, and the module would create the structure for any menus, breadcrumbs, etc. For our purposes, this plus a bit of theming would produce the forum and thread indexes.

Dries has already suggested this (#2 on the list), so if you did a good job with it, it would have a very good chance of making it into core, and would be useful to all of Drupal, rather than just the forum.

Hi toe, I've read this

tounano@drupal.org's picture

Hi toe,

I've read this suggestions, and I have some questions. How do you plan to implement forum using this "Advanced Book" module? I thought of making each "Advanced Book" as forum, but in that case each reply will became a node, this is nice but it will cause loading issues IMHO. I think that this module will be great addition but is it the best way to implement forum? If you'll use this module for forum it won't solve the permissions problem, it'll just make more problems, am I wrong? I mean, it will still use the hook_access of each node, but in forums you need to check the permissions not per node type as its done in Drupal, you should check the permissions per category. If you'll add the "DruBB type" it solves you most of the permission problems.

Anyway, I would like to hear the opinions of the others.

Have a nice day.

How do you intend to store

How do you intend to store the posts themselves? Nodes? Comments? Some entirely different data structure?

Hi, I plan to store the

tounano@drupal.org's picture

Hi,

I plan to store the posts themselves as comments. I have some problems with this right now that I still haven't figured how to solve. I mean I have some ideas, but I still haven't decided which one will fit the best.

On of the ways to solve my problems is to rewrite some parts of the comments.module, but this will be my last try. Another way to solve it is to implement one of the comments theme functions, but this can cause collision with the user's theme function, even the implementation of these theme functions is rare. I am sorry that I don't describe the problem itself, but I don't remember what it was, I wrote it somewhere and now I can't find the paper. But I'll find it :)

Two problems that I remember that the comment.module have are 1) comment_render function don't use db_rewrite_sql, I've seen patch that can fix it, but I don't want users to be dependent on this patch. 2) The comment_render function isn't called from the comment module, it called from the node module. IMHO, it's not right from OOP perspective, even Drupal is not pure OOP, I think it's a little bit OOP, and the right way to do that is to call the comment_render from a block that owned by comment.module that placed in the footer region.

Wow, I wrote a lot, so let it be all for now.
What do you think about using comment.module for your posts, as it's already done in the current forum? Please express your opinions, it's very important to me to hear some feedback from you.

Have a nice day.

I think comments as posts is

catch's picture

I think comments as posts is fine - unless there was away round the performance hit of comments as nodes (which I very much doubt).

The things I don't like about comment module though:

collapsed comments - I don't see the point of this in core
comments are never really flat even if that setting is chosen - which leads to issues with timestamps moving posts visually around, problems with comment mover etc. etc.
user comment options - ditto - I can't think of use cases for this at all and it causes issues with all kinds of things like the "new" links in tracker and forum module.

It'd be nice if that could be taken out of the core comment module, and stuck in a contrib module. One that might also allow for say completely flat comments in forums, threaded flat comments in blogs, maybe collapsed comments in news or whatever. And most importantly simplify things in a default install so some of the long-running bugs could be fixed.

I found this module today,

tounano@drupal.org's picture

I found this module today, http://drupal.org/project/nodecomment.

And I am checking now, how it will affect the performance of the site.

Does anyone has any experience with comments as nodes?

Where does the performance

Where does the performance hit come in for storing the posts as nodes? Is the overhead caused by potential for hooks to cause additional database look ups for each post?

node_loads are expensive...

webchick's picture

They're triggering at least 3-4 hooks per node, and any extra properties that are loaded into a node are another SQL query per node.

That said, we are using nodecomment on all of our Sony sites, and it seems to be fine. But they also have more horsepower on their server than your average $9/year shared hosting account. ;)

@tounano, whatever you choose to do, please please PLEASE get your stuff in CVS as soon as possible, in a project with an issue tracker, so that we can all help collaborate. Going off and working on it solo and coming back when it's "done" won't work with this project -- it's too large in scope.

Ah that's good to know. I've

Ah that's good to know. I've sort of been experimenting with stuff on one of my dev servers, but efficiency issues don't tend to be as big a problem for a single user refreshing the page every 10 minutes on a rather high power machine. :)

I'd love to see tounano's code as well. I've been interested in resolving some of the problems with forums, but I wanted to avoid reinventing the wheel on stuff people are working on.

Hi again, Don't worry, I'll

tounano@drupal.org's picture

Hi again,

Don't worry, I'll put everything in the CVS.
Meanwhile, please take a look at this http://groups.drupal.org/node/3550

Have a nice day.

I second Webchick

Gman's picture

The soon the better. It doesn't even need to be stable/usable. But with code in the CVS we can all review/comment on the direction/function of the code.

Thanks. -G

Forum development

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week