Re: modularity... (was: Re: Looking for real world examples to explain the difference between procedural (structured?) programming and OOP)




"H. S. Lahman" <h.lahman@xxxxxxxxxxx> wrote in message
news:FLN_l.23$NF6.3@xxxxxxxxxxxxxxxxxxxxxxx
Responding to Smith...

nevermind that JavaScript is also an OOPL FWIW...

LOL. It is a stretch to even call it object-based.

Show me a complex web site that uses a lot of JavaScript and I will show
you a web site with chronic broken page problems. JavaScript gets my
vote for the worst contribution to software development since MS-DOS or
the old UNIX sendmail program.


Your criticism of the language seems to be based on the things web
developers create with it. That seems a bit unfair to the language. Web
developers do things in very strange ways.

I was mainly objecting to the notion of JavaScript as an OOPL. It does not
<directly> support very basic OOA/D concepts, such as the separation of
relationship implementation, instantiation, and navigation. Worse, it
encourages bad OOA/D practices, such as passing object references around.
Those issues, in turn, adversely affect the maintainability of large
applications because one cannot properly isolate and encapsulate concerns
separately when necessary.


it depends a whole lot though on ones' definitions of OO.

you seem to equate OO with OOA/D.
others associate OO with classes and inheritence.
others associate OO with "passing around things by reference";
others associate it with "code which looks like Java";
....

thing is, there would not seem to be any "solid" definition as to what
exactly this "OO" is, so FWIW, I don't think it particularly relevant to
argue what is and isn't OO.

now, in my case, I may use modifiers to clarify what I mean:
C/I-OO=Class/Instance OO, OO in terms of classes, instances, and
inheritence;
P-OO=Prototype OO, OO in terms of "bags of slots" objects and delegation;
....

it is much the same as how one can define:
SI-OO=Single Inheritence OO (Java, C#, ...);
MI-OO=Multiple-Inheritence OO (C++, Ada, ...);
....

so:
OO -> C/I-OO, P-OO
C/I-OO -> SI-OO, MI-OO
....

as for how things like methodologies fit into this, I have no idea...

the great problem with methodologies as what they are not:
specific programming rules (feature use rules, naming conventions,
indentation style, ...);
syntax or semantic features;
....

so, it is not clear where exactly a methodology fits in the whole scheme of
things.

so, I guess methodologies go under philosoply then.

Philosophy -> Existentialism, Nihilism, ..., OOA/D?...

doesn't seem like an ideal fit there either, so I don't know...


FP is at least a lot easier to classify, since FP can be classified more
easily in terms of rules and language features (closures, lexical scope,
immutable data types, ...).


but, it all gets complex, especially if one starts considering features
along several different axis...
in this case, each language could then be described via a list of associated
keywords (which could in turn be reduced to predicates, ...).

(hmm, this is oddly similar to how I implement my typesystem, AKA, via
predicates...).



Granted, there are certainly shortcomings with the language. The typeof,
operator parseInt, and the Date object, to name a few.

Host objects are such things as an HTML document, the browser window, or
XMLHttpRequest. These things are not native to the language. The APIs
developed by Netscape, Microsoft, and the w3c have affected how we code
our scripts. Many of the w3c standards were copied from vendor APIs, such
as microsoft's DOM. Sometimes the standard was specified in ways that are
incompatible with the original.

I agree that the infrastructure vendors have not helped and, in fact, have
often discouraged good OOA/D practice. That's because they were largely
designed to support the CRUD/USER layered models and the RAD form/table
paradigm.

But, as you point out, that just leads to a chicken & egg problem. Did the
infrastructures build around JavaScript or did JavaScript build around the
infrastructures?


a similar issue can be raised about Python...


'Python considered harmful'... or at least, as can be noted by the
prevalence of nearly every Python based app I have seen to crash randomly
(typically with "unhandled exception" errors, or typically "parse error"
errors).

even as "unsafe" as C would seem to be, random crashes from C-based apps is
far less than from Python apps...


this is especially obvious in Fedora, where lots of random stuff (ranging
from the 'Anaconda' installer, used when first installing the OS, to the
package updater, ...) tends to keep breaking with unhandled exceptions in
Python code...

and, in many other Python based apps (such as Blender, ...), it is, in all,
a similar problem...


sadly, this is enough to make me more positively disposed towards languages
like Java than I am towards Python...


For the record, I have nothing against JavaScript per se. I see no problem
with using it for form-based processing in thin clients. My problem lies
in using it on the server side or for fat clients when complex processing
non-CRUD/USER needs to be done -- or calling it an OOPL.


Java is better in this case I think (sever-side Java, no to server-side
JS...).

as for OOPL, well then, it depends mostly on whos definitions are being
used.
in my case, I try to be more open, and allow for a number of
alternate/parallel sets of rules and definitions to be in use at the same
time...

it is much the same as for matters of religion and philosophy...



.



Relevant Pages

  • Re: a little more help with python server-side scripting
    ... earlier in the thread and/or google for Python ASP. ... enabled Python as a scripting language on the servers... ... of your entire web site in the safe and free environment of ... You don't rely on any particular technology from your ISP, ...
    (comp.lang.python)
  • Re: JS Parallels to Forth
    ... community, and how much support that community can offer. ... Python or Ruby. ... In Javascript, I see a lot of philosophical similarity to Forth. ... The expressive power of a language is ...
    (comp.lang.javascript)
  • Re: (Yet another) simple JS OO framework (by a python programmer)
    ... No way - it makes me someone who has gotten very comfortable with python, ... who is feeling way out of his comfort zones with javascript, ... applying the expectations and pre-conceptions of that other language to ... var constructor, key; ...
    (comp.lang.javascript)
  • Re: Django or TurboGears or Pylons? for python web framework.
    ... There was a case for web site that will be public to Internet for me. ... I searched more web framework of python from Google. ... I want to use Django but the AJAX support will be ... Also I need to select a JavaScript framework and lean it, ...
    (comp.lang.python)
  • JS Parallels to Forth
    ... community, and how much support that community can offer. ... Python or Ruby. ... In Javascript, I see a lot of philosophical similarity to Forth. ... The expressive power of a language is ...
    (comp.lang.javascript)