You are here: Re: Best Coding Practice « PHP Programming Language « IT news, forums, messages
Re: Best Coding Practice

Posted by burgermeister01@gmail.com on 08/24/07 23:03

On Aug 24, 4:44 pm, "Steve" <no....@example.com> wrote:
> | For the record, I think my second post has been terrible
> | misinterpreted. Product is not an extension of orders, orders contains
> | products in an array.
>
> no, i got that.
>
> | And Steve, I'm by no means saying you're wrong in claiming that OOP
> | would truly be the BEST, way to go. If it were up to me, I would be
> | doing exactly what you're saying. However, I came into this project
> | four months ago, after it's been under constant development with
> | continuous scope creep for the last 3-4 years. And the programmers
> | before me, as far as I can tell, don't understand OOP nearly as well
> | as I do, and that offsets them either further from you, because I can
> | concede that you probably do know more about OOP than I do.
>
> then you'd be giving me more credit than i'm due. ;^)
>
> listen, i know about dead-lines and costs and don't even get me started on
> scope-creep. i've been consulting on a project that i originally estimated
> and priced as a three month project. now it's two years later...at least
> they keep my extra income level high.
>
> | All they care about is that it works. I know, I know...it's
> | the wrong way to look at things, and I've made my best efforts to
> | persuade others of that, but it's unfortunately vain efforts.
>
> yeah, that's usually the way it goes. plus, the more times you try to help
> open their eyes to potential problems they will most assuredly pay for down
> the road, the more the see you as one who complains a lot...nothing more.
>
> | As for the specific circumstance we were addressing in the first
> | place, I'm not trying to say that I don't want to use OOP simply
> | because I think it's going to make things more complex for me, or
> | something like that; I don't want to use it because I don't think it's
> | going to add anything to make any feasible solution any better.
>
> it works out that way sometimes too. that would be oop-creep when a more
> simple solution lies at the fingertips of a few well written lines of code,
> but is otherwise written to match oop. it is key to recognize this, which
> you have it seems. when you sit down to write or rework code, that's the
> question (of many) i ask myself. what's the best way to express a solution
> that is stable, maintainable, and will last over the long run? (oh, and it
> has to work, not cost much, and be done yesturday)
>
> | I would still need two arrays to distinguish products
>
> well, no, you wouldn't. using oop, you can tell the object type of $product.
> if 'free' extends the product class, then you can tell by its
> type...'freeProduct' (or whatever). you can then branch your 'order' logic
> based on that if you need to do something special with 'free'.
>
> | because the
> | database is structured so poorly, and redundantly, which I probably
> | should have made more clear in the first place, but I really feel that
> | this conversation is leaving the context of the original question I
> | was trying to have answered.
>
> well again, if you oop things, you can isolate one area of code to
> consolidate the interactions with the db: one set of code to manage it, one
> set of code to maintain it. that way, further development is kept clean and
> not tied to poorly/redundantly designed db structures. if not contained this
> way, you'll see the code become even more convoluted that the db and people
> will copy and paste the already shitty code into new sections where it will
> be modified slightly for whatever purpose need...propgating one nasty end
> product.
>
> hey, didn't mean to seem like i was getting on to you or anything like that.
> i guess i was just preaching to the choir. ;^)
>
> cheers

To Steve: I did feel a bit attacked by your previous posts, but just
as your intention wasn't to offend, my real intention wasn't to defend
myself either, so much as to make the circumstances clear for the sake
of conversation. I don't want this thread to be about me so much as my
circumstances, in case someone else that reads this is in the same
place.

With that said, I intend to double post, because I feel there is
really two issues going on here. In my OP what I was really trying to
figure out is which is better: clarity through redundancy, or
efficiency, with the added question of which efficient method would be
the least likely to cause further problems down the road. It seems
that earlier we had some concurrence that the former would be the
better choice. I'm still welcome to further comments regarding that
matter.

The second part of this question, is how could this whole situation be
fixed with an OO approach. As I think the rest of this thread has
established my specifics are fairly complicated and require much more
thorough details. It's going to take my awhile to write it all out, so
I'm going to get a lot more specific in a later post. Of all the time
I've been programming the people I've met and talked to about OOP that
really knew what they were talking about have been far and few
between, so I'm really interested in learning more about what other
would consider to be good OOP.

More details later tonight or tomorrow.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация