I'm looking for some . . . direction. Let me give you my situation. I'm an amateur PHP hobbyist, nothing close to a professional developer, and I doubt that I will ever get involved programming in PHP full time. That said, I am an office worker, and I find my skills in PHP (let's call them "intermed...
I've got a question about how to implement an MVC architecture (for lack of a better word) for a web app. I've studied the documentation for CodeIgniter, and that's been extremely helpful. It showed me how to separate my views from my application logic, and how to move database queries out the contr...
I’ve got some questions about transitioning to OOP design for a website with, of course, dynamically generated content. I’ve been reading a lot about frameworks and MVC design, and I’ve read a few tutorials, such as the one for CodeIgniter and a couple for Symfony. I’m in the process of reorganizing...
Well, thanks, I really appreciate that. It's difficult to assess one's skill level relative to the general php community, particularly when working in isolation, more or less. I've recently been trying to reach out and connect more. Maybe I'm more advanced that I realize, but there sure is a lot to learn out there.
Yeah, it's kind of an adjustment to realize that I can use something without trying to fully understand it in every detail. Like that Zend Gdata library I'm using. I understand it well enough to get the results I want. But I'm not an expert in it . . . but it's still quite useful.
No insult taken. And, I think you're right . . . it's nice to have the freedom to code in one's own style. But at some point, you want to use the utilities that other people have created, and you've got to understand their dialect. That's exactly what got me started down the road of trying to understand OOP.
This was a very useful answer, and I really appreciate you taking the time to provide some help. I've got a quick follow-up question (obviously from a novice perspective).
In your Person class, you have methods designed to set or get each of the various properties. Why not simply make those properties public and just access them like so?
$person = new Person;
$whatever = $person->id;
It seems like all of the "extra" methods would be unnecessary overhead. That said, I know what you're showing me is standard practice. I've seen it in two of the books I'm studying. But the books don't explain why it's done that way.
Well, thanks, I really appreciate that. It's difficult to assess one's skill level relative to the general php community, particularly when working in isolation, more or less. I've recently been trying to reach out and connect more. Maybe I'm more advanced that I realize, but there sure is a lot to learn out there.
Just wanted to say "thanks" for all the replies. You all are a great resource!
Yeah, it's kind of an adjustment to realize that I can use something without trying to fully understand it in every detail. Like that Zend Gdata library I'm using. I understand it well enough to get the results I want. But I'm not an expert in it . . . but it's still quite useful.
No insult taken. And, I think you're right . . . it's nice to have the freedom to code in one's own style. But at some point, you want to use the utilities that other people have created, and you've got to understand their dialect. That's exactly what got me started down the road of trying to understand OOP.
This was a very useful answer, and I really appreciate you taking the time to provide some help. I've got a quick follow-up question (obviously from a novice perspective).
In your Person class, you have methods designed to set or get each of the various properties. Why not simply make those properties public and just access them like so?
It seems like all of the "extra" methods would be unnecessary overhead. That said, I know what you're showing me is standard practice. I've seen it in two of the books I'm studying. But the books don't explain why it's done that way.
(Couple of edits for clarity and formatting)