/ NodeJS

NodeJS — A beginners guide to a lot of stuff. Part 1

OK, I am the first to admit that this title does not tell you very well what you can expect. I thought I would expose a bit of I have learnt over the past few weeks programming in NodeJS.

Even though I am quite an old-timer in the world of programming, I have always been self-taught, under extreme pressures and timelines. I never had any formal introduction to programming so I don’t know the name of things and the theoretical aspects of what exactly I am doing. I do what works and what I identify performs best for each different use case.

Recently, I have changed my focus from “crazy-as*-developer” to, wait for it, “cake designer” — Yes, it was quite a shift. This also gave me the freedom to indulge in the smaller pleasures of life, such as programming for fun, or for my own benefit. One of these new found pleasures has been, learning NODE.
Doing something in node is actually quite easy. Kick up an express server and serve your EJS powered templates with a mongoDB backend? There are hundreds of tutorials that show you how! In just under 100 lines, you can have a very convincing server and API running, yet, as always, when things seem too good to be true, they usually are.

Developing in Node, as in most other languages, can at first seem easy, but that does not mean that you are developing properly. Basic things like serving static html files are quite straight forward, I agree, but when you start creating applications that are larger than a single table/document store, things start getting nasty very quickly.

It is hard to find tutorials that explain in details the core principals of loose coupling, the Liskov Substitution Principle, decorator patterns and the works, mainly because these principles and patterns, can also be implemented in hundreds of different ways in Javascript. How do you go from a “I can run express on my machine” to “I have a robust application that has 100% test coverage, e2e testing and all those lovely things we hear in our podcasts”?

I am not at the stage of saying that I am happy with the way my app is going, yet, compared to a couple weeks ago, I feel I have evolved tremendously. I would like to share over the next few posts, what I have been doing, some of the theory behind what I am doing, and whenever I can, reference material for you to embark in this journey.

This will not be a tutorial where you will end up with a full featured app that does you coffee in the morning and takes your dog for a walk. These series of articles will show you ideas and implementations. Hopefully, some of these will be dead-on right and give you solid building bricks. Some might be completely wrong, and I hope that the community can help me out in directing me to better solutions.
Well, that was that. I thought I’d introduce this idea, and I will try and keep the my articles flowing.

Continue onto Part 2

Gregory Brown

Gregory Brown

Baker, cake designer, cook and just by chance, a full featured developer that is passionate about technology.

Read More