Spicing Up Embedded JavaScript
One thing that I absolutely adore is the sheer embedability of JavaScript. It's a (comparatively) simple language that is fiercely flexible. I tend to liken JavaScript to water - alone it's painfully simple but it can take the form of its container - and mixing it with anything enhances its flavor.

Since JavaScript, alone, is so dumb (we've become spoiled by browsers which provide DOM, setTimeout/setInterval, and even a global object reference - none of which are necessarily required my an ECMAScript implementation) we must rely upon the spice of 'larger' languages to help it gain some taste.

We can start by taking a look at some of the most popular languages that are available today: Python, Perl, PHP, Ruby, and Java -- all of which have, at least, one embeddable JavaScript interpreter.

One thing is the same in all the interpreter implementations, as well, they all have the ability to introduce (at least) simple objects into interpreter (from the parent language) and extract values again. Sometimes this may be as simple as executing a JavaScript function and getting its return value (which is often translated from its internal JavaScript form back into the native language).

Read Full Story at http://ejohn.org

comments Discuss   recommend Tell a friend   addto Bookmarks 

Avatar soloWebDev submitted 73 days ago
Related sources
1 votes Free Super AJAX Calendar Javascript XML PHP with Admin
1 votes In the absence of JavaScript what does your website do? Anything?
1 votes Ajax Anywhere :: AJAX without JavaScript coding
1 votes Engine for Web Applications
1 votes Douglas Crockford on JavaScript Security: Durable Objects

Comments


Log in to comment or register here.