Tag: Javascript (page 1 of 2)

Rebound: A Channel Authenticated Websocket Implementation

Introducing Rebound, a realtime channel authenticated web socket implementation. Inspired by Pusher and Laravel Echo, built on top of engine.io.

Read more →

A Hybrid ORM Idea

As you may know, I’ve been working on my first NPM package which is simply a SQL Builder and converts the method calls into a SQL string (specifically MySQL at present, but that should include others in the future). The reason I’ve been working on this, is partly to improve my NodeJs skills, and partly because of an idea I’ve been having for a ORM that is hopefully as easy to use as Active Record but has more of a Data Mapper design.

Read more →

Bidirectional Data Flow – A Double Edged Sword?

While immersing myself in NodeJs, and to be fair dabbling with real-time events in PHP (powered by Socket.io and Laravel) I’ve been wondering whats the best way to use bi-direction data flow and the WebSocket Protocol.

The traditional way to produce an app is with REST endpoints and the request/response workflow. Now with NodeJs and WebSockets we can totally invert the universe and use pub/sub to provide data to the UI.

Read more →

From PHP To NodeJs

I spent a lot of time recently looking into NodeJs and how my PHP experience translates. From performance considerations to traditional PHP esq Interfaces and how to tackle them. Now I’m at the point of how to structure a full-blown application and how traditional design patterns like Service Location, Inversion Of Control, and Factories fit in with the module driven architecture of NodeJs.

Read more →

Should NodeJs Have Interfaces Part 2

In the first post of this series we looked at how Interfaces work, and if NodeJs could/should have them.

Since then I’ve been doing some research which has led down all sorts of paths, like how the require function is effectively a service locator. How we could use the require function to bind concretions to interfaces, how in JavaScript duck typing is used in place of Interfaces. Plus all sorts of other related topics.

In this part I’m going to look at how we can in the context of an app get the benefits of Interfaces without actually having Interfaces, and it centres around service location, proxies and the module system.

Read more →