Re: [PHP] A Good OOP Tutorial/Read?

2013-05-21 Thread Dan Joseph
Hey guys, thanks again for the talk and education. I've purchased the book, and started reading thru the links given. Take care! -Dan On Sun, May 19, 2013 at 12:28 PM, Tedd Sperling wrote: > To all: > > Thanks to Stuart, I finally got it. > > The concept of Interface is a bit difficult to ex

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-19 Thread Tedd Sperling
To all: Thanks to Stuart, I finally got it. The concept of Interface is a bit difficult to explain, but his excellent console made the concept clear. Many thanks to all for their efforts to educate me. Cheers, tedd _ t...@sperling.com http://sperling.com -- PHP General

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-19 Thread Tedd Sperling
On May 19, 2013, at 5:19 AM, mrfroasty wrote: > On 05/16/2013 11:28 PM, Tedd Sperling wrote: >> So, if you find a good reference, please let me know. > > In my point of view, Interfaces and Abstracts are completely different stuffs > not related at all.Interface is a kind of a way of defining h

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread David Harkness
On Fri, May 17, 2013 at 7:04 AM, Tedd Sperling wrote: > To me there is no difference between an abstract class (without method > declarations) and an interface. > The key difference in OO languages that do not allow multiple inheritance is that you can always add an interface to an existing class

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Přemysl Fiala
Interfaces...I will add my 2 cents to what was already said.You don't need them, but they improve quality of your code. Your application is easily maintained, improved, understandable, accessible,   more cleaner, modules can be added easily...They implements some behavior (example):interface toastA

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Stuart Dallas
On 17 May 2013, at 15:04, Tedd Sperling wrote: > Stuart: > > You said: > >> An interface does what it says on the tin: it describes an interface that a >> class can then tell the world it implements. >> >> An abstract class provides functionality as well as an interface >> description. An ab

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Matijn Woudt
On Fri, May 17, 2013 at 4:04 PM, Tedd Sperling wrote: > Stuart: > > You said: > > > An interface does what it says on the tin: it describes an interface > that a class can then tell the world it implements. > > > > An abstract class provides functionality as well as an interface > description. An

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Tedd Sperling
Stuart: You said: > An interface does what it says on the tin: it describes an interface that a > class can then tell the world it implements. > > An abstract class provides functionality as well as an interface description. > An abstract class cannot be instantiated, it can only be extended.

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Sebastian Krebs
2013/5/17 Tedd Sperling > Nick: > > I thank you for your addition, but what you provided did nothing to > explain the difference between abstract and interface. > > In your example: > > An abstract Shape with Circle and Square inheriting. > > OR > > An interface Shape with Circle and Squa

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Stuart Dallas
On 17 May 2013, at 14:04, Tedd Sperling wrote: > I thank you for your addition, but what you provided did nothing to explain > the difference between abstract and interface. > > In your example: > >An abstract Shape with Circle and Square inheriting. > > OR > >An interface Shape with

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-17 Thread Tedd Sperling
Nick: I thank you for your addition, but what you provided did nothing to explain the difference between abstract and interface. In your example: An abstract Shape with Circle and Square inheriting. OR An interface Shape with Circle and Square implementing. Does exactly the same thin

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread tamouse mailing lists
Back to the OP's request, Ken Pugh's "Interface Oriented Design" goes quite a long way in describing OO* and directly to the heart of why interfaces make so much sense as a way of designing your code. It does not show PHP examples, it tries to remain agnostic to language.

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Dan Joseph
Hey Guys, Thanks for all this good information so far. I'll keep you posted on my edumacation! -Dan On Thu, May 16, 2013 at 11:16 PM, Larry Garfield wrote: > On 05/16/2013 06:45 PM, Tedd Sperling wrote: > >> Thanks to both Bastien and Sebastian: >> >> While I understand that an interface is l

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Larry Garfield
On 05/16/2013 06:45 PM, Tedd Sperling wrote: Thanks to both Bastien and Sebastian: While I understand that an interface is like an abstract Class, in that you don't have to flesh-out your methods, but rather where you define exactly how Classes who implement that interface will be required to

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Nick Khamis
interface Shape { public double getArea(); } class Circle implements Shape { double radius; public Circle(int double radius) { this.radius = radius; } public double getArea() { return (radius * radius * 3.1415); } } class Square implements Shape { double side; public

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Tedd Sperling
Thanks to both Bastien and Sebastian: While I understand that an interface is like an abstract Class, in that you don't have to flesh-out your methods, but rather where you define exactly how Classes who implement that interface will be required to flesh-out those methods. But so what? What's t

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Bastien
Bastien Koert On 2013-05-16, at 5:28 PM, Tedd Sperling wrote: > -Dan: > > I teach this stuff and still don't fully understand the why/when for > interfaces. > > Even the guru's I talk with can't give me a good explanation as to what the > advantages are in using them. I've done a lot of ex

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Sebastian Krebs
2013/5/16 Tedd Sperling > -Dan: > > I teach this stuff and still don't fully understand the why/when for > interfaces. > > Even the guru's I talk with can't give me a good explanation as to what > the advantages are in using them. I've done a lot of experimenting and > can't see any advantage for

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Nick Khamis
OO comes from the heart. You know you have it when everything you look at turn into objects, attributes, accessors, mutators, and constructors. When IBM transitioned from functional to OO level programming, they had their top level engineers walk into a room and tell their employees that 80% of th

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Tedd Sperling
-Dan: I teach this stuff and still don't fully understand the why/when for interfaces. Even the guru's I talk with can't give me a good explanation as to what the advantages are in using them. I've done a lot of experimenting and can't see any advantage for them other than grouping different cl

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Dan Joseph
Thanks! This looks like a good start. Covers some things I have questions on. I like his approach. Now I just need something advanced to continue on after this. I'd like to learn more about extending, interfaces, abstracts, and why/when they should be used. Appreciate it! -Dan On Thu, May

Re: [PHP] A Good OOP Tutorial/Read?

2013-05-16 Thread Francisco C Soares
On 05/16/2013 11:55 AM, Dan Joseph wrote: Hey Folks, I'm looking to refine my PHP 5 OOP skills. I know the basics, understand patterns, but have clearly missed a few things along the way. Do any of you have some real good PHP 5 OOP tutorials/reads bookmarked you could share? Something other t