IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: I was hoping for a technical comparison, not flame-bait

Who started flaming? I asked you if you had actually tried learning OO... I've seen you demonstrate some serious ignorance on the subject.

\r\n\r\n

The reason I asked is because I've seen you try to use tables as the solution to every problem... when all you have is a hammer, everything looks like a nail. I don't use OO programming for everything... the scripts that I wrote for the timestamps and uptimes are procedural, because an OO approach is wrong for those problems. OTOH, building an index for a web server (including virtual hosted websites, folders within those websites, and pages within those folders) is a problem that is very easily addressed by creating objects that represent those entities, as well as directories (tables implemented as an object in to ORexx language spec) containing index objects that point to those entities. The result of this is that there are many ways to get to a particular object representing one of those entities depending on what the problem you're trying to solve is.

\r\n\r\n

For example, here's a simplified representation of the structure of a web server object in my program:

\r\n\r\n
web server\r\n   +websites\r\n      +Site1\r\n         +index\r\n            +indexitem\r\n               +page\r\n               +page's parent(always a web folder)\r\n            +root folder\r\n               +folder's properties (URL, Link Title, etc)\r\n               +SubPage array\r\n                  +Page1\r\n                  +Page2\r\n               +SubFolder array\r\n                  +Folder1\r\n                  +Folder2\r\n      +Site2\r\n      + ...\r\n   +siteroot\r\n
\r\n

By doing this, I can greatly simplify the programs that create the navigation menus etc. Here's the one that makes the sitemap for the site:

\r\n\r\n
/* sitemap.cmd - build sitemap for web site */\r\nsite = .web.server[website][1]\r\n\r\nmenuroot = site[root]\r\n\r\nif menuroot~hasindex('SUBDIR') then call sayfolders menuroot[subdir]\r\n\r\nif menuroot~hasindex('PAGE') then call saypages menuroot[page]\r\n\r\n\r\n   \r\n::routine sayfolders\r\nuse arg folderarray, \r\n\r\nsay '<ul>'\r\n\r\ndo i = 1 to folderarray~items\r\n   say '<li>'\r\n   say folderarray[i][link]~saylink || ' - ' || folderarray[i][meta]['Description']\r\n   say '</li>'\r\n   if folderarray[i]~hasindex('SUBDIR') then call sayfolders folderarray[i][subdir]\r\n   if folderarray[i]~hasindex('PAGE') then call saypages folderarray[i][page]\r\nend\r\n\r\nsay '</ul>'\r\n\r\n::routine saypages\r\nuse arg pagearray, curpage\r\n\r\nsay '<dl>'\r\n\r\ndo i = 1 to pagearray~items\r\n   say '<dt>'\r\n   say pagearray[i][link]~saylink || ' - ' || pagearray[i][meta]['Description']\r\n   say '</dt>'\r\nend\r\n\r\nsay '</dl>'\r\n
\r\n

Very nice, very neat, and it's very clear what's going on. Trying to do the same thing with a procedural type of program would be a lot more work. The key is in the classes I created, and the methods I created for them. The other key is that when I stuff the "current" object into the loop object, I can refer to it very easily, even though the actual name of the object itself can be very very large for a deeply nested webpage. It makes for much clearer code, and also makes for very easy maintainability.

--\r\n-------------------------------------------------------------------\r\n* Jack Troughton                            jake at consultron.ca *\r\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\r\n* Laval Qu\ufffdbec Canada                   [link|news://news.consultron.ca|news://news.consultron.ca] *\r\n-------------------------------------------------------------------
New Start a new thread if you two get into it :-)
Check the "As New Topic" box under the save button.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Should we put it in the Flame Quarentine section?
________________
oop.ismad.com
New just recursion there
Who started flaming? I asked you if you had actually tried learning OO

It sounded suspiciously similar to some personal insults from others. If you meant it seriously, then perhaps there are more diplomatic alternatives to asking the same thing. For example, "What is your level of knowledge of OO?"

I've seen you demonstrate some serious ignorance on the subject.

I have been tripped on language-specific trivia and vocab in the past, but never anything *fundimental* to understanding OO itself. (Well OK, Visitor still tosses me, I admit.) May I ask what this alleged big faulup was? Perhaps you are too eager to believe the FUD from those who hold big grudges against me left over from heated arguments.

The reason I asked is because I've seen you try to use tables as the solution to every problem... when all you have is a hammer, everything looks like a nail.

I could say the same about you guys and objects/classes. Objects/classes appear to me nothing more than a crippled collection: a vertical dictionary (hash) array with a search path to optional parent(s) if key is not found in current dict. (The dict keys are the attribute or method name and the value is an attribute value or an algorithm {method} pointer or code.) That is what OO boils down to in my mind.

Dictionaries are fine for simple short-term interfaces, but I would not want to build and manage large-scale structures with them alone. IOW, they are too crippled to serve as a primary building block of everything. Dictionaries have some *arbitrary* limits on them: Only one "match" max, two columns, and one index. This 1,2,1 is an arbitrary set of (low) numbers. They are not universal constants or anything.

