Programming your own forum

merrillmck

New Member
Messages
134
Reaction score
0
Points
0
Are most forum scripts tied to an SQL database? Or do some scripts reside solely in PHP, ASP, or ASP.NET/C#/VB code without an SQL database for posts and user accounts?

Has anyone tried to write their own forum software?
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
I am writing my own software. It will take you a long time to do, and I would say the average programmer would not be able to write a better software than what is out there currently.

A mysql query will take probably around 10 to 100 times less to execute than file access, so SQL is really the only viable option.
 

nirajkum

New Member
Messages
159
Reaction score
0
Points
0
if you want a forum for just your own purpose then you should not code the forum ... there are lots of free forum available like smf, phpbb they are nice
 

xadrieth

New Member
Messages
62
Reaction score
1
Points
0
I have yet to see a forum that does not use any kinda of SQL.

If your going to make your own forum, your in for a long programming trip.

Your first probably going to have to come up with the database design (like for most scripts). then the layout of your program (how it looks when viewed), then how it functions (how the program is made).

In short, it's a major hassle. If your going to create your own forum, i would suggest making it just a simple help forum, like for video game help, or a product.

Just use an existing forum package out there, MyBB is pretty good.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
You'll have to store data somehow. You don't have to use a relational database (an object database is an alternative), and you don't need to use a DBMS that uses SQL, but you don't want to write you own DBMS. For one thing, it will take awhile to implement all the functionality. For another, you'll probably get something wrong, unless you're a DB guru.

Read the thread where merrillmck asked "Why use SQL anyway?" which expands on this post.
 
Last edited:

noerrorsfound

New Member
Messages
1,736
Reaction score
1
Points
0
I have yet to see a forum that does not use any kinda of SQL.
YaBB.
forumdisplay.php
 

merrillmck

New Member
Messages
134
Reaction score
0
Points
0
For any .NET programmers:

I found this open-source ASP.NET/C# forum:

http://www.yetanotherforum.net/

It uses Microsoft SQL Server which I believe is incompatible with X10. However, I think one could go and substitute all the MS SQL references with MySQL references ...
 

drf1229

New Member
Messages
71
Reaction score
1
Points
0
Easy way out of using a database

I actually don't use MySQL at all, yet I'm able to make forum-like sections on my site (http://www.algebrahelper.x10hosting.com/feedback.php). My secret is I just use the PHP fread, fwrite, fopen commands. Its simple really. The feedback page reads a .txt file (using fread()), then posts its output on the page (using print()). When you go to submit a post, it checks to see if you're logged in, then it prompts you for your comment. When you click submit, it simply writes your comment to the .txt file (using fwrite()). This may seem insecure, but remember, nobody can see the PHP code of your .php file, so its actually very secure. Its my simple way to getting out of MySQL, or using any other database.
 
Last edited:

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
Yeah, it's definitely possible to use files instead of SQL (SQL uses files itself) but SQL is so highly optimized for the task, anything you program will not be nearly as quick.
 

drf1229

New Member
Messages
71
Reaction score
1
Points
0
Probably true, but I still use purely PHP, it seems easier to me.
 

daman371

New Member
Messages
130
Reaction score
0
Points
0
They rely heavily on databases. It's the easiest and most secure way to store data.
 

subsilver

New Member
Messages
5
Reaction score
0
Points
0
Probably true, but I still use purely PHP, it seems easier to me.
Eventually, files holding posts, threads etc. will rise to few megs and even more so your application will use more server resources and there will be performance drop. Your forum will become sluggish. Yabb, one of the oldest forum software, is written in Perl and uses flat file and it is not a good solition for large communities.
 
Top