Forum prototype - Constructive criticism requested. |
[eluser]Dam1an[/eluser]
I'm also starting to think the MVC approach may not be the way to go, as there's no clear cut between what goes where... Maybe there's a reason 99% of forums are done using procedural? Also, as for making it so that it works with CI only (in the mean time) is asking for trouble, is it not? As soon as you start building it on top of CI, using CI features, you make it harder to port to another framework. This is one benefit of doing it all in object... It would effectivly become a library which can be dropped in, as pretty much everything else is framework specific As for where you should put a method like get_thread... I would put that in the thread model. I came accross a similar dilema a few days ago, I had the following database table Code: accounts In the end, I put it in the account model, and done a join there, purely for the reason it seems more natural when writing it Code: $this->account_model->get_users(); Not sure if anything I just said really helps you, but I hope so
[eluser]TheFuzzy0ne[/eluser]
Yes, that really does help. Thanks a lot for your comments. I know I over-think things a lot, but it's nice to know that it's not just me who sees problems like this in seemingly simple decisions. The only reason I wanted to create the forum to be CI specific (to start anyway), is simply because CodeIgniter is a great framework, and doesn't have a forum tailored to take advantage of that framework. Also, as this is for a client, I need to get it finished ASAP, and I think the only way to do that, is to depend on CodeIgniter being the backbone. Also, there are a lot of forums out there, and I don't want to contend with them just yet, I just want to provide my fellow CodeIgniters with a fairly decent, simple forum. I think you're right though, forums are generally written in a procedural style. I was thinking of going with a model along these lines, all one model: Code: class Forums_model extends Model I think it's a little bit inconsistent, as there's no thread object, and probably needs a little tweaking, but by using objects, I'm hoping to be able to easily implement changes (adding extra fields), without ending up with functions that take lots of arguments, in a seemingly random order. At least with objects and associative arrays, it allows for expansion much more easily IMHO. Also, there are a lot more methods to be added, but I just want to stick to the basics for now. As always, comments and criticism welcome. Thanks again!
[eluser]TheFuzzy0ne[/eluser]
Holy underpants! [url="http://ellislab.com/forums/viewreply/573474"]bargainph has found a CodeIgniter based forum[/url] in the [url="http://codeigniter.com/wiki/MyForum/"]wiki[/url]. I had no idea... I'm going to check it out tomorrow.
[eluser]TheFuzzy0ne[/eluser]
I thought I'd update this thread with my findings. "My Forum" is a very simple forum, that's lacking a lot of features and functionality. It was coded based on chapter 5 of the "Practical PHP and MySQL" book. I'm quite sure it can be built upon. It's nicely made, and at a lower level proves that you can indeed create a forum built upon the MVC pattern. Taken from the install guide: Quote:MyForum is a free simple forum-type application based on the PHP framework CodeIgniter v1.7.1. Please note that this software was a learning exercise for me, and was not intended to be a full-featured, glitzy, must-have app. It has not been fully tested on a lot of systems and most likely contains bugs. If it works out of the box for you, great; if not sorry i cannot help. I'm still very grateful for this example, however. I've also decided that I will create my forum with CodeIgniter, then anyone is free to write their own abstraction layers if they wish. There are already lots of forums out there - some easier to integrate than others - which is why I would like to stick with CodeIgniter, as it would be impossible to design a forum that can be easily integrated into just about any Web site. Big thanks to everyone who helped, or just wanted to help - particularly Dam1an - without whom I'd still be as confused as a cow on Astroturf.
[eluser]Dam1an[/eluser]
First of all, your prvious post to the wiki isn't a link, it just point to http:/// Secondly, glad I was of some help Having seen how myForum is implemented, you come up with a final architecture, or is that still in progress?
[eluser]TheFuzzy0ne[/eluser]
[quote author="Dam1an" date="1241555466"]First of all, your prvious post to the wiki isn't a link, it just point to http://[/quote] Fixed! [quote author="Dam1an" date="1241555466"]Having seen how myForum is implemented, you come up with a final architecture, or is that still in progress?[/quote] Uhm... No. But I have a sense of direction now, so that's something! I think I have the structure sussed to the point that I can expand easily without having to do any more rewrites, and that's good enough for me.
[eluser]Dam1an[/eluser]
Cool... maybe you could intergrate this project with your "port wordpress to CI" project Hmmm a forum blogging platform... that could be interesting Anyway, be sure to keep us posted about the progress of your forum
[eluser]zimco[/eluser]
Possibly of interest on your CI-based forum quest: somebody has taken MyForum a step further, or at least put some effort into the css styling: see subcultura.es/v2/foro perhaps the person would be willing to share their code enhancements; but if not at least it's another operational CI forum to review.
[eluser]Thorpe Obazee[/eluser]
[quote author="TheFuzzy0ne" date="1241372486"] I just want to provide my fellow CodeIgniters with a fairly decent, simple forum. [/quote] That being said, I'd like to be a tester if ever that forum is released(will it be released?).
[eluser]TheFuzzy0ne[/eluser]
I'm hoping so, although I can't say with any certainty just yet. My aim is to just get the forum working, and then I need to work on making it a standalone app, and making it easy to integrate into an existing set up. Sound simple enough? Well, it not! |
Welcome Guest, Not a member yet? Register Sign In |