-
Posts bookmarked on: Peter's Blog
24 October 2008
-
20:42
How I write JavaScript Widgets
Improving the structure of the code I write is an ongoing concern. Over the last while, I feel I've settled in to how I write HTML/CSS/JavaScript widgets and find the pattern repeating itself over and over again.
The code example below is a simple little logger widget. It appends messages to a list and has a clear link to delete all the recorded messages.
-
16 June 2008
-
07:09
JavaScript OOP: encapsulation, durable objects, parasitic inheritance and the decorator pattern
I've been working to eliminate
thisand its associated complexity from my JavaScript vocabulary. I haven't written an articulate blog post about the difficultiesthiscauses but there are many and perhaps I will write that article some day. I've gone on and off with my quest over time and made another push this past week to rid my life ofthis. I think that after just over two years of experimenting and blogging about JavaScript OOP, I may have finally seen the light.
14 June 2008
-
17:31
JavaScript Namespacing
There are many ways to safely namespace your objects in JavaScript. This article discusses common practices I have seen.