Jump to content

Community-driven Project


Guest mastication

Recommended Posts

Guest mastication
Hello all,

I am looking for suggestions as for how to structure my community-driven website.
It is a large project that is going to need to support thousands of users, files, articles, and so on.

The only structure I am really concerned with is the structure of the page(s) themselves.
Here's my dilemma:

How exactly would I go about structuring the pages of the site?
My index page is going to house news, recent user submissions, polls, etc.
I plan to split each of these tasks up into modules (classes) for achieving each of the specific tasks, respectively.

Each of these 'modules' is (probably) going to need to access the MySQL database (which will most likely also be a module).
What would be the 'best' way of going about this?
[list]
[*]For example, on my index page, should I create a new MyDB();, and then have each of my modules take that as a parameter, so that they can perform queries using that object?
[*]Should I just make a global $mysql_con, and have my classes use that?
[*]Should I not even bother using modules?
[/list]

Another important question I had was:
How should I go about receiving user input?

For example, if a user wants to register, he or she would go to the register page.
From there, they would fill in their information, and they would submit a form.

[i]After[/i] they submit the form, should I have the form post to an 'invisible' page, e.g. (register_process.php), which acts as an intermediary, only to process the information, and then re-direct them to another page (assuming the register was successful) or back to the register page (if the process failed)?
Or would it be better to submit to the register page itself, and perform all necessary tasks on that page?
Or, something else?

I am open to all suggestions, not just those that I have listed above.
I really want to have a solid foundation to build upon, and I don't want to start writing code without a definitive plan.

Please help me out here with valuable suggestions and comments. :)
Thanks!
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.