Introduction

My last post triggered quite a few questions. I had no idea so many people read my blog. The emails mostly asked "Why Node?" or "What's good about Node?".

In my previous blog I expressed my frustration learning Node and how I overcame my issues. Perhaps it's time to explain why I'm using Node even when I had every possible option of technologies for the project I just started. So… here I'll try to explain why I use Node and what I like about Node.

NOT an advantage: Wide Recruiting Base

Before I start, I'll make address what I think is a common misconception. I've seen this argument made in multiple places and I could not disagree with it more. The argument for node goes something like this:
Node is great because we can use JavaScript. JavaScript is an easy language that is widely spread and recruiting will become much easier.
If this is your reason to go to Node, I suggest you don't! 

Here is my opinion. If you are going to transition your organization to Node, you probably need better programmers than you currently have. It is correct that you can find lots of resumes with JavaScript on them, but making a widget pop-up with JavaScript, validating fields in a form, that is the typical tasks of a client-side JavaScript programmer is quite different from maintaining a set of complex backend services.

If you are planning to use Node to build backend services, get the best programmers you can find. For large scale project, Node (and JavaScript) requires more professional engineering discipline. The freedom of Node/JavaScript invites clever and brilliant solutions, but at the same time opens up Pandora's Box for the worst possible engineering practices. Believe me, I've seen them...
If I were interviewing someone to work on my Node server, I would ensure that:
  1. They have a solid Computer Science background
  2. They fully understand the asynchronous model
  3. They are fluent in Test-Driven-Development and embrace it
It may seem a bit strange to start arguments for Node by trying to kill one of the most commonly suggested advantages, but I wanted to address it so that I don't get a ton of other emails wondering why I don't list 'Easy to Program' as an advantage. Bottom line, if you are one of those companies that hire a ton of average programmers and have found that it is easier to find cheap JavaScript programmers… Node is not your answer! I seriously believe that you will be worse off with  Node than Java. Java and other strongly typed languages prevents a lot of errors that now are very commonin JavaScript.

Advantage 1: Code easily be migrated to and from the browser/server

Apart from using the Google Web Toolkit, there is really no way you can avoid JavaScript in a modern web application (and even if you use GWT, you most often end up doing a fair amount of JavaScript). If you have adapted the Web 2.0 paradigm, you would want to distribute some of the computing to the client side.

Using Node, the algorithms and data structures that you build can in theory run both on the client and on the server. With a bit of cleverness (remember, the best programmers) you can make modules context free and play around with where they run.

Using this advantage I can easily optimize performance by taking advantage of all the browsers accessing my application and fine-tune it as I go. This often significantly outweighs the performance disadvantage running my server algorithms through an interpreter.

Advantage 2: Consistently asynchronous

Everything is Node is asynchronous. This is quite powerful as it allows a single incoming request to (conceptually) fork off a set of threads at the same time. In most other environments you program every incoming request serially. This is a performance issue in many cases where the one may easily parallelize the algorithms. Since JavaScript has closures as first-class-citizens of the language, programming asynchronously is straight forward.

I have to say that most node applications, when complex, can be rather cumbersome to read because all of its nested functions, but I found the async.js library to pretty much eliminate this issue (this library is well worth a few hours of study).  With async, the parallelism is clear to see and the code reads like prose...

Advantage 3: It breaks down the boundaries between front- and back-end development

Because both the client-side and server-side development is using the same language, we don't have to separate the front-end developers and back-end developers. This means that a developer (or two developers if you use pair-programming) can work on a feature from start-to-end. This eliminates the waiting for front/back-end to finish. This is of course because we have no impedance mismatch between the two environments (you may still have some that prefer to work on U/I's and there is of course some advantage to have experts here… You still have to deal with browser idiosyncrasies, CSS, HTML, etc., but the boundary can be quite fluid).

This simplifies project management and helps spread knowledge.

Advantage 4: [Context specific] JavaScript is a dynamic language

For many problems, the ability to load code and execute it dynamically can significantly simplify the design. You can store code/functions as first-class objects and execute them upon need. You may even have customer produce JavaScript to be executed by your engine (this of course opens up security holes, but the option is there).

A few things I used to fear, but no longer do

Java has a tremendous number of open source components that you can learn download, learn and integrate. Node.js is rather fresh, so there are not that many components out there. Node is a newcomer and it doesn't have nearly as many battle tested components. This is of course an issue, but I've stop fearing it. It seems the Node community is very vibrant and productive. You can almost always find a suitable component for whatever domain independent problem that these open source components typically solve.

I had little hope that Node would be able to handle cross-open-source-dependencies (Maven does an excellent job of this for Java). However, it seems to me that the package manager of Node (npm) is almost as good (and sometimes better).

Conclusion

In this blog-post I've outlined the advantages that may make me select Node.js as my server environment (I would not always use it). I've also tried to debunk one of the commonly listed advantage, namely that you can get away with inferior engineers when working with Node.
4

View comments

Today, I want to introduce the word 'dugnad' (pronounced ˈdʉːgnɑd]) to my friends and colleagues.  

Dugnad is a word from Old Norse and it is wrongly translated as 'volunteer work' in the English dictionary. Dugnad has a much richer meaning and tradition in Norway.

1

Introduction

I just upgraded to a new Dell Precision Ubuntu-Based laptop from years of using a MacBook. Although for the mosts part, the transition was smooth, one thing frustrated me beyond anything else.

Introduction

How do you translate traditional API’s into REST? Many applications face this problem. We may already have an implementation that exposes a typical functional API. In the previous post, I discussed some of the essential properties of a REST API.

1

Introduction

This is the first blog in a series of blogs on REST. In these blogs I’ll try to demystify the REST. I’ll discuss what REST is and some suggestions for how you can design good REST APIs.

First, let me acknowledge some of the sources of these posts.

2

Introduction

Waterfall, agile, iterative, whatever your process, your chance of success can be measured by the number solid feedback loops between the developers and the domain experts.

Introduction

Over the last 10 years I’ve seen a change in the way the top engineers/architects design, architect and deploy software.

Introduction

Over the last few years I've been experiencing conflicts between pure agile development and the need for budgeting. At SciSpike we do everything agile and it works for us. We have a good idea of the velocity of our teams and can often be very accurate in our estimates.

In my previous blog post I praised the open-source database Orient DB. I’ve received many email from people since asking me questions about Orient DB or telling me that they’d love to try Orient DB out but don’t know where to start.

9

Every now and then you come across open source projects that just amazes you. OrientDB is one of these projects.

I’ve always assumed that I’d have to use a polyglot persistence model in complex applications.

6

Introduction

In preparation for a course I'm teaching over the next couple of weeks on OO and Scrum, I spent the weekend reading up on the new books on Agile and Scrum to see if there are points that I need to add to my courses.

Introduction

My last post triggered quite a few questions. I had no idea so many people read my blog. The emails mostly asked "Why Node?" or "What's good about Node?".

In my previous blog I expressed my frustration learning Node and how I overcame my issues.

4

Introduction

This blog-post is perhaps misnamed. What I want to convey in this blog how you have to change the way you work when you go from a strongly typed language to one of the dynamic languages.

I pride myself on being language agnostic.

Introduction

I just finished up some work for one of my clients building a metamodel and a DSL for services. I built the models and the DSL using eclipse (EMF, XText and GMF).

The issue...

The enabling of the browser as a first-class container when building software solutions has led to a migration of business logic and complexity from the server to the browser.

Overview

Over the last 8 months I’ve been swamped working on a very interesting project. Between this project and a set of other commitments, I’ve literally spent 16h a day working. The blog has been neglected, but I plan to take up writing again.

Introduction

Today a friend asked me if you could execute an action in Eclipse on a breakpoint. I thought for sure that that would work, but decided I had to check before I said yes. Well… there is no such feature in Eclipse, but here is a cool work-around.

2

Description

Over the last 25 years or so, I’ve been often tasked to help optimize the performance of various solutions. I keep careful records of all the work I do and I recently decided it would be a good idea to collect all my thoughts/experiences around performance.

Overview

Over the last years I’ve built a dozen or so large scale Domain Specific Languages (DSL) and almost without exceptions, they’ve been hard sells. Usually, each of these received initial resistance in the organizations they’ve been introduced.

I've been eyeing the new iPad, but when I heard about the delay (and I have to admit also my current trip to Asia and the thought of not having something to play with on the plane), I decided to try out the Motorola Xoom instead.

I've been using the old iPad and briefly tested out iPad2.

This post is just a quick update on the status on alternatives to the PivotalTracker.

I've been playing a bit with Retrospectiva. It seems to be a good alternative to PivotalTracker.

At SciSpike, we'll setup a free service for our customers to move their projects to Retrospectiva.

1

Ouch... I just learned that PivotalTracker will start charging for their online project tracking tool.

