[Web-SIG] JavaScript libraries

Carlos Ribeiro carribeiro at gmail.com
Tue May 10 12:59:28 CEST 2005


On 5/10/05, Christopher Lenz <cmlenz at gmx.de> wrote:
> Personally, I think that the recipe/cookbook style still works best
> for JavaScript. Unlike other so-called "scripting" languages like
> Python or Ruby, which have long grown to be powerful general purpose
> languages, JavaScript really is a language for scripting objects
> provided by the environment (in the case of web-development, the
> browser). 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.

My own approach to it is slightly different. Instead of a big
'standard library', I use a home-baked templating system to generate
custom Javascript code. 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.

-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: carribeiro at gmail.com
mail: carribeiro at yahoo.com


More information about the Web-SIG mailing list