List Info

Thread: Classes or functions?




Classes or functions?
user name
2006-06-28 16:45:45
Gaurev,

I do agree with Joel (webdevil) on this issue.
Since PHP 5.0 the use of OO (classes) is basically a must
regardless of
the size of you're application.
In my experience the speed as well as the management of the
code is
much better compared to only use of includes with functions.
BUT, this
also depends highly on your modelling skills. Good modelling
demands a
thorough understanding of the functionality you want to
create and use
of rigid principles to avoid overlapping classes etc.
Minimise coupling
and maximise coherence are good examples of those
principles.

Linvo


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Classes or functions?
user name
2006-06-28 20:03:48
Is there really such a great difference in speed?

My main reason for looking at a OO design was to eliminate the very costly SQL queries that have to be executed with every function. I figured if this data was in a class, it would be easier to manage it (like you guys said) as well as be faster.

As it stands, my application doesn't quite require extensive OO design, I only need it for managing certain things such as users. Would it be bad design if I mixed a OO design with a modular one?

Linvo, could you please give me an example of "Minimise coupling and maximise coherence are good examples of those principles". I hope i'm not asking for too much of your time.

I appreciate the help guys.

Gaurav


On 6/28/06, Linvo <linvo.nl">infolinvo.nl&gt; wrote:

Gaurev,

I do agree with Joel (webdevil) on this issue.
Since PHP 5.0 the use of OO (classes) is basically a must regardless of
the size of you're application.
In my experience the speed as well as the management of the code is
much better compared to only use of includes with functions. BUT, this
also depends highly on your modelling skills. Good modelling demands a
thorough understanding of the functionality you want to create and use
of rigid principles to avoid overlapping classes etc. Minimise coupling
and maximise coherence are good examples of those principles.

Linvo



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )