2
wowotek
5y

Does Really Nodejs - js environment is the best environment in the world ? i mean why people create their RESTful API in js ? from singular to microservices ? does it really that scalable ?

do i have any alternative ? i can't stand anymore change working with js anymode :(

Comments
  • 2
    @norman70688 man even python can parse, and serve json

    EDIT:

    yea i am aware of that, that's why i am brainstorming this idea of why people using js as their main server-side scripting. is there any alternative that have huge community, support, framework just like js ? i mean there are people even stating that nodejs - js is the future. i mean like, wtf
  • 0
    @norman70688 ahh so like because of bureaucracy and business side, thats why node and js is so popular ?
  • 4
    Not really. I think it is popular because there is/was a lot of web developers and for them JavaScript is usually a must have, unless they are backend only. If you can write both backend and frontend in the same language then of course it is easier for you to learn and gain experience that will benefit more aspects of web development.

    Ruby, Python, ASP.NET, PHP, Java are still much more popular alternatives for web backend. NodeJS is fairly niche with less than 1% servers reporting its use. https://w3techs.com/technologies/...

    A lot of this is of course CMS, blogs and other stuff like Wordpress, but it still shows that NodeJS is kinda meh.
  • 0
    @arraysstartat1 gotcha buddy, damn. i really want you to know how much tiring working on nodejs - js environment :( the headache meme is fucking real :(
  • 0
    @norman70688 yea i understand that, but like is it really write once deploy everywhere is only available in nodejs - js environment ?
  • 0
    @norman70688 it won't, it still very much uses Javascript. Y'all can't really escape JS.
  • 1
    Why? Ease of use and simplicity. I have one very large application written in Node.js running in production for years now. Maintenance to it is relatively simple since all I am doing is to check if there is anything that could break it or if I can make it better, never really had to fix anything. My customer for it normally calls me to ask about future projects on account of how much they liked that one.
    You can get pretty far away with Node without dependencies really, and it is quite fun. Js as a language keeps evolving and adapting some more interesting language capabilities and if you don't like pure JS then you can always opt for any of the other languages that transpile to it: TypeScript, Clojurescript, LiveScript etc etc.
    Parsing JSON is as natural to the language as it can be, no external dependencies, no libs to be downloaded, nada, you can just do it man.

    As noted before, you can use other languages and other stacks, people like Node for its convenience and ease of use.
  • 1
    @AleCx04 you just actually give me hope on keeping my environment on nodejs-js. i really hoping that the only reason that my modules, apis and apps is badly developed by my predecessor dev. i tell you what buddy, this code is really bad man. and i thought this is what define javascript and it's environment. if it's that bad i would leave it, but since you told me that you have big application, that imply the code is really complex but workable. so maybe i have hope afterall
  • 1
    @AleCx04 i don't mean i want to quit js entirely, i mean like the server side language only
  • 2
    People love Node, as you can teach JS in a bootcamp and give them the "knowledge" to write the whole thing. With SPA (vue, react, angular, etc.) it's also pretty easy to get server side rendering plus you don't have to know anything about types or programming pattern.

    In short: Node makes it easy for inexperienced to start.

    Use whatever you Like for the backend!
  • 0
    Node.js is certainly not the best platform. It's okay
  • 0
    @Wack thank you buddy
  • 2
    @wowotek it is complex but as you said workable man. Just like with anything else it was a matter of knowing how to work with it. There is one thing that is very much real and that is JS fatigue, so don't overdo it and try to rely on other tech as much as you can :D
  • 0
    1. There is not something as "best"
    2. NodeJS is a great environment
    3. There are a lot of reasons, the main is speaking the same language of front-end
    4. Yes, it is scalable. You can or cannot use microservices
    5. You have plenty of alternatives and nobody is saying you should use NodeJS if you aren't comfortable with

    Really, sometimes people read the same thing everywhere and get convinced it's the only way, but it's not
  • 0
    Its popular because you can take a frontend developer and dump a backend project on them.

    "Its the same language, what is so difficult about this?"
  • 0
    Go and Python are the most popular serverless languages, but you can also use many others - Swift, Java, Ruby (and Node ofc)
  • 1
    nodejs is good enough to create rest apis.

    Is it the best? It depends.

    Almost any frontend has to make use of JavaScript so it's natural to allow backend developers to also write JavaScript. So from a business point, it makes total sense to only hire JS -devs to have a minimized tech stack.

    So you can do it. (Even though I'd say: Use TypeScript for both your fronend and backend development as well.)

    There is one thing I desperately miss about the nodejs environment: A decent framework. Laugh all you want about php, but symfony is one of the most mature and feature-complete framework I ever had the pleasure to work with. (And the bundle ecosystem for it really make developing a breeze. Is there a bundle for X? In most cases, yes.)

    In nodejs, frameworks often boil down to "just use express.js" which leads to loads of reinvented wheels as it is a very barebone http-wrapper. (And yes, I know that there are frameworks like hapijs or sail.js out there. I am not convinced by them.)
  • 0
    That being said: You can use almost any language to create your backend.

    Question is: Does your company want to make the investment in other technologies? Right now I am writing scala with akka-http and circe to create our json-spitting apis. It makes certain aspects easier and more performant. Yet it comes with its own can of worms.
  • 2
    "Same language on the entire stack" has been mentioned as a pro argument a couple of times.

    What about Kotlin+Kotlin for JavaScript or Clojure+ClojureScript? Does someone have experience with that? How did that turn out?
  • 0
    @VaderNT i tried using Clojurescript since I am a big fan of Clojure. I did not really enjoy the entire build process. But das just me man.
  • 0
    No.
    Never has been and never will.

    Node is meant to do the same thing php does, it is not a a language you use for data intensive or heavy computational workloads.
    You use it to get small data from the back to the front, that is it.
  • 0
    @norman70688 not rally, front end js is different from node js, it is so fucking different you have to use webpack to make it the same.
    This argument is so old and useless, man, update your nonsense.
  • 0
    Have you guys noticed there are way more libraries, shit scripts and CLIs made in node than actual webapps?
    That is how you know people don't really read up on the language use cases.
  • 0
    I think you just shouldn't assume everyone uses Nodejs for building REST API, also in terms of scaling it's not up to framework it's on the team/individual how they are building it.
  • 0
    @norman70688 webpack id also a build tool.
    It is just that node is not JavaScript, not the same language, it is written differently.
    You can't just start using node if you know JavaScript and viceversa.
  • 0
    @norman70688 no.
    You are probably talking about nodejs vs ecma
  • 1
    @mundo03 Node is literally just a JavaScript runtime build on V8, the exact same engine that Chrome uses. Yes it runs normal ass JavaScript (offically called ECMAScript because ECMA International is responsible for the standard) just like a browser. It provides a whole series of APIs that browsers don't but it's still the same language
  • 0
    @norman70688 I know, but, it supports a different JS than the JS you would use, hence you need to use webpack to get your node shit to be normal shit.
    That is what I said.
  • 0
    @12bitfloat it does support the same ecma version as the browsers, yes.
    But people are always jumping to the latest posible fancy new ecma shit, hence the need to "build" your project into retro compatible js

    In other words, it is not the same JS.
    And on too of that, you need to know multiple forms of JS (over simplifying here, don't get triggered) to start a node.js project.

    My whole point is, node is not the best for anything but for the backend of a low-data web app.
    And the "it's the same language as the front-end" is bullshit and everyone knows. It.

    Hell, even if you want to argue with "it is also very fast", go is faster and faster to get you productive too.

    Extra bottom line: fuck node and fuck JavaScript
  • 2
    @mundo03 I never said I liked JavaScript. Go is also pretty bad though
  • 1
    @mundo03 Node doesn't support the same ECMA script version as Browsers? we'll yes it does. At least for some versions of browsers and Node.

    If you take Node and IE11, sure, Node supports a newer version. If you compare a old Node version to the latest Chromium build then the browser Wins. In general your statement doesn't really say anything...
  • 0
    @norman70688 @Wackand all that is why node and all its ecosystem is shit.
Add Comment