This post is just a short reflection post on coding gistsecrets.io.
I’m pretty proud of this project. It:
So, all-in-all, a successful side project.
Node is really as easy as people make it out to be. It takes just a few minutes to run the server locally and plugging in packages with npm is pretty seamless.
The same can be said for Express. They really “just work” which is super nice.
Overall, I’d give the Node-Express tech stack an 8 or 9 out of 10. I’ll almost certainly use it for other side projects in the future.
How did my entire collegiate education seemingly leave out templating engines? Maybe I just forgot? This was far and away the biggest confusion I had starting out building a web app and I’m sure others will too.
Basically, you start off building and the first question you want to know is: How do I make something appear on the page?
That’s easy – HTML. Everyone knows that. Ok, now how do you get the server.js file talk to the HTML?
The jump from the first question to the second is bizzarrely difficult. This is about how my thought process went for the second question:
This is not really unique to Node. I tried searching for templating engines in Spring MVC and got pretty much the same responses.
My guess is that in the microservice world where we send a bunch of JS to the end user to perform AJAX calls to an API, templating engines aren’t as necessary and stuff like React becomes more important. I could be wrong though as I don’t work on a project that uses React or newer JS stacks. I would like to do a project which incorporates Angular/React/MongoDB, etc. at some point though.
The usage of these across StackOverflow, tutorials, etc. is incredibly confusing to new developers. I’m not a new developer but even so, nobody seems to use them or use them appropriately. Maybe it’s because they’re newer types and developers want to be backwards compatible? I’m not sure, but it makes jumping into JS confusing.
I tried to write the first pass of the app in simple JS. As a result, I wound up with like twenty chained callbacks and code indented halfway through the page.
I figured there had to be something wrong here, so I spent some time understanding the history of JS and async-await. I re-wrote the code to match that pattern instead and it’s a lot cleaner. Plus I feel like I rounded out my JS understanding a lot. That said though…
Instead of the clumsy and verbose pom.xml it had a settings.json file. Instead of mvnrepository there’s just npm.
Maybe there’s nothing new under the sun but I found the differences between the two surprisingly minimal.
I really like using node.js and thought this was a fun project. I’ll probably continue using it because:
- Floriantags: coding - node - tech