Post #116,706
9/5/03 2:46:46 AM
|
Um. Yabut.
We are basically comparing nice OO technique (and environments) to a glorified templating language. OO is naturally going to be more distributed in its processing (think: 4 objects to achieve one process versus 4 objects within a single process). Given the PHP environment I'm not sure it's "better" to shoot for more modularity. Apples and oranges.
"There's a set of rules that anything that was in the world when you were born is normal and natural. Anything invented between when you were 15 and 35 is new and revolutionary and exciting, and you'll probably get a career in it. Anything invented after you're 35 is against the natural order of things." Douglas Adams
|
Post #116,832
9/5/03 10:57:35 PM
|
I was wondering how to say that. :-)
I've found that PHP doesn't immediately lend itself to creating multiple levels of abstraction. You have to build your own framework to do that. Unfortunately, it become obvious when you have a large enough project that it's a PITA to retrofit. Except you need it. :-/
I have to repeat here that there is still a lot of code and design in our application lying around from the very first PHP version. Every page still requires register globals enabled, for example! It would be great if we could fix all that, but time is horribly against us. PHP was a great choice in the beginning, but we are about to seriously begin looking at what to rewrite the thing in. PHP may be retained for the HTML generation, though I have my doubts.
Wade.
Is it enough to love Is it enough to breathe Somebody rip my heart out And leave me here to bleed
| | Is it enough to die Somebody save my life I'd rather be Anything but Ordinary Please
| -- "Anything but Ordinary" by Avril Lavigne. |
|
Post #116,843
9/6/03 12:22:53 AM
|
I'm going for fairly strict layout/form/content separation
...which I do a poor job of describing here: [link|http://www.endue.org/endue/design/interfacelayer.htm#chunking|http://www.endue.org...ayer.htm#chunking] Basically, the .html files get as small as: <tr valign='top'>\n <td><nobr><select name='ContactType'>%(TypeOptions)s</select></nobr></td>\n <td><input type='text' name='ContactNum' value='%(Number)s' size='20' /></td>\n</tr> ...and a Python script uses an "assembler" class to interpolate values. Working very well so far.
"There's a set of rules that anything that was in the world when you were born is normal and natural. Anything invented between when you were 15 and 35 is new and revolutionary and exciting, and you'll probably get a career in it. Anything invented after you're 35 is against the natural order of things." Douglas Adams
|
Post #117,725
9/13/03 1:14:42 PM
|
Do I smell another "OO is better abstraction" war brewing?
I've found that PHP doesn't immediately lend itself to creating multiple levels of abstraction.
"Abstraction" is a rather misused and/or subjective buzzword these days. Can you identify a specific fault of PHP? (Other than lack of named parameters and lack of function nesting?)
there is still a lot of code and design in our application lying around from the very first PHP version. Every page still requires register globals enabled, for example!
That is a fault of history, not the current language. How is rewriting your PHP for better session management an inferior solution to say moving to JSP or EJB? Java for web is anti-productivity bloat.
________________ oop.ismad.com
|
Post #117,727
9/13/03 2:17:15 PM
|
That is a fault of history OF the current language.
But I AM Napoleon!!!!! --Napoleon, in "Napoleon Bunny-Part", 1956
"There's a set of rules that anything that was in the world when you were born is normal and natural. Anything invented between when you were 15 and 35 is new and revolutionary and exciting, and you'll probably get a career in it. Anything invented after you're 35 is against the natural order of things." Douglas Adams
|
Post #117,765
9/14/03 1:49:36 AM
|
So you reject a language because
...they made a bad decision in the past which was later corrected?
________________ oop.ismad.com
|
Post #117,782
9/14/03 4:37:02 PM
|
Not at all.
So you reject a language because...they made a bad decision in the past which was later corrected? Nope. I'm not in the business of rejecting languages. But Wade seemed to imply that the "bad decisions" were exacerbated by the structure of PHP itself. In domains where I don't have direct analytical experience, I have to trust someone else's analysis; the world's too big to decide everything on my own from square one. I don't use PHP, but I have experienced similar environmental issues in my own life. Wade's description fits patterns I have observed; I trust his analysis and conclusions more often than yours as a rule. You want a more detailed discussion, you'd have to talk to Wade.
"There's a set of rules that anything that was in the world when you were born is normal and natural. Anything invented between when you were 15 and 35 is new and revolutionary and exciting, and you'll probably get a career in it. Anything invented after you're 35 is against the natural order of things." Douglas Adams
|
Post #118,175
9/19/03 2:04:09 AM
|
not very nice wording, if you ask me
but I have experienced similar environmental issues in my own life. Wade's description fits patterns I have observed; I trust his analysis and conclusions more often than yours as a rule.
A more diplomatic way to say such may be something like, "His thinking style and experience seem to better match my own than yours".
My techniques work (at least if you think like I do). Tables are objectively more compact information-wise because they use context instead of localized attribute labels/methods to specify what an attribute is. And, I think most would agree that one can see more row-wise and column-wise patterns in attributes as a table than as a bunch of linearized class attributes or XML. I am simply applying these universal truths to software development. Plus, one can do relational algebra and other table-browser tricks on tables to customize your view of the attributes. You are not stuck with Bill Gates' or Gozling's view of the friggen code. TOP gives me the freedom to see bunches of attributes as *I* want to see them, filtered row-wise, column-wise, and join-wise how I want. I become the master of my working domain, not Gozling. It seems so obvious to me. Why most of you want that tangled, static, linearized, 60's navigational-DB-style mess, I have no friggen idea. You people have weird brains. I better clone myself 100 times before more OO and array heads reproduce and kill off the last table fans.
________________ oop.ismad.com
|
Post #118,181
9/19/03 2:42:37 AM
|
Then you might have guessed I wasn't trying to be diplomatic
|
Post #117,828
9/15/03 7:49:09 AM
|
Not unless you're spoiling for a fight.
Is it enough to love Is it enough to breathe Somebody rip my heart out And leave me here to bleed
| | Is it enough to die Somebody save my life I'd rather be Anything but Ordinary Please
| -- "Anything but Ordinary" by Avril Lavigne. |
|
Post #118,176
9/19/03 2:07:43 AM
|
No, fighting the spOOilings
________________ oop.ismad.com
|
Post #117,868
9/15/03 2:52:16 PM
|
Hey Bryce...
...don't know if you keep up with such things but I did run across your name and a pointer to your website in a footnote on page 871 of the [link|http://www.oreilly.com/catalog/oraclep3/|PL/SQL Programming] book.
|
Post #118,174
9/19/03 1:42:59 AM
|
Perhaps
...don't know if you keep up with such things but I did run across your name and a pointer to your website in a footnote on page 871 of the PL/SQL Programming book.
I remember about 1.5 years ago some guy emailed me asking for permission to use my link in the citation section of his book. Perhaps this is the one. I assume it says something like, "For some possible criticism of OOP, see.....". Some university also wanted to cite my site in a published study of theirs, but wanted to know if I also had some published articles with similar content since websites alone were not acceptable to their publishers, they said.
My website is #4 under "OOP" in Google. Companies would pay zillions to be #4. You can attribute its "popularity" to its worthiness as content, or my shear persistence in spamming all the discussion boards :-) Take your pick.
________________ oop.ismad.com
|
Post #118,203
9/19/03 10:44:14 AM
|
I've read way too many Oracle books lately
The exact footnote is: * See "Object Oriented Programming Oversold!" by B. Jacobs, [link|http://www.geocities.com/tablizer/oopbad.htm|http://www.geocities...blizer/oopbad.htm] The longer context is as follows: [link|http://www.oreilly.com/catalog/oraclep3/|Pontifications]
I have to confess that I started programming before object approaches made any kind of inroads into business application development. I think I'm still waiting for that to happen.
Over the years, I've seen no compelling evidence that any particular programming style has a monopoly on the fundamental things we care about - fidelity to requirements, performance efficiency, developer effectiveness, and system reliability. I have seen a lot of fads, bandwagons, hand-waving, and unsupported assumptions (OK, I'm probably not entirely innocent myself), and object-oriented programming seems to attract quite a lot of it. That isn't to say that OOP fails to help you solve problems; it's just that OOP is not the magic bullet that many would have you believe.
Take, for example, the principle of object-based decomposition, particularly as it tends to generate inheritance hierarchies. By accurately modeling objects as they exist in the real world, software artifacts should be easier to comprehend, faster to assemble, and more amenable to large-scale system development. Sounds fabulous, doesn't it? Well, there are a lot of different ways to decompose something drawn from the real world.* It is a rare taxonomy that can exist in a simple hierarchy. My library catalog hierarchy could have been decomposed according to, say, media (print versus audio tape versus digital format....). And although Oracle provides wonderful tools for type evolution, it may still be so painful to make sweeping changes in a tyoe hierarchy that it will never happen. This isn't really the tool's fault; reality has a way of circumventing even the best-laid plans.
Nor is it clear that co-locating the programming logic (methods) with the data (attributes) in an abstract datatype yields any measurable benefits. It looks reasonable and makes for some great sound bites, but how exactly will coupling data and behavior be better than keeping data structures (logical and physical table design) seperate from processes (procedures, functions, packages)? Many development methods acknowledge that an organization's business data structures have a much slower rate of change than do the algorithms that manipulate them. It is a design truism (even for OOP) that the more volatile elements of a a system should be kept seperate from the more stable elements.
There is considerable inconsistency on this last point. Rich and famous object evangelists, while emphasizing the value of bundling data with behaviors, simultaneously promote a "model-view-controller" approach that "seperates business logic from data." Are these emperors wearing clothes or not?
Many OOP proponents have argued for years that its greatest benefit is the reuse of software. It has been said so many times that it must be true! Unfortunately, few observers have hard evidence for this, in part because there is no consensus on what constitutes "reuse". Even object apologists began promoting higher-level "components" (whatever those may be) as a preferred unit of reuse precisely because objects proved very difficult to fit into situations beyond those for which they were designed. My sense is that OOP results in no more code reuse than well-designed subroutines.
|
Post #118,298
9/20/03 12:38:50 AM
|
thanks for the quote
________________ oop.ismad.com
|