If there was "little scope for application design", but you wanted to write something with comparable complexity, wouldn't it require more skill to continue to have working software?Originally Posted by Dr Livingston
Douglas
| SitePoint Sponsor |





If there was "little scope for application design", but you wanted to write something with comparable complexity, wouldn't it require more skill to continue to have working software?Originally Posted by Dr Livingston
Douglas
Hello World





"skeleton"Originally Posted by arborint
I think that's a good place to start, actually. [...]
Back to PHP, lets assume that our developer writes code, and has a vague understanding of what his code does, even if noone else would want to read it. With a skeleton, he has to have an understaning of the skeleton (most of it anyway) before he can put in his code. But he already understands his own code, and probably won't want to change much of it without good reason. (I find that good programmers are better at deleting their own code when they discover they don't need it anymore, especially when they have version control.) So I say lets not give him something to put his code in, lets give him something he can put in his code.
So, I'm looking for code that someone can take, copy paste into their script, that will give them value.
And I've just had a cunning plan. You do remember what site we are on, right? This is SitePoint, articles, tutorials and stuff? Lets write an article which demonstrates a piece of code (which happens to be OO) that an average PHPer can use, learn from, and find useful*.
So, what piece of code could fit that description?
Douglas
* This does assume that we are above-average PHPers, but we've been hanging around in the "Advanced" forum so long we might as well proove it.
Last edited by DougBTX; Sep 1, 2005 at 16:12.
Hello World





Perhaps you missed my point. I was saying that if you give an new programmer some clean structure (MVC for example) and tell them, "just put your code here and here" that even if what they code are just little procedural scripts, there overall application is better. And eventually as they use the structure and see some of the other classes available and ask questions here, OO will slowly seep into their code like it has yours.Originally Posted by Dr Livingston
Unfortunately your belief perhaps makes only monologue possible.Originally Posted by Dr Livingston
Christopher





I think that tack can produce something useful. The "skeleton" started from a different tack because it assumed that the programmer had recognized the limitations of her/his code and was looking for a better way.Originally Posted by DougBTX
I think a CRUD system might be a good example. But, to build something useful you need to add simple Template, DB, Pager and Form Field classes to a codebase similar to what we have in the "skeleton" to make it happen. That is where the "skeleton" has stalled.
I could post some of the code that I have been using to try out my fork of the "skeleton" codebase, but it would need to be refactored because I just grabbed some Pager code found on the web.
Christopher




Well ... yes and no. There is nothing wrong with procedural if done right. I was refering to "the right way of doing things" i.e. Purity vs "getting the job done" i.e. Utility. And I am getting tired of the later.Originally Posted by dreamscape
Sure, phpBB is a forum, what harm can come from it being hacked, right ? But what if the next time is a shopping cart you used and someone gets all your contact information, you social security number, and your bank account / credit card info. What if it's a paid members only forum and an outsider gets a hold of your world domination scheme ? What then ? Huh ?





Why?Originally Posted by arborint
Hello World





I have found that if you don't have these utility class separated out, they clutter up the example code and obscure what you are trying to show.Originally Posted by DougBTX
Most of us have a number of support classes and just take them for granted. But to the new programmer they are "skeleton" because, like Controllers, they exist to support the application specific code.
But maybe I am thinking of something different than your idea?
Christopher


Douglas, I've spent quite some time writing a reply and at the end deleted it completely, I was repeating myself (bottom line: A contract breach and invalid user input just isn't the same thing in my book)
We simply have different opinions on the matter, I believe you've expressed yours and I've expressed mine, we'll probably never agree, and that's just fine by me. It has been an interesting discussion, at least to me, YMMV![]()
Per
Everything works on a PowerPoint slide
Probably more accurately, some of us see OO as a tool, and other see it as a god. Walk with care if you fall into the later categoryOriginally Posted by Dr Livingston
![]()




I see it as a way of livingOriginally Posted by dreamscape
(Why, are you going to shoot us ?)





Re: OOP Articles / Site SystemOriginally Posted by arborint
Yes, I think a CRUD example would be good. Perhaps we could focus almost totally on the R, leaving Pager and Form Field classes till later, and use bare-bones PHP templates for output.
Douglas
Hello World
Bookmarks