Javascript/E4X
Bringing it all together
Javascript/E4X | PerlI've always kept half an eye on the progress of the long, long, LONG awaited Perl 6, and more specifically on its cross-platform, dynamically typed VM at its base, Parrot.
One of the more exciting features of Parrot is its advanced language parsing features which make implementing a new grammar almost trivial -- the Parrot Grammar Engine (PGE). A humorous, but practical example of using PGE can be found in this LOLCODE implementation.
Yet Another Method to declare private methods and variables in Javascript
Javascript/E4XA number of people have described methods for private variables and methods within JavaScript.
In that spirit, this is another possible template. The main difference between this version and most others is that it uses the concise JSON notation for variable and method declarations.
File.Writer = File.Writer || function (filename, append, binaryMode) {Quality E4X articles
Javascript/E4XUnfortunately E4X documentation is very thin on the ground, even on the official Mozilla Rhino site, which has left a lot of developers either scrabbling through source code or relying on examples.
An invaluable article on the principles and practice of E4X can be found on the DevX site.
Entities in E4X
Javascript/E4XNote to self (since I keep forgetting the magic incantation) -- this is how you declare entities in E4X XML documents under Askari (my scripting-optimized version of Rhino):
js> var x =
<?xml version="1.0"?>
<!DOCTYPE x [<!ENTITY nbsp ' '>]>
<x>test non-breaking space</x>;
js> print(x);
test non-breaking space
js>
What is Askari?
Features | Javascript/E4XAskari is a custom version of the Mozilla Rhino Javascript Engine optimized for use in standalone applications and servlets. It is easily extensible either with Java libraries (SWT is bundled) or by adding to the included JavaScript library framework.
I have just released the very first public release version of the Askari system (0.1.2). It is very usable due to the maturity of the components used to assemble the system but far more still needs to be done.
Visit the Sourceforge Project site for more details.
10 rules for using REST and XML for web application
Javascript/E4X | XMLThis just seems like common sense to me. But I see people building applications that break pretty much all of these rules all too often. Whatever happened to be liberal in what you accept?

