|
Posted by Erwin Moller on 06/27/07 08:13
macca wrote:
> Hi, ive been working with PHP for about a year and a half now, and
> have always been able to do everything i need with procedural code and
> a nice UD function include.
>
> However, i have always worked for myself (freelance) on my projects
> and never in a developmental job but was thinking of changing this.
>
> Is it likely that i will have to start coding using OOP to fit in?
Who knows. Do they expect you to be a master at OOP?
You don't need OOP to be a good, clean PHP programmer.
But you must be able to implement other people's classes. SO you need to kow
at least how to USE classes, even if you don't design them yourself.
Re-use of code:
An advantage of bundling your code into classes is that it is slightly
cleaner than a bunch of functions, but not much. (in my opinion)
You can make classes that hold certain functionality you need often.
But then again, you can make a few functions with similar functionality, and
bundle them too.
So that is mainly a matter of taste/experience.
On the other hand: If you take that developmental job, why not take the
oppertunity to broaden your horizons and dive straight into OOP?
PHP's implementation of OOP is very straightforward.
In my opinion they took the good bits of Java, and left the unneeded
complicated stuff out.
So if you go OOP, PHP is a nice start (version 5 of course, not 4).
Just my 2 cent.
Good luck.
Regards,
Erwin Moller
>
>
> Cheers.
[Back to original message]
|