web developers

Dear Kitty,

In the past I have created a couple of websites, most of them rather small and basic. Now I planning on doing a more complex project. Same then the previous ones I am going to use PHP/MySQL as combo. But when looking into some PHP resources they introduced the idea of using an object oriented approach for the PHP development.I have some experience in the whole OO environment when developing some java projects but am not sure wether it is the right way to go :)

My question to you guys (the ones that have actually made decent webbies :x) is wether you have used an OO or a function oriented methodology for your web projects?

Although it is not a very large project it would be a nice way to get familiar with this kind of development.
Comments
13
function oriented, cuz imo it grands you much advantage over the other
rofl @ ur almoast first post my friend xD
Parent
i'd say OO > Functions ... and i will, OO > functions ..
oo is the way to go.
read php.net tutorials
use OO, so you can use your scripts in other projects easily
I'd use OO when the situation requires it, like for example, if you want to include a jabber messenger client in your web application, an object would be the way to go.

If you see the NEED or at least the USE of an OOP approach, go for it. If not, stick with what you know.

(Can I also suggest you look at the existing CMS's available, like joomla and drupal, and maybe customize those with some code? That's the best/quickest way imo)
Thank you all for your input. I have installed drupal and joomla and checked them out. With some additions joomla seems to be a good start for the project. Have you got any xp with any of these cmss?
Parent
Yea, I've used both, and I'm currently running an ET community website with drupal (drupal is good at communities, check my profile/website). Joomla is better for "presentation" sites, like for companies.

What can I say, go through their help. It's a whole different thing than coding in PHP directly. One other more thing, joomla is easier to grasp from an administrator's point of view.

If you need to code for them, for joomla you need to make components (or at least that's how it was a long time ago, when I used it, it might have changed in the meantime), while for drupal any node/story/article/whatever can actually be php code, so you don't really need to delve into it's API.
Parent
You should definitely try the OO approach. You'll find it to be vastly superior to the procedural way of doing things.

You should take a look at CodeIgniter (http://www.codeigniter.com), it's an excellent OO framework that works in both PHP4 as PHP5 and doesn't require a command line like most others do.
if you plan to make your project flexible for new issues, take it OOP way, but if your website gonna be small, dont waste your time with OOP. But I would say it's really personal, in any way OOP is slowering the website a bit, in case it's heavy.
Back to top