are these required to make a very crude forum?

No, neither are required to make a "very crude forum". In fact, neither are required for anything at all. One of the principles of object-oriented programming that every OOP-centric class teaches is that there's nothing you can do with objects that you couldn't otherwise do without them. They just make some things easier. I've never made a forum, but right now I can imagine making one with objects and one without objects, and I'm not sure which would be more difficult. If it's just going to be, as you say, "crude", you can probably do without templates and without OOP. But I do recommend that you take extra pains to keep logic and presentation separate, and this is perhaps the most direct advantage of template systems.
 
as far as the php learning curve goes...

you will learn procedural code
you will tinker
you will conceptualize how to code a forum
you will tinker
you will understand that a templated and OOP forum will help extensability in many regions
you will tinker
you will realize that very few php applications require OOP and templates and that they basically only facilitate removing presentation from logic
you will tinker...

yes object programming can help, yes template parsing can help - whether or not either are necessary for an application is truely dependent upon the application. Most forums use OOP and templating just so the backend programmers don't have to bother with clientside stuff and so the html programmers don't have to understand the logic.
 
Also it makes for coding and maintaining easier there is a disadvantage to using OOP and templates, it's slower.

The only thing is the advantages greatly outweigh the disadvantages so you can almost disreguard my comment. Just wanted you to know.

If you just want to make a crude forum and don't plan on distributing or adding much to it there would be no need for OOP or templates. The only thing is if you want to change anything say 3 months down the road. Unless you get comment happy it would be difficult to remember what you were thinking when you made the code.

OOP not only makes code easier to read and understand it gives you a better opportunity to reuse code.

If you make a class that allows users to login, signup, change preferences and what not you could then take that class out of your forum and add it to a something else.
 
If you want to know the many wonders of that OOP, just get a book on or take a course in Java. In Java, everything is an object. Even though I rarely use it for actual application development, Java produces perhaps the most effortlessly beautiful code in the animal kingdom of programming languages. I do love PHP and use it because it's a great language, but Java.. well, Java is something else entirely.

In any event, I recommend that eventually you familiarize yourself with OOP, as even if you rarely use it (I don't use it very often in PHP), it will very much come in handy when you need it.
 
well I grew up with java so not using OOP in php is hard not to do :) I only wish it wasn't such a performance hit. maybe I should get a zend compiler..
 
Is it really that much of a performance hit? I mean, I know PHP doesn't do OOP superfast, as it's not so integrated into the core of the language as in Java or Python, but is it really that terrible? Do you know of any benchmarks of this? And presumably it'll get a lot better in PHP 5, as they've put quite a lot of serious effort into making it better.
 
it's noticeable but not that great. PHP 5 is supposed to be more OOP orientated so hopefully it solves some problems. I haven't personally done benchmarks but made scripts where I can tell the difference.
 
so i don't really need it unless i want to develope my forum over time?
 
oh yeah, should i use sessions or cookies? i haven't learn anything about sessions yet.
 
Virtuoso said:
oh yeah, should i use sessions or cookies? i haven't learn anything about sessions yet.
session it's very poverful thing's in PHP.......
by the way, to all what say before by swirlee and Redcircle, i may say:
in some situation than you have a very beauty code for example somthing like DataBaseEngine, with wery good processing of querys, you may use it's code againe and againe. And you may modernize it in any time.
Than you will create new project no matter what is it, forum, news, CRM, you may create at the mach more time faster, cause half of code you still have.

Sorry for my English..... :oops:
 
Back
Top