|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
OOP way in php programming (Not introduction)
Hi all,
i read about OOP and know it's benefits but i don't know how to start using it in my applications , Can experts here help beginners to start applying OOP principles (such as in an example) ..... Thanks for all ![]() |
|
#2
|
||||
|
||||
|
I use OOP when and only when I have to do one process many times. For instance, in my library I have a Query class that runs queries (usually MySQL or PostgreSQL, and I have a configuration to tell it which one), debugs queries, returns number of rows/an array or rows returned from the query, logs errors and returns a nice smiley face to the user, cleans data, et cetera. Sure, you can put all your stuff into a class and that will be OOP, but not good OOP and that is what you should aim for when using OOP, or any code for that matter.
__________________
"And what, Socrates, is the food of the soul? Surely, I said, knowledge is the food of the soul." -- Plato |
|
#3
|
|||
|
|||
|
thank you mr 'ryon420' i do an application there's a lot of forms,lot of textboxes and a lot of quaries and much repitition you said :
Quote:
so i think i need to use this way is there any examples about ("mysql quaries class" or "forms class" for example) ? i'll be very thankful for you |
|
#4
|
||||
|
||||
|
Hi ahmeds and ryon420
ryon420 - interesting take on the use of OOP. Nothing about abstraction in there though? Surely that is a major benefit also. ahmeds - for database classes try MDB2 in the PEAR library. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > OOP way in php programming (Not introduction) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|