Last updated October 17th, 2018 at 05:05 pm
Any takers?
Lemme explain.
I’m trying to dive into OOP in PHP. If you are, too – or if you happen to enjoy teaching others what you already know – maybe this is for you.
Background
I’ve learned I’m not alone in finding OOP in PHP a tough nut to crack. Many who are much better programmers than I (a late-in-life self-taughter) agree.
Most online tutorials use “cars” and “bicycles” as the metaphors for objects. They don’t help me. I don’t write functions about cars and bicycles. I write functions to generate form controls for custom CMS applications, to interact with databases, to authenticate user logins, etc.
Call me silly, but I don’t think I should have to take a shower, don whatever presentable garments I might own, and drive in Atlanta rush-hour traffic for over an hour to sit amongst a group of developers with widely divergent backgrounds and skillsets to hear a presentation (that has yet to be offered) on OOP in PHP.
My Proposition:
I have a GoToMeeting account supporting up to 15 participants.
I’d like to try having occasional GoToMeeting Web conferences with like-minded PHP developers. We can do these any time. From anywhere. For as long or short as we want to/can stay online. Without having to shower and dress.
- We can share classes we’ve created and seek advice on making them better. (My first-and-only does work, but I’m not sure why, and I’m still baffled about property and method visibility.)
- We can share function libraries and ask others to opine on whether, why and how they might be converted to classes.
- We can post code on our blogs and invite fellow study-group members to comment.
And so on.
Any takers? Any thoughts?
Feel free to comment below, including a brief description of your background / experience / skill level in PHP, MySQL, and PHP OOP. If you want to mention your availability, do so. If you want to suggest study topics, have at it!
Thanks!
Sounds like a good idea. I’m interested.
I’m interested in learning. I’m a NOOB to PHP but I’ve been doing HTML CSS for awhile now.
Good news.
A fellow PHPer with considerable PHP OOP experience (and a really good guy) is planning a PHP OOP presentation for an upcoming PHP Users’ Group Meetup. He wants to known what people want to know. He might join our study group to find out! I’ll keep you posted.
Jeff
Iām interested, also.
Count me in! You definitely have the support of AtlantaPHP as well.
Chris
Call me curious, eh! (believe me – people probably call me a lot worse!)
Great to see interest growing
@Chris: Appreciate the support.
Logistics question for all: Is a Saturday a good day for this? Maybe like 10am? Other suggestions?
More than 5 years of exp in php , joomla and wordpress now a days i am working as a web developer
I’m also interested. I am still fairly new to programming but have been making an effort to change my programming style to better match that of the industry standards and follow best practices. I too have trouble understanding from car vs truck, foo/bar, type examples. I feel like I’m in agreement that OOP is the way to go and have many reasons for that but still find it hard to really verbalize the reasons why.
Hopefully I can get a better understanding from you guys and sharing my thoughts with you, maybe I’ll find out I’m not too far off in my own understanding.
As for online meeting times, my schedule is up in the air at the moment waiting to see when I start my new job. I am scheduled to work on Saturdays if all goes well so that time will be unavailable for me.
If I can’t make it at what ever time you decide, I’ll still contribute when I can.
I’m interested in helping, and have written numerous classes, some for CodeIgniter and some for our own in-house framework. I can share as many everyday examples and applications as you could possibly want š
Great, @Jonathon. We’ll appreciate your help.
PS to all: Am consumed by a big project just now. When the smoke clears – 2nd week of April, I hope – I’ll schedule our first study group session.
Hi Jeff,
This sounds like a great idea. I’m an experienced PHP developer, but a bit outdated by today’s standards and OOP is certainly one of those standards. You can count me in… and thanks for providing us this platform!
Thanks for your interest, @Marc. I look forward to our first session, which I hope will take place within the next couple of weeks.
Hey guys,
The OOP Talk is scheduled for August. If any of you have any specific questions that you would like me to go over in this meetup please let me know. I will try to answer them to the best of my knowledge.
I see allot of people having trouble getting past the simple examples found online like the car truck classes that really have no real world purposes. I am planning on showing some real world examples that I use everyday along with some cool techniques that allow applications to do real neat things.
I want to make sure that I cover any questions you guys may have so please ask away. š
Here is an overview of what I currently understand about object-oriented programming along with my proposal for the agenda for our first PHP Object-Oriented Programming Virtual Study Group (“POOPvsg”) session. I welcome your comments.
My Understanding of OOP, in a nutshell:
OOP appears to be about two things: Mindset and Mechanics.
Mindset
An OO mindset advocates reusable, generic code that is application-apathetic (loosely tied/coupled to any specific application). It advocates functions (I know… they’re called “methods” in OOP) that serve simple, solitary purposes. It advocates modularity.
Mechanics
OO mechanics involve classes and objects and constructors and destructors (and more, of course). It offers ways to manage the scopes of variables which aren’t available in procedural programming.
I think one can code with an OO mindset without using OO mechanics. In fact, I believe I do this to some extent. But I think the promise of OOP is that the OOP Mindset and the OOP Mechanics work together to make code that is potentially more efficient, debuggable, and maintainable – especially in collaborative development environments.
My proposed agenda for our first POOPvsg session:
I can present (via GoToMeeting) two sets of code as a kickoff point for a discussion of OOP in PHP.
One set of code consists of procedural functions I recently wrote for a back-office invoicing system. I’ll welcome any and all comments about whether and how and why these functions could/should be converted to methods within classes.
The other set of code consists of my first PHP class: a class for generating form controls for a typical add/edit screen for database-driven content (and then validating and processing the form submission). I’ll welcome any and all comments about whether and how and why the class could be improved.
Let me reiterate that this agenda is only a proposed “kickoff point”. I don’t intend to dominate the proceedings. And I hope you will share your code as well. And while the goal of this study group is not necessarily to help John Anderson plan his August OOP talk at the PHPATL Users Group, I can’t imagine that our discussion wouldn’t help him in that regard – and I think we’ll all benefit from John’s participation.
Comments?
You have pretty much summed up my explanation I guess I am not needed any more. š
I would like to add that OOP also is handy in keeping functions / methods within a specific namespace.
It allows you to design a system with the flexibility to allow others to create plugins and modules while forcing them to implement specific interfaces allowing your application to know what methods to expect and call.
This is extremely useful when working on a team project or an open source application.
Many things that I had no clue how to do before, have been opened to me and has given me a new perspective entirely on every application I have programmed in the past and will in the future.
I am ready to participate. Lets get a day and time set. I’m good for 7pm -10pm Thursdays and Mondays.
Sounds like a pretty good plan to me, play it by ear. Did you have any specific dates/times in mind?
Since I work from home, I can accommodate a wide meeting schedule
like Monday through Saturday, morning, afternoon, and night.
Thanks again, Jeff, for getting this moving! I think your agenda and code samples will be a great start, but we may want to rethink the acronym. š I’ve used GoToMeeting, but haven’t run a meeting through it myself – is it easy enough to record a session or do you need separate tools and setup for that? Might be good to archive these if it’s not a huge production.
As far as dates and times, my suggestion (and since John mentioned Mondays and Thursdays) is that we “meet” on a weeknight, as I imagine some people would have weekend or family events, go out of town for a weekend, etc. I like 7-10 on Thursdays too, but perhaps we should keep it to 1-2 hours. Or we can just wing it and see what the demand is.
I’m not saying we necessarily should do this, but something I saw come about recently is that NashvillePHP is doing a similar group in a “book club” format and are starting off with the Design Patterns book from the GoF. See http://phpbookclub.com/.
There are a few books I know of on OOP in PHP. I own (and haven’t made the time for) “Object-Oriented PHP” (http://nostarch.com/oophp.htm). I know it doesn’t have car or bicycle examples. š
Other books include: “PHP Objects, Patterns and Practices” (http://www.apress.com/9781430229254) and “Object-Oriented Programming with PHP5” (http://www.packtpub.com/oop-php-5/book).
FIRST GOTOMEETING MEETING THU, 5/3/2012, 7:00 PM ET!
Based on John’s suggestion which was seconded by Terry and Chris, I’ve set up our first GoToMeeting meeting for TOMORROW, 5/3/2012, 7:00 pm ET. You should be receiving an email with connection instructions. If that doesn’t arrive, let me know.
We can meet as long/short as we want, and you can leave any time.
BOOK CLUB APPROACH:
I like the book club idea Chris referred to, and thanks, Chris, for the book suggestions. I have one of my own (“PHP Object-Oriented Solutions” by David Powers, published by friendsOfEd/apress) and perhaps others will have more.
RECORDING OUR MEETING:
Yes, I can record the meeting and then make it available to people. I’ve only done this once: 10 minutes ago, as a test. It worked.
WEBCAMS ALLOWED:
While you don’t have to shower, you might want to comb your hair. If you have a Webcam and want to show your face to say hi, G2M supports up to 6 concurrent Webcam sessions.
PS: My GoToMeeting license supports up to 16 participants (including the host). If any of you has a colleague who wants to participate, feel free to invite him/her. I don’t anticipate running out of seats. After we do this a couple of times, we may have opinions about the optimal number of participants.
Look forward to meeting with you tomorrow if you can make it.
Jeff
Looking forward to the meeting. TOMORROW, 5/3/2012, 7:00 pm ET.
OOPS…
How/why did I schedule our first PHP OOP Virtual Study Group session to conflict with the Atlanta PHP User Group’s monthly meetup?!
So right out of the gate, at least two peeps who have expressed interest in this endeavor (Chris S and Logan G) wouldn’t be able to attend our GoToMeeting…
Would next Monday or Thursday be better?
I vote for Thursdays on nights when the user group isn’t meeting, but am certainly flexible. Whichever is decided, we should probably try to stick to the same day of the week, so it’s easy for people to remember and get in the habit of keeping the dates open.
We could try tonight, or Friday or Saturday… š
I’m inclined to follow Chris Spruck’s suggestion and reschedule to another Thursday night. I especially want Chris and John Anderson to attend, as I’ve had multiple (though separate) conversations with them over the past months about this topic.
Sorry for the confusion.
Jeff
Hi Jeff,
I found the following OOP for PHP videos and they look good:
Object Oriented PHP for Beginners (Videos)
http://www.killerphp.com/tutorials/object-oriented-php/
Hi Jeff,
Thanks for hosting the meeting tonight!
How do we get editor access to the private blog?
Terry
Upon further reflection, I think a PRIVATE FORUM would be the better tool for our ongoing written conversations. I may install a new PHPBB3 forum on JeffCohan.com for that purpose. I’ll try to get back to peeps later in the day about that.
Meanwhile, did anyone receive the email from John A with the Database class? I did not.