JavaScript on both ends
After 4 pomodoros on @AnthonyPAlicea's NodeJS course, Lecture 90, I think I understand how JavaScript code runs on both front and back-end.
Looking at this code, I can see how the array of JavaScript objects is declared on the server (/app.js), then passed on to the view (/views/index.ejs), converted to a JSON string, is made available to the AngularJS controller, which then manipulates the JSON object in the client.
As I go through the code line by line, I ask myself continually:
Where does the program get this from?
Where is the variable declared?
How does this part of the program have access to it?
In this way, I can always see, piece by piece, how it all fits together.
Unless of course I'm using Rails, in which case one must have faith in its sugary magic.
Published on 28 Apr 2018
by Alexander Garber
all tags
100daysofcode activerecord android annoyances api apt arch array artix atom az3w backend bash blog browser bug callback career ci-cd cli cloud code coding config configuration cp crud cryptography css csv database db design devops django docker email erp feelsgood filter fugitive gif gist git gnome gnome pomodoro grep hebrew http ide isbn-fetcher iso javascript job search js kanban kindle koans learning linkedin linux logger manjaro map markdown microservices mobi mtp neovim nodejs nvchad packages panda pastbin patch portfolio post postgres pytest python rails reduce refactoring reflections rest routes rspec ruby salesforce script scripting security sed shell sql string_replacement study tdd terminal testing tmux ttd version_control vim vim sort walkthrough webdev workflow zsh