loading...
markdown guide
 

Remember to simplify!

Taking the time to work with simple JavaScript for a while is a good idea that others have suggested, but it scales too.

Many things that you might use multiple files to express in Java can be expressed in one file in node.

For example, when I ported a Java service to node, it had separate files for each class, and a class for each 200 return value, a class for each error, 2 commandhandlers/controllers etc etc.

In node it was the express server in one file. The router in a separate file and then a controller file that was essentially an Enum (using Java-ese) that defined all the functions for each route on the API and any helper functions.

Java-brain will make you want to over-complicate a bit. That complication is good in very large teams that might need to have one person working on one class and another person working on the controller, and another person working on the Spring implementation all in parallel. It forces you to slow it down and think it through to avoid side-effects on your teammates!

You CAN split out a node application in a similar way, but really as you are learning, KISS is your friend when trying to translate Java knowledge into JavaScript.

Hope that helps!

 

If you have never programmed in JavaScript, start there!

I have been a Java developer for more than a decade, and had to unlearn a lot of things before I truly embraced JavaScript.

Learning JavaScript can be tricky and YMMV! Start from developer.mozilla.org/en-US/docs/W... and check the left sidebar. Always prefer MDN over blogs (lesson learnt hard way!)

Happy Learning!

 

Coming from a Java background as well I used Spring MVC a lot , so I am not sure is the case the same but what I did was:

  • Learned ES 6
  • Learned TypeScript
  • Started playing with NestJS (it is basically Spring MVC or JAX-RS and TypeScript is very like Java)

done, you don't need JS and nodeJS nonsense but when you do.. you know even more then the rest.

 
 

The Node.js API docs can be a little overwhelming to beginners. I suggest that you visit nodejs.dev to take a look of a little of what Node.js is capable of doing.

 

Here you can check how to build rest API with nodejs, it is great for beginners
codespot.org/how-to-build-rest-api...

Classic DEV Post from Apr 29 '19

Are we pretentious and arrogant?

Do you think that we, as developers, have a slighly tendency to become quite selfish because of our so specific-skills?

FultonB profile image
I am an full stack developer trying to change the world with code.

dev.to now has dark theme. 🌝

Go to the "misc" section of your settings and select night theme

P.S. It's also the best place to talk code amongst thoughtful developers, and it's totally open source.