YAJ: Yet Another Javascript?

October 12th, 2009

1

Internet

Easy and ubiquitous access by the general population was prerequisite not just to ‘discovering’ the internet but to ‘building’ what most people today call ‘the internet’.

The exponential growth and popularization of “the internet” was helpfully fueled by a flawed ‘language’ – the HyperText Markup Language. HTML is a subset of SGML – the ‘Standard Generalized Markup Language’ standards for structuring and processing documents. HyperText are navigable references to other ‘text’ (images, video, tabular data, stock quotes, etc). We ‘click’ hypertext ‘links’ to navigate from website to website.

HTML’s flaws were one of it’s strengths – it capitalized it’s ‘flaws’ by being incredibly forgiving. The first “Web Browsers” were basically HTML renderers. The rules for writing an HTML renderer were generally that anything an HTML renderer does not understand it must ignore and anything not written in accordance with SGML rules should be worked out to the best of the ability of the person writing the renderer – i.e. skip any misspelled tags, don’t worry about proper nesting or funny-looking attributes, and move on to the next tag.

With such a forgiving ‘language’ practically anybody could write a web page and/or a website. With such a forgiving language practically everybody did write a web page and/or website. The proliferation of websites fueled an exponential expansion of the web and a consequent series of technology bubbles enriching millions and financing the marketplace in which we try to make history, or at least a living, today.

YAJ?

Technology bubbles help drive technology innovation. To paraphrase the godfather of stand-up comedy Henny Youngman “Take Javascript, please…”. Javascript was likely a case of miscommunication between Sun and Netscape 15 years ago. As a product it was not very well thought out. But it’s English-like instruction set is easy to learn for the inexperienced programmer and it offers some powerful programming features for the experienced programmer.

When Netscape included a javascript interpreter in their popular web browser – aka “HTML renderer” – it provided a whole new vehicle for programming cross-platform ubiquitous data delivery. It was quantitatively successful. Today the focus of the Browser Wars between Google (Chrome), Mozilla (FireFox) and Microsoft (IE) is to build a faster better javascript engine. Javascript, running client-side, is lingua-franca of the web.

Is the popularization of javascript the next vehicle for technologic evolution or a vehicle for the proliferation of ‘yet-another-javascript’s?

    Are Dojo, Rico, Bajax , Sajax, magicAjax and Adobe’s ‘Spry’, JQuery and MooTools indicators of new technology or Yet Another bunch of Javascripts? ASP.NET creates javascript files dynamically, downloads the name to the client who then pulls the (highly-decorated named) javascript file down to do it’s stuff locally and call back to the server. MS call it ‘Ajax’ but it looks a lot like javascript with an XMLHTTPRequest Object – just missing the .js extension. There are special-effects includes like LightBox, LeightBox, and LyteBox, tools to Graph, do MD5, RSA and Math. All javascript ‘includes’…

These are ‘web-page-centric’ tools typically used to enhance the web browsing experience. When constrained to the web page they may be Just Another Javascript. But some – whether implemented as ‘libs’, ‘plugins’ or ‘extensions’ for the browser – change the utility of the browser itself. Used this way javascript becomes an enabler to technological innovation.

Border Stylo

Border Stylo is a ‘stealth-mode’ startup in Hollywood. Their flagship product is a “massively distributed, organic data layer” centered on the browser. Border Stylo look for ‘talent’ opportunities when they hire – if the applicant appeals, has some special talent or brilliance, we’ll take them in and figure out a job for them later. When I started there were 4 guys in ‘dev’ using Ruby for a website, Scheme to build a Berkely DB backend, javascript to build a FF plugin, and open-source Unix-flavors for the infrastructure. Dev now has about 20 men and women in software, infrastructure, and Customer Support. I work on the “plugin” – a client-side device that integrates the user’s browser with our larger architecture.

Border Stylo developed a Framework for FF plugins using javascript with some XP interfaces to support their own plugin development. FF makes it much easier to write plugins if you use javascript than if you use “XP” – the Cross-Platform “XP” common object modules. “XPi” was interfaced into FF’s javascript engine yesterday and today the interfaces are being decremented in favor HTML5. The FF javascript engine is being ‘versioned’ or extended to work with HTML5.

The Border Stylo FireFox plugin was originally 1 large javascript. It worked directly with the DOM. Spencer Tipping, a college drop-out from the Midwest and Lisp aficionado with a bias for functional-programming in Haskell, applied Haskell conventions to javascript to develop a framework that includes Haskell-like monads to bubble errors up the call stack, physics for presentation problems, encryption and networking features…. We called the framework a “Tipping Machine” – a play on Turing’s theoretical computing device. Tipping’s functional construct lends itself to a powerful, expressive, English-like syntax. Call it “Tease” – an “easy” ‘dot-notation’ language. Tease is javascript written in javascript.

We are, once again, rebuilding this powerful frameworks for our ’plugin’. We still use functional javascript: javascript integrates most easily into FFs plugin methodology, it runs across all platforms on any browser, and for our requirements it provides the power of a functional programming language.

Me

I started out peeking and poking x86 hexcode into Basic’s “Rem” statements. Basic’s “Remark” statements were 256 character (0×100) comment strings beginning with “REM”. Basic programs loaded into memory at byte location 256 (0×100).

- Use a ‘Rem’ statement in the first line of your Basic program,
- Poke machine-code into it,
- Call it with a Basic ‘goto’-like to vector to 100hex from anywhere in your Basic code and send instructions straight to the processor – no interpreter, no compiler (and no linking), direct access to the register set – your processor executes opcode directly providing huge fast and compact power for those old machines limited to 16k of expensive RAM.