I have mixed feelings. On one hand, I recognize their right to make money on what I consider to be an excellent tool, but on the other hand, I feel tricked...

This blog entry is really just a support entry for a YouTube movie I created today.

1

Introduction

For more than 2 years now I’ve been using Adobe’s tools for creating e-learning material. The two tools I’ve been using the most are:

Adobe Captivate Adobe Presenter I’ve been stuck on an older version of Captivate for a while (Captivate 3).

3

I’ve been teaching a few classes on Web Services lately and my students have complained that there are no good description on the net for how to get started building web services on Eclipse. I’m sure there are some, but I was encouraged to create one myself, so here it is.

44

What’s the problem?

When loading a dynamic site using GWT, Dojo, YUI or any other Ajax based approach, it is difficult (and sometimes impossible) for the search engine to obtain your content for indexing. The initial load of the site may only contain a simple HTML element (often a div or span tag).

1

This week (and most of last week) I’ve been developing a GWT application for our new venture SciSpike (www.scispike.com).

The team at SciSpike are all very experienced architects/developers, so the selection of technology to use was quite difficult. Pretty much every options were available to us.

This week I’m documenting architecture for a system where my company has been involved in the design and development of the core framework. I was not originally involved in this project, but have later contributed to the framework.

This week I deployed a DSL with its corresponding code generator for a client. The DSL and corresponding editor was written in Xtext and the code generator in Xpand/Xtend.

I created a e-learning module for how to create plug-in extensions for Eclipse. It is a sub-module from our course how to write eclipse plug-ins that I’ve not yet integrated. Many students have asked for this, so I though I’d make it available for them here.

3

Introduction

This post is going to be very short as there comparison here is rather trivial. Both tools can be integrated with any of the transformation frameworks available in Eclipse.

EMFText does not include transformation nor suggest any specific  transformer.

4

Introduction

In my previous post, I compared Xtext and EMFText. I pointed out a few differences that may help you select one tool over the other. In the next posts I'll go into each of the points in more details.

5

I just finished a project building a textual DSL and a code generator for a client and after some intensive investigation, Xtext seemed the best alternative.

Today, I learned that EMFText just released a new version (1.2), and it looks very promising.

4

I thought I'd share another little trick in Xtext. This trick is actually documented well at various places on the web, but to be able to do what I wanted to do, I had to pull information from many different locations.

1

I ran into a problem in Xtext some weeks ago. I wanted to generate a serialization id for my generated Java classes.

4

Over the last weeks I've been polishing a language for a client. As I mentioned before on this blog, I decided to use Xtext(www.eclipse.org/Xtext/) to build the toolset for the language.

1

I created a new language (again) for one of my clients this week. I love doing new languages and I’ve been working 20h a day on this one. I’ve been doing my last languages using the Microsoft tools, so I was afraid I would be a bit rusty on the open-source tools.

2

This week I’m teaching a course on Advanced C++ in San Diego. I don’t use C++ on a daily basis anymore, but I still feel pretty confident… after all, I’ve been using the language since late 80’s.

I do sometime get stuck on syntax. It doesn’t bother me, as I know I can figure it out pretty quick.

1

I was teaching a class that included a chapter on testing this week. I had added a section on design by contract and decided to look into what is available in the .NET space. I knew about Eiffel for .NET and some time ago looked into sharp#.

1

I'd though I'd post something on the technology I've been most involved with lately... That is Ruby on Rails.

I think I've developed software on the most common web-platform. As of now, I think Ruby on Rails is the fastest (most agile) development platform.

Today I started to write the design chapter for the book. I was trying to collect my thoughts on object-oriented design. The more I thought about it, the more hopeless the task seemed. I think it is impossible to define a single template that would apply to any software project.

I'm currently working on a book together with Richard Mitchell and Vladimir Bacvanski. The topic of the book is how to model software... actually, I take that back...

At InferData, we always build domain models before progressing to system modeling. I've noticed that this is becoming more and more a trend in the industry although, what the various methodologies/methodologists define to be a domain model seems to vary.

I just sat in on a presentation of SysML (http://www.sysml.org). Although the presenter did a good job defending the spec, I found the spec itself quite miserable.

This week I’ve been working on a J2EE application for a client.

Almost 10 years ago, I was doing some work for a client when I found myself with some extra time on my hand. I had designed and implemented a real-time broker and I was waiting for the other development teams to finish up their work so that we could integrate.

2
About Me
About Me
Blog Archive
Subscribe
Subscribe
Links
Subscribe
Subscribe
Loading