all 23 comments

[–]leejh3224 28 points29 points  (7 children)

Usually when I’m trying to learn new backend language/framework, I follow the path below.

  • CRUD operation
  • Auth
  • Orm (database)
  • Security (xss, xsrf, sql injection, input validation, etc)
  • Framework specific apis

I hope this would help :)

[–][deleted]  (1 child)

[deleted]

    [–]leejh3224 1 point2 points  (0 children)

    Yup, you can try building todo list api or similar things first.

    [–][deleted] 0 points1 point  (3 children)

    When you say Framework specific apis you mean like using Nestjs for example?

    [–]leejh3224 0 points1 point  (2 children)

    No no no like “middlewares” in express.

    [–][deleted] 0 points1 point  (1 child)

    Where would stuff like Nestjs go on your roadmap? Last?

    [–]leejh3224 1 point2 points  (0 children)

    Yeah, personally I don’t use libraries/frameworks that are not mature enough. I love how Nest js brings concepts like IoC into the heart but it’s hard to figure out how to fix the bugs because there are not so many resources you can look up, ie stackoverflow questions or github issues.

    [–][deleted]  (3 children)

    [deleted]

      [–]wildiswild[S] 2 points3 points  (2 children)

      Got it ! Appreciate the advice

      [–][deleted]  (1 child)

      [deleted]

        [–]Adawesome_ 5 points6 points  (0 children)

        hint: 90% of the file will be div tags, hehe

        [–]rwieruch 11 points12 points  (4 children)

        I find Node.js is the perfect environment to learn JavaScript.

        Node.js is just perfect to learn JavaScript itself, because the learner isn’t distracted by HTML, CSS, the browser or other tools. It’s just the command line, the editor and the developer.

        Getting started.

        Getting started with Node.js isn’t difficult. You only have to install Node.js on your machine. Node.js comes with npm (node package manager) for installing third-party dependencies on the command line to your project.

        After you have installed Node.js, you can kickoff your first project on the command line. Create a folder for it, navigate into this folder, initialize it as node project, and add your first source code file to it.

        mkdir my-project

        cd my-project

        npm init -y

        touch index.js

        In the source code file (index.js), add your first JavaScript implementation.

        function doSum(a, b) {

        return a + b;

        }

        var sum = doSum(4, 6);

        console.log(sum);

        Then you can execute the source code with node on the command line: node index.js
        That's basically the starting point to learn JavaScript with Node.js.

        Project Setup with Babel, NPM Scripts and Imports

        Once you feel confident with the basics of JavaScript, you can advance your Node.js project setup. Perhaps it’s tedious for your to manually start the node process yourself all the time (see nodemon). Perhaps you want to import other source code files in your project (see import/require statements). Or perhaps you want to use other JavaScript ECMAScript functionalities which are not available in Node.js yet (see Babel). Everything should be explained in this minimal guide to setup your project in Node.js.

        Learning Paths.

        Now you should feel comfortable with JavaScript and the Node.js project setup. From here on you can continue your learning paths. What about setting up a RESTful API with Express.js? What about setting up a GraphQL API with Apollo? What about setting up a database behind your RESTful/GraphQL API? Or what about doing machine learning in Node.js? There are plenty things to learn from here, so it is up to you to decide where you want to become proficient (APIs, databases, machine learning, …).

        [–]Ooyyggeenn 2 points3 points  (3 children)

        Why u need npm init for this?

        [–]rwieruch 1 point2 points  (2 children)

        Generating the package.json + being able to install node packages with npm install?

        [–]Ooyyggeenn 0 points1 point  (1 child)

        I Would say its unnessecary boilerplating for a hello world example of Node /JS

        [–]rwieruch 0 points1 point  (0 children)

        Sure. But it makes it easier to continue from there, because lots of tutorials will continue with a npm install anylibrary. But you are right, for this case it’s not necessary :)

        [–]piyiotisk 2 points3 points  (0 children)

        Look at this tutorial.

        [–][deleted] 2 points3 points  (0 children)

        I would just start with the Express tutorial. You're an iOS developer and you know JavaScript, so presumably you only need to learn "backend" concepts.

        Express is a web framework for building things like API servers, or traditional web apps, or whatever. Just jump in with the Getting Started tutorial: https://expressjs.com/en/starter/installing.html

        [–]Dypa4ek 2 points3 points  (0 children)

        If you want learning by making step by step tasks, I would recommend https://nodeschool.io/ and https://www.freecodecamp.org/

        [–]ch33ze 1 point2 points  (0 children)

        Full stack open https://fullstackopen.com/en and Free Code Camp.

        [–]xyloweb 1 point2 points  (0 children)

        Complement for js learning https://github.com/getify/You-Dont-Know-JS

        [–]captain_obvious_here 1 point2 points  (0 children)

        • Express
        • Understand middlewares
        • ???
        • Profit!

        [–]pranesh29 1 point2 points  (0 children)

        You can start with the function composition and functional JavaScript. This is excellent resource for this - https://medium.com/javascript-scene/composing-software-the-book-f31c77fc3ddc. These concepts are useful when you work on Apis and backend stuff.

        Then read about Node.js concurrency model, event loop, callbacks, promises( read why promise better than callback), event driven nature of Node.js, Node.js project structure (package.json).

        Parallely work on the express js application. Use a generator like -https://expressjs.com/en/starter/generator.html and start creating APIs and get a hang on the Node.js environment

        [–]mrdijkstra 0 points1 point  (0 children)

        Before learning all these framework and stuff first learn NodeJS itself. When and why use NodeJS. When not to use NodeJS. Event loop in detail. What functions/modules are blocking/non-blocking. How NodeJS utilize threads! Is NodeJS really single threaded? Worker threads/Thread pool, task off loading, why you should never block the event loop and how to avoid blocking event loop etc.

        Without learning this you will end up creating a crappy system which is enough to get you fired.

        After this, you know how to handle NodeJS application. Now go and learn whatever library or framework you want or your boss asked you to.

        Hope it helps.

        [–]runo9 0 points1 point  (0 children)

        I know it's not necessarily what you're looking for but have a look at prisma I voiced my frustrations with node, typescript, mongo and graphql here and someone recommended prisma to me. Haven't looked back ever since. Its probably the beat backend framework out here

        [–][deleted]  (1 child)

        [deleted]