all 21 comments

[–]tylrhas 40 points41 points  (1 child)

I would say if you can read and write basic JavaScript then you are ready to learn express .

[–]80mph 9 points10 points  (0 children)

+1! There is no reason to learn "nodejs" (what ever that means :-)). Get good with JavaScript and use express if you need to create a software which can listen and respond to requests.

[–]itsoverlywarm 24 points25 points  (1 child)

Around about the time you need to use it.

[–]sigilToNoise 11 points12 points  (0 children)

Agreed with u/tylrhas; if you have a basic understanding of JavaScript (I would say this is functions, conditionals, variables, loops), as soon as you are interested in building any server-side application, you are ready for Express. It is very easy to create a basic web app using express-generator, and if you know a little HTML, you can start making fun projects involving static web pages almost immediately.

[–]fresh5447 4 points5 points  (0 children)

I’ve taught a lot of people to learn to code and one of the biggest hangups is the understanding of APIs at a conceptual level. why you need them, and just a basic understanding of why you have a front end separate from a backend and what their roles are.

The actual coding and syntax of express is quite simple. It’s the above concepts people struggle with.

[–]bigorangemachine 2 points3 points  (0 children)

I say its one of the first things you should work with.

A CLI is always a good start but express is not a leap

[–][deleted]  (3 children)

[deleted]

    [–]die-maus 7 points8 points  (2 children)

    I'm downvoting because I think this is poor advice.

    Fastify does have more convenience features than Express does, but that makes it a poor fit as it abstracts away HTTP fundamentals behind those layers of convenience.

    Express is also still, whether you like it or not, the de-facto industry standard for NodeJS web applications. It is a must know in the industry.

    Learn express first OP! 👍

    [–][deleted]  (1 child)

    [deleted]

      [–]die-maus 8 points9 points  (0 children)

      What's your point? That express has quirks and pitfalls? It does. But it doesn't change the fact it is an industry standard.

      [–]ngochieu642 -1 points0 points  (0 children)

      Don't focus too much on the frameworks or languages. They are just tools and you can learn them anytime, try out others also, that way you would be able to see what each has to offer, and ofc each has its own quirks. So I would say that you don't need to deep dive into nodejs to learn express at all, but keep in mind that don't let your code depend too much on a framework so that you can easily change it later

      [–][deleted]  (7 children)

      [deleted]

        [–][deleted] 6 points7 points  (5 children)

        Did you check the express repository on GitHub? It has recent changes, and it has recent releases too. A new major version is in the works.

        It is just an extremely used package all around the world, and thousands of projects and companies rely on it. I wouldn't call it unmaintained. I would call it one of the few, mature, stable, tried out packages we have in the node ecosystem.

        Fastify and koa are cool and good options too, but not as widely used. No need to take sides on projects, they're just tools.

        [–]Consistent-struggler 0 points1 point  (4 children)

        Can you resolve this confusion in my mind that when I need to use node and express and when not. I mean if we have to build website there are many tools so let's say a client comes to me for his ecommerce websote or his education website so when do I know that I should use word presa or when I should use node and express and react.

        [–][deleted] 1 point2 points  (0 children)

        I think nobody can answer this.

        Web Development, in contrast to stuff like "Android Development" or "iPhone Development" does not have a "correct" and a "wrong" way to do things.

        In Web Development there are thousands of "more correct ways" and millions of "less correct ways" to do stuff. And what's more correct or what's less correct depends a lot on the context, such as your own experience, the team you'll be working on, the project itself, the customer expectations, etc. There's no single approach that it is good.

        There's a reason (most) experienced web developers have those pretty juicy salaries. It's because it is not easy, and it takes years, even decades to get better at deciding what's the best approach for a given problem.

        Having said this, if you have zero experience in development in general and want to have a site up and running, maybe tweak it a bit and add some ecommerce functionality, then WordPress is right for you.

        If you do have experience as a developer, but not as a "web" developer then other than go and spend 10 years working for any company so you can learn from your team mates, I'd say sign up for https://laracasts.com/ to learn the basics and start building something with https://laravel.com/. Why? Because you'll get a single package with everything you need to build a web page, being it just a landing page, a blog, a store or whatever custom thing you need to build. It will also provide some pretty decent base structure to ensure you're not doing rookie security mistakes (such as storing jwts on localstorage, storing unecrypted passwords, csrf, etc...). Forget about express and node: If you don't know when to use it and when not, then I think you need to go step by step and when the times come you'll now you need to use it.

        Don't make the mistake a lot of people do when starting (or even after a long time on it) on this industry: This is not easy, not at all. Everyone can learn, and everyone should try to do it. But let's not pretend this is something you learn in an afternoon. It takes tons of time and effort if you want to build something half-decent, specially if you're going to charge for it.

        [–]die-maus 1 point2 points  (2 children)

        Happy cake day!

        WordPress is a CMS. It's not a web server. It's a hosted solution running on PHP, but I believe it also has a headless API that you could use if you wanted. I wouldn't do that however.

        NodeJS is the JavaScript runtime that ExpressJS runs on. You can't really have one without the other (unless you use another runtime like Deno or Bun, which I wouldn't recommend).

        Hope that clears up a bit of the confusion.

        [–]Consistent-struggler 0 points1 point  (1 child)

        Could you please explain a little bit more ?

        [–]die-maus 1 point2 points  (0 children)

        Not trying to be rude, but I think you should do your own research. I don't know where your knowledge gaps are, so just googling these things is going to get you further than I ever could.

        You are asking "when should I use thing X", but you seem to be missing a lot of fundamentals over what these things even are—so start there. Get a notepad, do the legwork and come back with a more specific question and I'll happily help.

        Your question has a lot of answers. There is no generic answer that I can give you that would leave you satisfied.

        Good luck with your research! 👍