Today my colleagues use tiny netbooks with unix flavored OSs to apply functional paradigms to javascript. It’s not their favorite language, interpreted instructions process slower than machine code, but it’s available everywhere, runs in the ubiquitous platform-agnostic browser window on any machine, and the processor can cycle through 2 or 3 billion t-states per second. My machine-code 8088 ran less than 5 million t-states per second, about 1000th the speed of my colleague’s netbooks. Who cares if the interpreter is 10 or 100 times slower, it’s still runs 10 or 100 times faster than my old machine code did.

Today

Supply fulfills demand. Hope fuels adventure. More javascript libraries than a quant could count come out every day. Most are client-centric – they ‘richify’ the browsing experience. Some are host-centric and network-centric. All browsers today implement a javascript accessible XMLHTTPRequest object – using javascript all browsers have the capacity to communicate across networks. Ajax libs let the clients talk to the servers and have the capacity to talk to other user-agents hosts. Accessing resources across multiple hosts risks violating standard ‘www sandbox’ security models. Javascripts that frees us from the constraints of the web page and www sandbox security constraints could enable the next Web 3.0 bubble – NOT Yet Another Javascript anymore.

The most applied libraries today are software machines that use javascript in one way or another: Ruby opcodes compile to JSON at the server and deserialize to javascript back on the client-side; JSON is a ‘Javascript Object Notation’ scheme often seen replacing XML; JQuery is built to talk to the server and Drupal’s PHP-based CMS introduced javascript in V 4.7.

Border Stylo’s framework provisions:


  • networking functionality for the “communications/networking” layer;

  • local and remote data management for the “data layer”;

  • functional syntax for building the “application layer”;

  • graphical components for a “presentation layer”.

Given this n-tier architecture written in javascript a programmer should be able to write a desktop-like app – for example a stock-ticker, maybe something yet unimagined – and run it anywhere on any machine using any browser window to host it. The same browser window used for ‘web surfing’ is used for ‘productivity applications’ today from Google to Yahoo to Microsoft and across the enterprise. Browsers are not just for web-surfing anymore.

Tomorrow

The guys I work with at Border Stylo who are rewriting the Tipping Machine are young; they share a common intellectual attribute of curiosity; they are often well trained at universities like MIT and UCLA; they are all self-taught; they are clever, self-effacing, humorous and smart as whips. They prefer functional programming to OOPs but they use javascript to write it out – they apply advanced math, linguistics and engineering knowledge to meet programming challenges using this broken scripting language notorious for breaking the conventions of what is considered good programming language.

Similar to HTML javascript can be learned quickly by anyone with little investment, is loosely typed, interpreted and late-binding and hence somewhat forgiving. As a programming language it is broadly and popularly accessible. Look who’s working with javascript, observe the big money compete to produce the most efficient javascript engine. Products leveraging javascript like the Tipping Machine, Ruby and JQuery, and browser providers such as FireFox who extend javascript are breaking the constraints of the old ‘webpage’ and delivering new models of utility to the ‘computing’ experience. Fifteen years ago javascript was probably the most unlikely of language candidates to deliver the next level of ‘new technology’. Today this broken language appears to be fulfilling a role HTML played 15 years ago in powering the expansion of “the Internet”.

blindmurray@gmail.com

Tagged with: HTML, SGML, ajax, javascript

Related Posts

Author

Nick Murray

Small

Nick Murray is a Developer on our Pane team. Nick Murray is in no hurry…

Tags

API Aardvark Athletes AutoCAD AutoLISP Avinash Kaushik Barrelfish Calculus Careers Catalysts Community Community Conferences/Conventions Conferences/Conventions Culture Digital Footprints Evernote Gaming Geek Culture Glass HR HTML Haskell Holidays IPv4 IPv6 IgniteLA Ignorance Innovative Interactions Kanban Knowledge LEGO Lomography Los Angeles Martha Stewart Movies Multikernel Music NBA QA Resolutions SGML Scheme Scriptability Social Fresh Software Development Sports Stereomood Swag Unix Videos World Cup 2010 advice agile ajax apps beta testing beta versions bloggers brands browser call/cc china comet communication community management computation continuations control-structures copyleft copyright coroutines creative workspaces creativity critiques css cucumber cursors customer service customer support data products design designers dynamic code entrepreneur entrepreneurs exceptions extension facebook feed firefox franken post gadgets generators google greasemonkey grid system http humanization innovation intellectual property internet iphone jQuery javascript job search job-hunting jobs lambda lamp marketing markov chain martinis monetization strategies mottos mst3k networking new technology open source software passion patent plugin privacy productivity programming languages pure-function quality assurance readability remote pair programming resumes tips rspec ruby ruby on rails scalability screencast security servers social media software engineering start-ups state syntax team members terminology test threads tips tools turing machine type theory types typography user experience user stories vidcon web development webspider xbl youtube zappos

1 Comment Leave a comment

7 months ago

Hey Montana Flynn – Thnx for the pointer – first I’ve heard of YAV – looks tres’ cool, they’ve done a nice job – well-written, probably well supported (atleast for now)…

Is it totally client-side? (jQuery talks to the server) … Client-side is th

Reply to comment

Leave a comment

Anonymous
Right now

Your comment preview

Reply to comment





Incorrect please try again
Enter the words above: Enter the numbers you hear:
If you are not able to read this, you can get another image or hear it
Want to see an image again?

Allowed Tags

_emphasis_
*strong*
??citation??
-deleted text-
+inserted text+
^superscript^
~subscript~
@code@

Add code using a GIST
gist: gistid