Archive for the ‘Javascript’ tag

Coffeescript Contracts

without comments

contracts.coffee @ GitHub.

Mozilla Research:

Contracts.coffee is a dialect of CoffeeScript with built-in support for contracts. It is inspired by the contract system found in Racket.

Contracts let you clearly—even beautifully—express how your code behaves, and free you from writing tons of boilerplate, defensive code.

Personally, I think that this update to coffeescript is actually more significant that coffeescript itself. The ability to define invariants (static constraints on data) is something badly needed for new projects.

The likeness to Coffeescript contracts and Haskell types is significant and likely to draw a lot of comparison. Haskell folks might argue that it’s still not static typed — and they’d be right — but I think they would be missing the bigger picture that this is a huge leap forward for usage of invariants in a (somewhat) common language.

Firmin, a JavaScript animation library using CSS transforms and transitions

without comments

Firmin, a JavaScript animation library using CSS transforms and transitions.

With all the benefits that CSS transforms and animations can offer — namely better performance & lower power consuption — it would make sense to wrap it in an API similar to what we’ve seen with other javascript APIs.

The animation of transform properties can be hardware accelerated because modifying them doesn’t force a reflow of the page; 

Extralogical.net

Server-side Javascript & DOM (i.e. GWT Without the Java)

without comments

GWT is a great technology. It was hailed as full-stack one-language SDK with a lot of promise. However, be that as it may, I still can’t use it. Coming from the perspective of a web developer and having to give up access to HTML, Javascript, DOM, and CSS is difficult. I spent the time to learn how Javascript works and the intricacies of CSS. And even supposing there is a benefit to GWT’s compiled Javascript, I would need to learn a ton to make use of it. (I’ll bypass the fact that a developer can’t be ignorant of what’s happening [...]

NodeJS is (almost) gonna kill PHP

with one comment

A few weeks back I posted that: NodeJS is gonna kill PHP There are some merits to that statement. NodeJS is moving along quickly, with new modules getting added daily. Many of the web methodologies transition easily to Node Javascript is a strong language with a strong history of development. Asynchronous from the top to the bottom. AWESOME! YOU GET TO USE ALL THE JAVASCRIPT YOU’VE EVER WRITTEN. (emphasis added) Atwood’s Law (Anything that can be written in Javascript, will be written in Javascript) PHP is unable to advance. At the same time, I (almost) never consider an argument valid [...]

Shrink Javascript with Diffable

without comments

It’s been some time since we’ve seen any new javascript minifiers out there. Google Closure was probably the most recent but many argue that was basically a re-hash of Yahoo’s YUI Compressor. This is something different. As web applications get better, there is more Javascript. Caching has been a big help to this—even though only effective for about 40-60% of your audience. The problem with caching however, is that when a new version of the code is released the user must download all of it again. Diffable JS makes this less of an issue becuase the user might only need [...]