SitePoint Sponsor |
|
User Tag List
Results 126 to 136 of 136
Thread: How much OO is too much?
-
Aug 16, 2005, 14:14 #126
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Dr Livingston
DouglasHello World
-
Aug 16, 2005, 15:28 #127
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Aug 16, 2005, 16:06 #128
- Join Date
- Aug 2004
- Location
- California
- Posts
- 1,672
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Dr Livingston
Originally Posted by Dr Livingston
Christopher
-
Aug 16, 2005, 16:15 #129
- Join Date
- Aug 2004
- Location
- California
- Posts
- 1,672
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Aug 16, 2005, 16:18 #130
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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 ?
-
Aug 16, 2005, 17:23 #131
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by arborint
Hello World
-
Aug 16, 2005, 18:00 #132
- Join Date
- Aug 2004
- Location
- California
- Posts
- 1,672
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Aug 16, 2005, 21:05 #133
- Join Date
- May 2002
- Location
- Gent, Belgium
- Posts
- 284
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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, YMMVPer
Everything works on a PowerPoint slide
-
Aug 16, 2005, 22:37 #134
Originally Posted by Dr Livingston
-
Aug 17, 2005, 02:35 #135
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by dreamscape
(Why, are you going to shoot us ?)
-
Aug 18, 2005, 06:04 #136
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally 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.
DouglasHello World
Bookmarks