Simple Machines Community Forum

General Community => Scripting Help => Topic started by: niloc on September 21, 2021, 08:53:48 AM

Title: How hard is it to build a PHP forum from scratch?
Post by: niloc on September 21, 2021, 08:53:48 AM
I've seen so many forums that take years and years of development and testing and updating...

How hard is it really, for one person, to build an entire forum from scratch using PHP / MySQL?

Perhaps not so fine-tuned like SMF, but a very basic one, with the standard forum features..

For example, this seems like 20 hours of video, so perhaps in a week an entire forum can be built?
https://laracasts.com/series/lets-build-a-forum-with-laravel

Thanks for sharing your experience guys! Newbie in coding here.
Title: Re: How hard is it to build a PHP forum from scratch?
Post by: shadav on September 21, 2021, 09:02:46 AM
well that would depend on the persons skill level honestly
or how much they wanted to pay someone with said skill levels

and it would depend on what all you wanted it to do
and how secure you wanted it to be, I mean sure you can create a comment script in 2 seconds that would allow people to post comments to your site but it would not be secure at all, leaving your site open for attacks
Title: Re: How hard is it to build a PHP forum from scratch?
Post by: Aleksi "Lex" Kilpinen on September 21, 2021, 09:04:38 AM
Really, that would all depend on what you want to call essential features.
Database and some html/php to insert messages and present them in a structured manner, not too difficult - Securing that all, takes a bit more, having user accounts and linking those messages to users, a bit more again and so on, so on. I wouldn't take that mission on, not really.
Title: Re: How hard is it to build a PHP forum from scratch?
Post by: Arantor on September 21, 2021, 09:14:39 AM
Well, if you're using a framework like Laravel that gives you a decent chunk of the functionality before you start.

And if you don't need things like translations or customisation of templates, you can cut all that out too.

And if you don't need things like moderation, splitting, merging, bbcode, smileys... yes, a very basic, minimal forum designed to run on its own server. Sure that's doable in a week.

The more complex it is, the more time it'll take.
Title: Re: How hard is it to build a PHP forum from scratch?
Post by: niloc on September 21, 2021, 09:39:22 AM
Sounds like a really uphill battle...

Yeah going to try it out with Laravel which covers most of the basic security / foundation I guess?

I am still amazed at how polished SMF is.. it's mind boggling..

If a developer is paid to spend all his time to create something close to SMF, how long would that take?

The problem for me here is that it has to be based on Laravel, connected to Laravel users. So far, to integrate SMF, it would take SSO and that's not true compatibility of users.. it's still two separate apps..
Title: Re: How hard is it to build a PHP forum from scratch?
Post by: Arantor on September 21, 2021, 09:52:18 AM
Laravel gets you security (if you use it, but there's caveats to it) and things like URL routing to a controller (so, parts of index.php), and you can certainly use Breeze to get the login system.

It even gets you as far as having a database connector and a system for adding new tables as you need them.

Plus there's any number of helper functions along the way.

And I dare say a lot of the functionality could be implemented more "tidily" (but in no way near as efficiently) using Eloquent to connect the parts of the system.

Plus you get Blade for doing the templating and some functionality for language packs if you want it.

It's just the forum specific stuff that's hard. A basic forum could be done in a few days, less if you're familiar with Laravel. Approximate feature parity with SMF is in the order of months even with Laravel familiarity and SMF's performance will blow it out of the water if that is in any way a consideration.
Title: Re: How hard is it to build a PHP forum from scratch?
Post by: wintstar on September 24, 2021, 05:52:36 AM
If you're looking for a forum system based on Laravel, check this out => https://github.com/Team-Tea-Time/laravel-forum

Complete documentation is available on teamteatime.net (https://www.teamteatime.net/docs/laravel-forum/5/).