Question

While the title suggests I wanted to cram as many buzzwords into the question as possible, I am actually serious ;)

I am exploring my options for building an enterprise application that will have plenty of grids and needs to be as snappy as a desktop app. While operational transformation is going to be a big issue (or rather concurrent edits, with OT a possible approach to solving related problems), the app is unlikely to ever have a large number of concurrent users (starting with 50, probably never more than a couple of hundred).

While SmartGWT seems to solve many of the problems we are facing, the team building the app is very small (probably two devs and a technical program manager). Node.js seems attractive because both devs could work on backend and frontend.

In this context I have a couple of questions:

Is Node.js suitable for this kind of app? It would be very interesting to hear from people and their experiences with Node.js and this kind of app.

Has anyone used it together with ExtJS/SmartGWT? What were your experiences with how these work together with Node?

I am pretty sure it will be impossible to find experienced Node.js devs while finding Java experts is a comparably trivial exercise. Experience with which other languages make the transition to Node.js easy?

I know this is a rather broad question, please bear with me.

Was it helpful?

Solution

Usually this is solved using: node.js+socket.io+backbone.js

But you should really look up: http://meteor.com/ and http://www.firebase.com/

OTHER TIPS

You should pick what technology you already know.

(The rest is IMHO)

I'm a fan of Node.js and Java. However you better have a talented team if you pick Node.js. Although its easier to get started its also easier to really screw yourself in the long run.

  • No clear winner for framework (Express is the closest)
  • Moving target. Libraries change all the time.
  • Refactoring in Javascript is a PITA
  • Dealing with database transactions is rather difficult (if you need transactions)
  • Its easy to accidentally write very dangerous code (miss a "var" and you will have a global variable problem).
  • Tracing/Debugging through code can be rather difficult with all the callbacks.
  • Reading other people's code (why a talented team is important)

Just because the client side code happens to have the same syntax as the frontend does not help you as much as you think. In fact I often have annoying cognitive dissonance when working with node.js as I get confused what I have available (library) or if its client or server code I'm looking at.

Java has some huge advantages when it comes to the server side.

  • Established choices: Spring MVC or JAX-RS
  • Refactoring is easy
  • Reading Java code is easy because of the consistency of the language, static typing and cross referencing IDEs.

Your concern for finding a Java developer over a Javascript developer is becoming less and less of a concern. Besides talented people are/should be language agnostic.

As far as EXTJS or GWT, I would not use either. Backbone + JQuery + Twitter bootstrap are enough.

I am currently using Exactly the same setup that your question is asking about. I am using Sencha's Ext4 and nodejs to build a massive single page application with lots of grids. We are using sencha architect for most of the UI work, and our database uses PostgreSQL. This setup has a number of advantages and disadvantages.

Advantages:

  • There is no html! This is the biggest advantage of all. HTML is annoying. If you use nothing but the ext components, you rarely have to touch html. The most we ever have to do is tinker with the css a little. Words do not properly describe how great this is. We have successfully eliminated the need to write in a verbose, inconsistent xml derivative.
  • It made many of us better javascript programmers. This matters for one reason You can't get rid of javascript no matter what you do, if you are building any kind of web application you will have to write massive amounts of javascript. You might as well embrace it rather than try to disguise it. By hiding or disguising it, you are only compounding the problem. If you learn to write better and more efficient javascript, you only make things better in the end.
  • The database library automatically outputs in json! How cool is that? it's going to get turned into json and get read over a rest api anyways. Why not have it automatically give you what you're going to use? And this is coming from Postgres. Postgres barely has support for json on it's own, and this automatically does it for you.
  • The entirety of this project is written in only two languages pl/pgsql and javascript. and we are currently looking at replacing pl/pgsql with pl/v8 (a port of v8 to postgresql) I am almost able to program without reading documentation. How awesome is that?

Disadvantages:

  • Nodejs isn't all fun & games though. Maby it's just me, but it takes quite a while to read through a npm module before I can even make basic use of it.
  • You have to really master javascript to make use of Nodejs. Seriously, Nodejs is not for beginners. I'm not saying beginners should stay away from it, I just mean that by the time you learn how to do anything useful in it, you will no longer be a beginner. If you intend on writing anything useful, be prepared to learn javascript in depth.
  • Sencha is not exactly free. Obviously it depends on what you are doing with it, but it's the only software we had to pay for.
  • Development is not as fast as it seems like it would be. Writing a full CRUD for a table, displaying the grid, refreshing the grid adding buttons and such is still very time consuming. Basically, having really nice UI components has actually slowed us down. Now we have to have panels and modal windows and all the things that a real windowing framework has. before using sencha, things were much simpler. Eveything had limited functionality, thus, it was faster to program. Obviously, this will look better when it's done this way, but who's to say we really need all this stuff?

As far as performance is concerned, It is fast enough. I can't really give a comparison, but there are no performance problems yet.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top