Dependency injection and IoC in Javascript

There has been some talk lately about DI and IoC in Javascript, and other dynamic languages such as Ruby and Python. A popular opinion seems to be that these concepts are obsolete in dynamic languages, mainly because you can alter an object at runtime. This certainly makes testing easier, but testability isn’t the main goal [...]

Posted at 2010.08.08 | no comments; | Filed Under: Javascript, Object Oriented | read on

Inheritance in Javascript

Javascript is a very dynamic language, and you can implement inheritance and code reuse in multiple ways. Lately, I’ve grown fond of what Douglas Crockford calls Parasitic Inheritance.
By using parasitic inheritance, you can avoid using the new operator all together. The new operator isn’t evil, but it’s problematic in that if you write a function [...]

Posted at 2010.07.31 | no comments; | Filed Under: Javascript, Object Oriented | read on

Why I still use PHP

Since december 2009, I work in an all Microsoft shop. Coming from a pure LAMP-world – both Python and PHP – the step was quite big to C#, VB and SQL Server. But I’ve grown to really like the technology stack. SQL Server is brilliant much because of SQL Server Management Studio, and I really [...]

Posted at 2010.07.13 | 2 comments | Filed Under: Javascript | read on

Separate concerns with queues

When you’re doing Javascript, you often find yourself listening to events, and then taking action upon what happened. Let’s take a classic example; the drag and drop effect. You have code that listens for the mousedown event which should signal that it’s time to start listening for the mousemove event. In the mousemove event listener [...]

Posted at 2009.08.20 | no comments; | Filed Under: Javascript | read on

About

This is where I put my thoughts and ideas on software development, mainly Javascript (get it, Coffeescripter, Javascript… funny, right?). I’m a developer from Sweden, working with web development.

Code

Plugins, code snippets and other things can be found here.

Categories

Pages