[Web-SIG] JavaScript libraries

Johnny deBris johnny at debris.demon.nl
Tue May 10 20:47:13 CEST 2005


Carlos Ribeiro wrote:

>On 5/10/05, Christopher Lenz <cmlenz at gmx.de> wrote:
>  
>
>>Putting together a whole library or application is actually
>>discouraged by the properties and restrictions of the language: no
>>importing of external modules, no proper namespacing, etc. You really
>>have to go out of your way to create a reusable, modular library, and
>>it's still going to be a mess.
>>    
>>
>
>  
>
You're right about the first part, I hope to prove you wrong on the
latter. See http://debris.demon.nl:7080/projects (or
http://debris.demon.nl:7080/cgi-bin/viewcvs.cgi) for some JS libs
(there's also some Python in there) which I'm working on, including XML
SAX and DOM libraries (the latter because IE's DOM support sucks), a
WebDAV library, a reusable tree implementation (which can be used in
async situations too), and some more.

Those will all (at some point, I don't have much time) be released with
open source licenses at some point (some BSD-style, some GPL), and, if
it turns out people are interested, I will set up mailinglists and allow
people to join me developing them further.

>I use a home-baked templating system to generate
>custom Javascript code.
>
I wonder why everyone seems to insist on generating JS server-side (or
at least generating it). It's a perfectly usable language (although I
really miss some of Python's more advanced features, and JS can be
pretty inconsistent at times) and code generation frameworks (in my
experience) usually don't allow you to be as flexible as when you'd just
write the code...

Are people really that revolted by the language, or is it just that
Python is so much nicer? (Obviously Python *is* way nicer, but otoh,
having hacked quite a lot of JS over the last 1.5 years (way over 10000
lines) I think it's not all that bad...)

Cheers,

Guido

> My library is very small and contains only
>often-used routines (mostly, JSON & IFrame-based RPC code). The Python
>code generates custom Javascript event handlers, which tend to be
>small too. The main disadvantage is that it can't rely on caching the
>library on the client, but that's not a big deal most of the times
>IMHO.
>
>  
>



More information about the Web-SIG mailing list