Posts Tagged ‘JavaScript’
Saturday, November 14th, 2009
After nearly two years I've finally gotten around to releasing my PHP JavaScript parser, although documentation is still thin on the ground.
The library has been split in two:
- jTokenizer – A JavaScript tokenizer designed to mimic the PHP tokenizer.
- jParser - The fully blown JavaScript syntactical parser which generates a parse tree.
(more…)
Tags: JavaScript, jParser, parsing, php, rainy day
4 Comments »
Saturday, March 14th, 2009
After a brief exchange of tweets with @jsmag I discover this web development ‘podcast' : webdevgeekly.com, which appears to be run by the same people as jsmag.com. About 9 minutes into the following podcast there is a 2 minute discussion about JASPA. Conveniently just 24 hours after I rescued my site from a hardware crash.
> http://www.webdevgeekly.com/r/www.webdevgeekly.com/mp3/geekly6.mp3
Tags: JASPA, JavaScript, media, pr
No Comments »
Thursday, February 26th, 2009
I've been asked how I generate the JavaScript parse table for jParser, so I'm posting the grammar file here for anyone else who's interested.
↓ JavaScript grammar file for jParser
(more…)
Tags: JavaScript, jParser, parsing, php
No Comments »
Tuesday, February 24th, 2009
I've received quite a few emails recently asking me where the code is for jParser.
I've had to disappoint so far, because it's not currently available for download. My web analytics also tells me that a lot of people are finding this blog by Googling "php javascript parser". There's clearly a need out there, so I'd better do something about it.
I know why I want a JavaScript parser, but what kind of things might you need it for? What API features/functions would you like to see? Please post a comment and let me know. Watch this space for a release, and in the mean time here's some food for thought …
(more…)
Tags: JavaScript, jParser, parser, php
6 Comments »
Saturday, January 17th, 2009
I'm suspicious of people who don't enable commenting on their blog – that just makes it a book. But this gripe aside, I like what Joel Spolsky has to say about abstraction in modern programming. Well, it pushes one of my buttons; perhaps "like" has nothing to do with it.
Sadly the people I feel need to appreciate his point the most probably won't get past the second paragraph. That point, or at least the one I took away from it, is best summarized by this quote:
"[...] as we have higher and higher level programming tools with better and better abstractions, becoming a proficient programmer is getting harder and harder."
(more…)
Tags: abstraction, AS3, JavaScript, PaperVision, php, recruitment
1 Comment »
Saturday, January 3rd, 2009
JavaScript language abstraction
I just read this blog article by John Resig, the author of jQuery. The article in general is a criticism of various projects like my very own "JASPA" – A criticism of frameworks that attempt to bring JavaScript into the 21st century by abstracting it into a different language. (more…)
Tags: JASPA, JavaScript, jQuery, Prototype
1 Comment »
Sunday, December 28th, 2008
In my article about method closures I showed a way to neatly create a portable reference to an object method that doesn't ‘forget' the object it belongs to. I have since discovered an aggravating problem on – you'll never guess – Internet Explorer!
(more…)
Tags: IE, JavaScript, Microsoft Internet Explorer
1 Comment »
Monday, November 24th, 2008
I was further convinced this week that the world needs JASPA when my Flash developer colleague asked me about closures in JavaScript. He's been knee-deep in AS3 for almost a year, so JavaScript must seem rather weak now.
Unlike JavaScript and AS2, AS3 supports method closures implicitly; so I made sure they were built into the JAS language. Such a thing is not native to JavaScript so the JASPA compiler automatically generates a call to helper function jaspa.closure whenever an object's method is referenced.
If you've ever used Delegate.create in AS2, then you've encountered this issue. If you don't see the problem, consider this example in JavaScript:
(more…)
Tags: AS2, AS3, closures, Delegate, JavaScript, OOP
2 Comments »
Wednesday, November 12th, 2008
Explorer throws an unknown error when you set innerHTML
The bug seems to only occur for certain markup. I'm not 100% sure what the defining problem is, except that markup containing block elements like <div> and <p> seem to invoke the error. Anyway, this drove me up the wall recently so I thought I'd share the work around I came up with.
(more…)
Tags: bug, DHTML, DOM, HTML, JavaScript, JScript, Microsoft Internet Explorer, MSIE
3 Comments »
Sunday, October 26th, 2008
JASPA is a JavaScript cross-compiler written in PHP.
Write robust object-orientated applications in a strongly-typed language (modelled on AS3) and compile it into regular JavaScript to run in a web page, or any other environment that implements a JavaScript engine.
Download JASPA from SourceForge
https://sourceforge.net/project/showfiles.php?group_id=243463
(more…)
Tags: ActionScript, JASPA, JavaScript
1 Comment »