Need opinions on NodeJS (with express) vs Spring & Java

#1

What I want to know

  • What stack would you choose for developing real-world enterprisey web applications?
  • What’re your criteria for evaluating web frameworks / tech-stacks?
  • How important are web framework benchmarks and how do they work?
  • How important is maintainable, not-repeated code and which framework helps more with that?
  • How do you identify code repetition? How do you decide to refactor or leave it alone?

What I don’t want to know

  • That JavaScript is better than Java.
  • That Java is better than JavaScript.
  • NodeJS is the future.
  • Java is dying.
#2
  1. I choose JavaScript. It’s most popular language. It’s have a lot of completed modules that I can grab and use for free. I hate to code something that was solved before - i’m just not interested in inventing the wheel
    I’ll use React GraphQL MongoDB or.DinamoDB but will make them separated entities.

  2. How many people using it. How quick releases/fixes shiped. How easy for students to jump into project and start to generate a value

  3. Don’t care about benchmarks. In real work - cost of developer time is much higher rather than cost for additional servers

  4. It depends on setup. If you make a great ground work - anything can be maintainable.

  5. I’m not smart, so I’m using services that doing it :slight_smile:

1 Like
#3

Javascript is the superior choice because: it’s the language of the web! It’s native, man. You can’t get any better than that. Code-sharing is a breeze. Context switches are nil. Best of all, you don’t have to compile some bastardized pseudo-JS language into actual, unreadable JS.

At some point, given the frontend-heavy nature of web apps these days, you’re going to have to write JS, so: why not write everything in JS? It’s well-supported, as a mature ecosystem. You won’t be disappointed.

Benchmarks ain’t shit. More than likely, your bottlenecks are going to come from having 100k DOM elements on the page that are all trying to update at the same time, and no one framework or solution will save you in that case. That said, I’d recommend either React or Vue. React is more mature, Vue is more pleasant to work with IMHO.

Evaluating frameworks and libraries is capital-H Hard, but I go by:

  1. Number of downloads per week on NPM (or whichever package registry your language uses)
  2. Last date/time updated
  3. Stars on Github

In that order. Usage is king, and an up-to-date library is critical.

Some of the questions you ask are really heavy questions, questions that can’t be answered with a pithy quote or what have you, which means I can’t help you except to suggest: read “Clean Code” by Robert C. Martin. That book is the opposite of the dry technical manuals, instead opting for highly practical advice on how to go about writing, testing, and refactoring code.

As for the stack I’d choose:

Server:

  • Node.js
  • Either Express or Koa
  • lots of Express/Koa middleware
  • Mongoose
  • MongoDB (in combination with Mongoose)

Client:

  • create-react-app
  • React
  • react-router
  • Redux (if needed – it’s like glasses, you’ll know when you need it)
  • many, many NPM modules depending on what sort of app you’re building

I could go on, but those are the main points. Feel free to ping me if this didn’t convince you. :slight_smile:

P.S. I know you didn’t want to hear it, but: Java’s fucking evil, man. :laugh: Don’t use Java unless you have to for institutional reasons, or other nonsense.

1 Like
#4

Maybe you must also consider what your team is able to work with the more easily, using JS with people coming from the world of OOP, static inheritance, etc. might be pretty useless. So adequate training of your team according to the chosen stack should be part of the equation IMHO.

1 Like
#5

@arthur.tkachenko @luc.claustres @austin
Thanks for the answers.
I agree with most of the points.