3 ms·
Thanks for your reply. With python, I can run applications at the command line by calling `python my_app.py`. Is this because the language ships with it's own r
by emehex 5y ago
Thanks for your reply. With python, I can run applications at the command line by calling `python my_app.py`. Is this because the language ships with it's own runtime, whereas JS is just a language and doesn't come packaged with a runtime? Also, I've been reading about Deno. Worth learning over Node?
- johntdaly 5y agoYes. You have multiple runtimes with JavaScript, more than just Node.js or Deno. While I like Deno I would recommend against it because right now you don’t have as many libs or tutorials out there to get you started. That would make learning it a lot harder. Once you know Node.js you can look at Deno. The sandboxing they’ve implemented is rather nice in my opinion but I think it is easier to understand what they’ve done and why once you understand Node better.
- emehex 5y agoInteresting. So libraries like Vue and React only work with Node? Why aren't they cross compatible with the different runtimes?
- acemarke 5y agoThis is mixing up a few different things. Vue and React are primarily client-side frameworks, intended to run in a browser. They expect that the Document Object Model (DOM) APIs be available, so that they can update parts of the current page based on your components. However, they can also be used for "server-side rendering", using the same component definitions to generate an HTML string and return it (similar to how you might generate HTML via templates in a typical server framework like Rails or Django). I know just enough about Deno to know that there are technical differences between how Deno and Node handle defining and loading JS module files, and that might have implications on whether Deno can handle loading libraries like React and Vue as they're currently packaged and published.
- emehex 5y agoOkay! Thanks for the clarification. I was imagining React as like a library akin to Flask and that it could only work with Node and not Deno. But I understand now that this is the wrong way to think about it.