PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 11th, 2008, 04:24 PM
ahmeds_link ahmeds_link is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Location: Egypt
Posts: 36 ahmeds_link User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 35 m 26 sec
Reputation Power: 2
Send a message via MSN to ahmeds_link Send a message via Yahoo to ahmeds_link
Facebook
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

Reply With Quote
  #2  
Old May 11th, 2008, 04:35 PM
ryon420's Avatar
ryon420 ryon420 is offline
Comp. Sci. version of Dr House
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2006
Location: Was lost, then found, now lost again.
Posts: 3,744 ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)ryon420 User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 1496 Folding Title: Novice Folder
Time spent in forums: 7 Months 3 Weeks 4 Days 9 h 55 m 38 sec
Reputation Power: 1908
Send a message via MSN to ryon420 Send a message via Google Talk to ryon420
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

Reply With Quote
  #3  
Old May 11th, 2008, 10:02 PM
ahmeds_link ahmeds_link is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Location: Egypt
Posts: 36 ahmeds_link User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 35 m 26 sec
Reputation Power: 2
Send a message via MSN to ahmeds_link Send a message via Yahoo to ahmeds_link
Facebook
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:
'I use OOP when and only when I have to do one process many times'


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

Reply With Quote
  #4  
Old May 12th, 2008, 02:47 PM
jakenoble's Avatar
jakenoble jakenoble is offline
Getting better 1 line @ a time
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Feb 2004
Location: Sheffield
Posts: 1,012 jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level)jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level)jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level)jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level)jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level)jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 6 Days 18 h 16 m 46 sec
Reputation Power: 28
Send a message via MSN to jakenoble
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > OOP way in php programming (Not introduction)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT