Jump to content

Recommended Posts

OOP has (almost) nothing to do with syntax. It's a paradigm, so it's more about the style you program in, the way you think when coding. I'm sorry to say it, but if you've just learned PHP's syntax for OOP related concepts, you haven't learned OOP. If you'd like a book I would recommend Design Patterns by Gamma et al. It's pretty much a classic. If you want a more PHP oriented book you can read PHP Objects, Patterns, and Practice by Zandstra. It doesn't really matter that it's in PHP though. The concepts are universally applicable to any language that supports object oriented features.

Link to comment
https://forums.phpfreaks.com/topic/174241-advanced-php-oop/#findComment-918575
Share on other sites

All though Daniel0 is correct - PHP OOP doesn't satisfy traditional and strict coding patterns that many prgrammers are expecting when they move over from C or java. PHP was always intended to be more procedural. OOP was thrown in later in the versions and although OOP's support has imensely grown in the recent years, there is still a lot of improvement.

 

Don't forget that OOP does not outperform procedural code. The upside to OOP is productivity. Your coding time will decrease by ten fold if you take a few extra steps and code in OOP.

Link to comment
https://forums.phpfreaks.com/topic/174241-advanced-php-oop/#findComment-918699
Share on other sites

Advanced POOP

lol..I had to do it

 

but yeah..

If you want to learn.....OOP or Advanced OOP

I would suggest digging into some Java.  Buy you a good book, get you a good compiler.  I learned with BlueJ.. probably not the best in the world. I'm sure a good percentage of people will lean on NetBeans or something I've never tried it.  But that's how I learned OOP.

 

I don't even use Java .. at all, but I sure as hell know what OOP is I'll tell you that.  I even coded in PHP way before I used Java.  I didn't even know what OOP was until I took that Java course at college.

 

public static void main....it's burned in my brain  :facewall:

Link to comment
https://forums.phpfreaks.com/topic/174241-advanced-php-oop/#findComment-918702
Share on other sites

Advanced POOP

lol..I had to do it

 

but yeah..

If you want to learn.....OOP or Advanced OOP

I would suggest digging into some Java.  Buy you a good book, get you a good compiler.  I learned with BlueJ.. probably not the best in the world. I'm sure a good percentage of people will lean on NetBeans or something I've never tried it.  But that's how I learned OOP.

 

I don't even use Java .. at all, but I sure as hell know what OOP is I'll tell you that.  I even coded in PHP way before I used Java.  I didn't even know what OOP was until I took that Java course at college.

 

public static void main....it's burned in my brain  :facewall:

 

There's also the Microsoft (*gasp* "They're evil!") route.  Their free IDE - Web Developer Express 2008 comes with a built-in SQL server.  C# is a pretty nice language (at least, from what I've experienced so far), and is entirely OOP as well.  It's pretty much Microsoft's answer to Java (even though they're addressing the problem from opposite ends...go figure), and is a very marketable skill to have in my area of the world.

 

And, since it's apparent that I like parentheses, here are a few more:

 

(())(())(())(())(())(())

Link to comment
https://forums.phpfreaks.com/topic/174241-advanced-php-oop/#findComment-918895
Share on other sites

public static void main....it's burned in my brain  :facewall:

 

 

Did you learn that in your Java course?  Does the Java compiler return what ever is returned by the entry point to what ever executed it?  If so, then shouldn't it be int?

 

(Just being picky...  And curious if Java does that or not.)

Link to comment
https://forums.phpfreaks.com/topic/174241-advanced-php-oop/#findComment-919254
Share on other sites

Does the Java compiler return what ever is returned by the entry point to what ever executed it?

 

uh.....what!!  :shrug:  :confused:  :suicide:

 

that didn't make any gotdamned sense..

 

that's just the main method...you have to have one...it's like the constructor

 

Class PooP {
public static void main(String args[]) {
     //I forgot all the java functions
}
}

Link to comment
https://forums.phpfreaks.com/topic/174241-advanced-php-oop/#findComment-919283
Share on other sites

that's just the main method...you have to have one...it's like the constructor

 

 

Yeah, I know.  Traditionally programs return a numeric value to what ever invoked them.  0 is consider success, and anything else is failure.

 

 

Does the Java compiler return what ever is returned by the entry point to what ever executed it?

 

No.

 

Oh....

 

 

*Done thread jacking now :)*

Link to comment
https://forums.phpfreaks.com/topic/174241-advanced-php-oop/#findComment-919435
Share on other sites

A good book I looked through on a few occasions with regards to learning OOP is the Head First: Design Patterns. It's geared towards java, but does a great job at teaching the principals of OOP as well.

 

I second this.  Great content and easy to read.

Link to comment
https://forums.phpfreaks.com/topic/174241-advanced-php-oop/#findComment-923309
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.