layout hack
layout hackMain Pagelayout hack
layout hack
RSS Feed RSS Feed Main page
layout hack
layout hack
layout hackAbout Melayout hack
layout hack
Software I wrote
Resume
Friends of mine
Pictures
Musicianship
Stuff I have for sale
layout hack
layout hack
layout hackPersonal Newslayout hack
layout hack
2010:
March, April.
2009:
January, March, August.
2008:
Jan, Feb, Apr, May, July, August, September, October.
2007:
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
2006:
Jan, Feb, Mar, Apr, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
2005:
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
2004:
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
2003:
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
2002:
Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
2001:
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
2000:
Jan, Feb, Apr, May, Jun, Jul, Aug, Oct, Nov, Dec.
1999:
Jan, Feb, Jun, Oct, Dec.
1998:
Jul, Aug, Sep, Nov.
layout hack
layout hack
layout hackGeek Stuff (computer related)layout hack
layout hack
Digital Music
Java
Why LiveWire Sucks
Why ASP Sucks (a bit)
Linux
MacOS
Unix
Oracle
Perl
Emacs
O'Reilly
layout hack
layout hack
layout hack(some of) My Interestslayout hack
layout hack
Humor
Sony Playstation
Cars
layout hack
layout hack
layout hackSearchlayout hack
layout hack

layout hack
layout hackAdslayout hack
layout hack



Reply to my "Why Livewire Sucks" article

John Redford (garrow@kaze.fmr.com) wrote:

I am writing in response to your "Why LiveWire Sucks" article. I have
been using it quite a bit and I thought you might appreciate another
viewpoint.

First, I have to say that I don't think JS is a weak language, for
what it is intended to be. It lacks many features of other programming
lanaguges, but it is not supposed to be used that way.

I'll just respond to your bullet points:

   You have to compile the application, and manually tell the server to
   reload the new .web compiled file.

In my environment this is a real benefit. There are a number of people
who work on different parts of a system. It is important to be able to
check that everyone's contributions are in place before switching what
the server is doing. It is also easier to make a backup copy of a
single .web file than it is to backup a multitute of html and ASP
documents.

   The compiler and the .web file format it creates differs in each
   different release of Netscape Enterprise Server, ...

This is a little annoying. I am glad that Netscape improves their
format, but backwards compatability would be nice. Still, one does not
upgrade webservers that frequently.

   The LiveWire Application Manager /appmgr/ is itself a LiveWire
   application, and it uses Netscape's bogus "crossware" concept...

I dont use the appmgr, or any of Netscape's admin server GUIs. You are
right that they are not very good, but it is much easier and safer to
just modify the jsa.conf file.

   Problem: In ES 3.5.1, Netscape hacked it so that the .web file's
   parent directory is REALLY mapped to the destination URL...

This sounds pretty serious. I haven't investigated it yet. But I have
always made of the fact that files which are not compiled in are
visible. This is handy for placing client-size JavaScript .js files
in the same area.

   No thread support exists in the lanugage

I think you should make a case of how this could be useful. Database
calls are asynchronous; there is no clear reason to have threads.

   Object orientation is based on prototypes instead of inheritance.

I happen to have spent a lot of time studying issues like this. I'd
reccomend the book _A Theory of Object_ by Martin Abadi & Luca
Cardelli.  It is not really a question of prototypes vs inheritance,
but prototypes vs classes. JavaScript lacks a class declaration
syntax. The result is very simplistic code. This is a real benefit for
making objects easy to use -- at the expense of making them robust and
safe.

   String and numeric manipulation is clumsy.

JavaScript 1.1 is not worth anything, but 1.2 is very good. The object
oriented regexp style in JS 1.2 is basically the same as that which
the Perl5 developers are introducing into Perl itself. The real
benefit is that precompiled regexps can be passed as arguments to
functions and stored as data.

   There are naming issues that hinder efficient use of
   object-oriented methodology. There is no way to package a bunch of
   JS functions into a file and give the package a name...

Objects are the namespaces, and you can reuse function names assigned
to methods.

function x () { return this + "<br>" }
String.prototype.br = x;
function x () { return this + "<hr>" }
String.prototype.hr = x;

This code works, and there are other ways to do it also. It isnt
pretty, but it is rather clever.

I think there are two important points you missed entriely. One is a
very good and the other very bad.

The ability to write glue code in C and execute it from SSJS is really
beneficial. I think that if someone wants to write something complex,
they are best off writing it some other language & then exporting
functions to JavaScript. This is very similar to the way that
languages like Perl simply provide front-end access to underlying C
and C++ code.

The main problem I have with JavaScript, both on a server and on a
client is the quoting.  Embedding JS code in a HTML document and then
trying to have that code write out HTML code with quoted tag
attributes is a real pain.  Eventually I found myself writing a slew
of JavaScript libraries to encapsulate this, but it still gets quite
ugly at times.

Anyway, I appreciated you article. Thanks for reading this, too.

--
John Redford
AKA GArrow