Chris Sainty

A technical blog covering full-stack web development.

twitter | github | stackoverflow

Posts about - javascript

, ,

Webpack

Webpack has become my standard tooling for front-end assets in recent times. Though for all the in-depth documentation I found the learning curve steep and the number of options confusing. So I'd like to share some of what I learnt.

Read More

,

Praise for jsdelivr.com

I was in the market for a CDN recently. Not one for my own content but one for pulling in libraries like jQuery, Moment and Marked.

In the interest of promoting a good service when I find one I thought I'd write a quick note about my chosen provider.

Read More

,

Knockout custom binding handlers

For the last few months I have been working on a large, complex KnockoutJS application.
Along the way I have picked up a number of patterns and techniques that have helped keep things manageable.

One of the most important lessons was to learn to love custom bindings. Today I will show an example of how you can use a custom binding to add reusable logic to your views without having to make changes to your viewmodels.

Read More

, , ,

Remote debug your iisnode hosted node.js app

I recently came across iisnode’s built in support for the excellent node-inspector package. My iisnode host of choice being AppHarbor, I proceeded to set up a repo and make sure it all works there.
The good news is… It does!

Read More

, , ,

WinJS - Classes

In my last two posts on JavaScript for Windows 8 I looked at scope and namespaces. I pointed out that namespaces could be used to create “static” classes. I hasten to add they can be used for more, don’t make a hard link in your brain between namespaces and static classes.

Read More

, , , ,

WinJS - Namespaces

In my last post I explained a little about scope in JavaScript and why you should (and the default templates do) wrap each of your files in a self executing function.

One note about my code snippets. For simplicity I will be concatenating what would in a real application be multiple .js files into a single code snippet. I’ll use comments to show you where the files break.

Read More

, , , ,

Windows 8, WinRT and WinJS - Scope

This week at Code52 we are taking on our first Windows 8 app. Just to make it interesting we are doing it using the HTML / JS stack instead of C# / XAML.

Read More

,

Experiments in text adventure

Like many who were into computers “back in the day” I still maintain a nostalgic, warm and fuzzy feeling at the memory of early text based adventure games.

Back when all I knew were the PRINT and INPUT commands in QBASIC, these were the very first programs I created.

Where am I going with this?

Read More

, , , , , , , ,

Getting deeper into Open Source

It’s about 8 months since my first contribution to an open source project. It was followed up minutes later by one to reverse all the accidental formatting changes I made. Damn you Visual Studio!

Read More

, ,

Running a NodeJS server alongside your NodeJS desktop app

The node-webkit project added a new feature yesterday, one which I requested. So I feel I should put up a quick post about it and why I think it could be useful.

Read More

, ,

Further thoughts on NodeJS desktop applications

I have been working on a more complete demo of creating a desktop app with NodeJS.

This one will use a full UI (KendoUI) and a Sqlite database to create a basic CRUD style app based on the Northwind dataset. Someone really needs to put together another (and actually well designed) standard database that people can use for apps like this.

Read More

, , ,

Creating desktop apps with NodeJS

Last week an interesting thread was started on the NodeJS mailing list.

https://groups.google.com/d/msg/nodejs/iy7Re33dwyU/yxwLlx1aUNMJ

Roger Wang from the Intel Open Source Technology Center posted about a new project from their team called node-webkit.

https://github.com/rogerwang/node-webkit

node-webkit brings WebKit to NodeJS. With it, client side applications can be written with a HTML/CSS UI on the NodeJS platform. We believe the async I/O framework and Javascript language is a perfect combination for client (mobile) side applications.

Read More

, , ,

Learn Something New: Node

Node seems to be everywhere at the moment. Long on my list of things to take a look at, I finally took the time to sit down with it yesterday and get it up and running and get a feel for what it does.

In the process I also took my first look at Heroku, which is the cloud hosting platform for Ruby, Node, Java etc.  that AppHarbor borrows heavily from in the .NET world.

Read More

, , , , , ,

Learn Something New: Nancy

Today my toolset of choice for a quick learning session is Nancy.

Reading straight from the box

Nancy is a lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono. The goal of the framework is to stay out of the way as much as possible and provide a super-duper-happy-path to all interactions.

Got that? Think of it as a replacement for WebForms or ASP.NET MVC.

Read More

, , , ,

Learn Something New: Knockout JS

First in my “Learn Something New” series is Knockout, a javascript MVVM framework.

Knockout is beautifully simplistic. You define a ViewModel, bind it to your UI, and away it goes keeping the two in sync. It really is beautiful stuff for a javascript heavy UI.

Read More