Add new comment

To OO or not to OO that is the question

I now have a reasonable implementation of my fault logger working. It's missing some key elements on the admin side of things, user management for example, but as a fault logger it, well, works.

Since I began the project I have learnt a lot more about php. My grasp of some of the basic concepts have evolved, my use of MYSQL is more ordered and I have delved into the world of classes and object oriented php.

So now I hit the dilema, do I change what I already have to a more OO approach or do I continue to add to the code already there. I'm leaning towards the OO thing simply because it seems tidier and perhaps more manageable in the long run. Plus by changing the code over it gives me a complete refresher course of what I've already coded and delays me having to write anything new (work avoidance by creating more work!).

But does procedural have its place? There are some pieces of code where I couldn't imagine classes and objects would make anything any more clearer. A friend of mine commented that php was a lot like spagetti and I'm beginning to see his way of thinking. Classes and objects can convolute instead of clarify at times.

OO seems a popular route to take these days, the buzz word, the thing everyone relates to when you talk software (although, to be honest, for me, it took a long time to sink in what it actually was and I'm still not up there on the whole UML thing) but does that make it better? Does is apply to every situation?

I shall mull it over, think it through, probably change everything because it feels right for this particular project, but I think I will reserve judgement on whether it's always the way to go.

A totally random post, without a real point!

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.