Category Archives: Development

Performance Tuning

So I’m deep in the middle of some performance tuning work for the release of Coherent 3.0. Everyone knows that optimising Javascript is a bit of a black art, but I almost think I’m doing something wrong.

Here are the performance metrics for Coherent 2.0 running on IE 8 (in a VM):

[...]

Declarative Syntax for Child Widgets

One of my goals for Coherent 1.1 is the option of using a declarative syntax to set up child widgets. This would greatly simplify the average init method and make the code a bit clearer and easier to understand.

Favourable Reception for Coherent

I recently announced the upcoming release of Coherent 1.0 and I’ve been very pleased by the positive reception the library has received.

Lots of folks have come out of the woodwork to either say they’ve been looking for something like this for ages. I guess there are more fans of the Apple development model than I [...]

Selectors and Bindings

One of the routine complaints about Coherent (yes, I’m talking about you Ryan) is the use of custom attributes. It seems that some people like their HTML pure, like it was back in the old days.

Coherent 1.0 Release Candidate 1

I’ve been working somewhat furiously to get Coherent ready for its first release. There’s already code in the wild on a heavy-traffic e-commerce site that is using it, but there is still a bit more testing I’d like to do. And the documentation could use another brush up.

If you’ve downloaded either the ZIP file or [...]

Properties And Bindings

Possibly the two most important concepts in the Coherent library are properties and bindings. If you’re familiar with modern programming languages, you’ve probably run across properties before, but bindings may be new unless you’ve worked with Apple’s Cocoa library. In order to get the most out of Coherent, you’ll need to understand these two facilities.

Faster than a Locomotive?

After squashing a couple nasty bugs this weekend, I got to thinking about the performance implications of my solution. In a nutshell, the solution required wrapping getter methods with code to establish the ownership link between the value and the object. This wrapping only occurs for properties that are observed or part of a dependent [...]

New Tutorial on Writing Widgets

As the release of Coherent looms nearer, I’ve been encouraged to start writing some documentation. My first effort is up: Writing a Widget. This tutorial takes you through creating a widget using Coherent starting with raw mark up and ending with a functional (if simple) widget. Thanks to some great feedback (and encouragement) from Neil [...]

Pitting JavaScript Against Objective-C

In many ways, the API of Coherent is drawn from various Cocoa APIs: NSKeyValueCoding, NSKeyValueObserving, NSKeyValueBindingCreation, NSArrayController and others. Of course, some allowances have to be made for the syntax differences between Objective-C and JavaScript. So methods like setValue: forKey: from NSKeyValueCoding become setValueForKey on coherent.KVO. But where possible, I’ve tried to adhere to the [...]

Deviation from the Spec

As I’m writing the documentation for various parts of the library, I’ve come across several places where I’m not adhering to the Cocoa spec exactly. In some cases, I think my implementation makes better sense for JavaScript. But in others, it’s clear in hind sight why Apple chose to design the API the way it [...]