Top | Newest First | Oldest First
Northwest · M
Apples and Oranges. A typical web application, is two main parts: frontend and backend.
The frontend handles displaying the information in your browser.
The backend handles interfacing with databases, API services, networking services, security services, etc.
On the frontend, the basic level (plumbing) is the DOM, and you can manipulate it directly via Javascript. So, you have things like document.getElementByID.
Node.js, on the front end, manifests itself through Modules that allow you to write "Views". Typically, these "Modulees" prescribe specific templates, to write views. Within these views, the ID is used as a wrapper for code that describes what happens inside the DOM element identified by the ID, without the need to do document.getElementByID.
You will have to look up the reference material for the specific Module/technology to produce these views/flow. One of the most popular is React. But I suspect, given your question, that you may need to do some basic prep work, before going into the innards of Node.js.
The frontend handles displaying the information in your browser.
The backend handles interfacing with databases, API services, networking services, security services, etc.
On the frontend, the basic level (plumbing) is the DOM, and you can manipulate it directly via Javascript. So, you have things like document.getElementByID.
Node.js, on the front end, manifests itself through Modules that allow you to write "Views". Typically, these "Modulees" prescribe specific templates, to write views. Within these views, the ID is used as a wrapper for code that describes what happens inside the DOM element identified by the ID, without the need to do document.getElementByID.
You will have to look up the reference material for the specific Module/technology to produce these views/flow. One of the most popular is React. But I suspect, given your question, that you may need to do some basic prep work, before going into the innards of Node.js.
Northwest · M
@Entheesa
🤣
You should stick to learning Javascript for now. If you can even avoid everything related to the web, and focus on the Javascript language itself.
Once you've mastered that, you should take a DOM course.
Then take an HTML course.
Then take a CSS course.
Then you're ready to learn how to be a front-end programmer, with these building blocks mastered.
From that point on, you will be dealing with higher level environments. Manipulating the DOM, today, is akin to an electrical engineer, designing a circuit a single gate at a time, all 5 billion of them, for a single modern chip, when then can select a 5million gate filter, using a single element from a library.
And if you focus on the basic building blocks, you will make a far better programmer than a lot of the people whose resumes pass my desk every day.
Then my head exploded.
🤣
You should stick to learning Javascript for now. If you can even avoid everything related to the web, and focus on the Javascript language itself.
Once you've mastered that, you should take a DOM course.
Then take an HTML course.
Then take a CSS course.
Then you're ready to learn how to be a front-end programmer, with these building blocks mastered.
From that point on, you will be dealing with higher level environments. Manipulating the DOM, today, is akin to an electrical engineer, designing a circuit a single gate at a time, all 5 billion of them, for a single modern chip, when then can select a 5million gate filter, using a single element from a library.
And if you focus on the basic building blocks, you will make a far better programmer than a lot of the people whose resumes pass my desk every day.
IHateViolence · 36-40, M
nodejs runs on the server
it doesn't have access to the DOM, which is only available on the front-end
it doesn't have access to the DOM, which is only available on the front-end
basilfawlty89 · 31-35, M
NodeJS doesn't work with the DOM at all, so you wouldn't need to access DOM elements.
Node is more like a hybrid server and backend system, although you can install front-end frameworks like React or Angular.
That said, if you use React for the frontend part of the site, there's better methods than document.getElementByID.
Node is more like a hybrid server and backend system, although you can install front-end frameworks like React or Angular.
That said, if you use React for the frontend part of the site, there's better methods than document.getElementByID.
View 1 more replies »
basilfawlty89 · 31-35, M
@Entheesa you'll first need to learn a bit of React for this to make sense. Bear in mind React uses JSX, which is a bit of a hybrid between JavaScript and HTML. It seems weird at first, but it works well.
https://reactjs.org/docs/dom-elements.html
https://reactjs.org/docs/dom-elements.html
Entheesa · 31-35, F
@basilfawlty89 This already helps my understanding a lot, thank you! I'll find some videos to teach me about React. Would it be okay to PM you if I have other questions?
basilfawlty89 · 31-35, M
@Entheesa of course :)