
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-------------------------------------------------------------------