IOW, tables make a more open-ended hammer. I am not limited by 1,2,1. I can have a 12,243,17 if I want.

The result of this is that there are many ways to get to a particular object representing one of those entities depending on what the problem you're trying to solve is.

That is what relational queries are like. You give a little relational equation that merges, filters, sorts, etc. the data into just about any organization you can imagine.

Isn't it agreed that relational DB's are better at ad-hoc queries than DB-free OO techniques? Not that ad-hoc queries are the end-all-be-all, but that compact flexibility spills over into the rest of the p/r design also.

I don't want to manage indexes in programming code (as arrays or linked lists, etc.), I want to farm that off to the DB engine. Arrays and linked lists feel too "low level" to me. Plus, it is hard to traverse them without going through the parent's interface first. Some queries don't need the parent.

Trying to do the same thing with a procedural type of program would be a lot more work.

I don't think so. You have nothing but simple recursion here. Besides, some RDBMS, like Oracle, have built-in tree operations so that you don't have to do recursion in your code. (One drawback in the Oracle approach could be different entities at different levels, though. I would have to look at some more specifics of your requirments.)

My designs tend to be less "nesty", so I don't use/need tree-centric operations/algorithms that much (if given a choice). Trees don't scale, IMO. For example, product categories tend to grow non-tree over time because products end up in orthogonal or semi-orthogonal (multiple) categories.

BTW, what is a subpage or subfolder in your setup?
________________
oop.ismad.com
Expand Edited by tablizer Nov. 7, 2002, 09:12:04 PM EST
New Recursion not the point; it's object references (new thread)
Created as new thread #61876 titled [link|/forums/render/content/show?contentid=61876|Recursion not the point; it's object references]
--\r\n-------------------------------------------------------------------\r\n* Jack Troughton                            jake at consultron.ca *\r\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\r\n* Laval Qu\ufffdbec Canada                   [link|news://news.consultron.ca|news://news.consultron.ca] *\r\n-------------------------------------------------------------------
     Hm... sharpen yer virtual pencils - (tseliot) - (49)
         Gave my opinion a while back - (drewk) - (41)
             Shoot. Missed that whole conversation. - (tseliot) - (11)
                 My goal is to automate as much as possible then pass - (boxley) - (2)
                     Do you feel... - (tseliot) - (1)
                         2 of course - (boxley)
                 Don't know how to answer that - (drewk) - (7)
                     I was interested in the web part. -NT - (tseliot) - (6)
                         Well ... - (drewk) - (5)
                             Re: Well ... - (dshellman) - (4)
                                 I think we've leapfrogged the technology - (drewk) - (1)
                                     Agreed -NT - (dshellman)
                                 And this differs from any other pair of technologies..how? - (ben_tilly) - (1)
                                     Riding the waves - (dshellman)
             That would seem to indicate that... - (CRConrad) - (5)
                 What I mean - (drewk) - (4)
                     PHP database code? - (tablizer) - (3)
                         What I mean by "manually" - (drewk) - (2)
                             inter-paradigm translation costs - (tablizer) - (1)
                                 Yes -NT - (drewk)
             Another take - (wharris2) - (22)
                 That's a growing problem at technical schools - (tjsinclair) - (21)
                     Reminds me of first computer related course that I took... - (a6l6e6x)
                     Real Story - (jake123) - (19)
                         Don't I wish - (drewk) - (1)
                             Re: Don't I wish - (jake123)
                         Web Programming and OO? - (Simon_Jester) - (16)
                             Couple of answers - (drewk)
                             Javascript is like Python wrt OO - (admin) - (2)
                                 re: Javascript is like Python wrt OO - (tablizer) - (1)
                                     That wasn't my point. -NT - (admin)
                             Functional programming languages - (ChrisR)
                             Why OO techniques in web programming - (jake123) - (10)
                                 why does that need OO? - (tablizer) - (9)
                                     It doesn't. It just makes it a lot easier. - (jake123) - (8)
                                         Of course I don't believe you - (tablizer) - (7)
                                             Whatever you say, sunshine. -NT - (jake123) - (6)
                                                 I was hoping for a technical comparison, not flame-bait -NT - (tablizer) - (5)
                                                     Re: I was hoping for a technical comparison, not flame-bait - (jake123) - (4)
                                                         Start a new thread if you two get into it :-) - (admin) - (1)
                                                             Should we put it in the Flame Quarentine section? -NT - (tablizer)
                                                         just recursion there - (tablizer) - (1)
                                                             Recursion not the point; it's object references (new thread) - (jake123)
         Low-level programming - (Arkadiy) - (2)
             I don't quite agree. - (static) - (1)
                 I was trying to say the same thing. -NT - (Arkadiy)
         I don't personally believe in end user programming. - (tuberculosis) - (3)
             human factors bust automation goals - (tablizer) - (2)
                 Re: human factors bust automation goals - (wharris2) - (1)
                     re: Peer Kudos - (tablizer)

Battling him is like wiping off puppy slobber.
147 ms