Skip to main content

Exploring Untold Back-End Possibilities

Back-End isn't just what you think it is!

The web is getting bigger each day, much wider in its scope, and newer frameworks and environments are released each day. Even so many 'experts' fail to see the so many alternatives to the mainstream Node.js or Express. I've seen so many new Web Developers start their coding journey, but only to rally down the same path every one else is running on. It's been more than a year since I've been in this field and it was only a few weeks ago that I realised there are alternatives to almost everything here!
No one is an expert, nor a master in coding.
This one quote will remain constant throughout the existence of computer programming.
No matter how much you know, there will always be something which you don't. In this blog, I've tried to list out all possible alternatives to the things I usually use for Back End Web Development, and eventually their alternatives.

Node 

Node.js is not a framework, it's an environment. The thing that most people fail to understand that it's not a backend-specific tool. It is just a tool to run JavaScript code independent of the browser. Picture the world without Node: How would you use JavaScript? Just run the code in the browser, maybe. Make simple web pages with basic JavaScript on the client-side? Yes! 

So how do you run JavaScript in your computer? You make an environment in your PC which interprets your code and executes. Kind of like CodeBlocks, or Dev C/C++, just not opening itself in a new window(IDE). However, the inner core of JavaScript is no different from the browser. Node itself is based on the V8 engine of the Google Chrome browser which is responsible for executing JS code. Now that you know about what exactly is Node, let's jump on to know why the world is so hooked up on it.

1. Company Demands: If you've been active in your search for jobs or internships, you would know that Node.js is almost a starting point of everyone's demands. Almost every startup wants to build their product on Node. Why?

2. Performance and Scalability: That's right, one of the main reasons companies choose Node is it's reliability on performance. It's so much better from the other frameworks or languages that were used before it in a fundamental sense (asynchronous, non-blocking). As for scalability, we can agree up to a certain extent, but there are better things in the market currently. So why still hooked up on Node?

3. Huge Support: I cannot stress enough on this point. Node comes with npm, which wins it for the environment. Basically, you can include npm modules(Node Package Manager), which has built in functions that you simply have to call. Consider an npm module, lodash. You want to pick some key-value pairs from an object and get them into another object. You just have to use the pick function in the lodash module and there you have it. Even to do something so trivial, Node has a module, and this is for everything in JavaScript. I don't know what got so many developers into JavaScript, but because of this single thing, you do not have to worry about anything. There's libraries, and there's modules for everything. No wonder companies want to choose Node over everything.

Cons: Node.js

1. Scalability: Like we discussed, in much bigger applications, when you have a very busy server with quite big computations, Node falls short to deliver. And the best alternative that I've found for it: Golang. 
2. Drop in the ocean: The biggest advantage could be a potential drawback. Having a lot of support means a smooth project journey of googling errors and modules, however, that also means that you could be left out in the crowd of mediocrity. More and more people are jumping into Node, and yes, the opportunities would only increase, but that doesn't mean the opportunities would get better. If you want to be different, you have to think different.

Back-End in Python

Although Python isn't my primary language, I do have a considerable experience in Flask. There are 2 main frameworks for Python: 
Django (pronounced as jango), & Flask.

Programming in Flask is quite similar to programming in Node/Express. I've heard Flask is much more flexible, and that it allows you do stuff your way. 
Django, on the other hand, is much more structured and full of rules. And this might sound boring, but while building bigger applications, structured is the way. I would say, if you want to learn Back-End in Python, learn both of them. For your simpler side projects, use Flask, but for making something meaningful, get your hands dirty with Django!
Anyway, to understand their differences in more detail, here's a visual help: https://www.educba.com/django-vs-flask/

Cons: Django

Django, as per general opinion, is tougher to learn. You need to know quite a lot of Python conceptually to understand Django. No doubt, it's fast, but surely you have to go slow while learning it! 
In this case, Flask becomes a good tool since it hardly took me any time to understand its code and I didn't even know a lot of Python! 
However, compared to both these languages, Node is still the number one choice by companies. So if you're learning to secure your future, I would suggest not to make this your primary framework.
If you want to get a quick heads up on Python, read my blog that teaches Python in 5 minutes!

Ruby on Rails

Ruby on Rails complements Node, that is, it wins where Node loses, and vice versa. As discussed before, Node fails to perform on CPU intensive servers with bigger traffic. Ruby on Rails delivers exactly that. 
Ruby on Rails, however, falls short on speed. Considering our server is not performing a lot of computation for each request, and is basically a real-time application, nothing can beat our beloved Node.js. 

NOTE: If the reason for the high speed of Node.js, and the mention of asynchronous, non-blocking environment is not clear, it's because the explanation for this can be confusing given the fact that it requires a little understanding of threading, processes and OS. 
Yet, if you still want to know, here's a StackOverFlow answer.

Golang

I'd saved this language for the end. Since this is the future, and this is the climax of this blog. Finally a language that beats Node.js, and is coming for it's HUGE support!

1. Developed By: Google. Need I say more? Okay. A company that employs the world's best engineers makes no surprise to lead the world's technology. Anything developed by engineers of their calibre would obviously be quite meaningful. But is this important enough to be considered better than Node? Why should we take their product seriously?

2. They know their mess: Developers at Google who made this language didn't just make it for fun. They had a reason. They have the biggest dataset on the planet, have the biggest suite of useful applications among all companies. They know what it's like to have a slow server when it's performing bigger computations. Does it sound like Node's shortcoming? I'm not saying that they used Node in their server management; I don't know, to be honest. But almost all languages and frameworks fell short in this regard: Scalability. Thus Golang was developed to solve this issue.

3. Speed: Golang was developed keeping everything in mind, and Go doesn't fall short of Node's speed either.

Potential Cons: Go 

1. SUPPORT: Yes, the only thing keeping Node on the Iron Throne right now is its huge support of developers, modules, and libraries. A few years ago, PHP was the most famous languages for web development, and just look at the rise of JavaScript. Should it be any reason for a language that is so fundamentally better than Node to not have a larger support eventually? 
Go won't replace all of JavaScript, but it would certainly be the most preferred back-end language of the future. 

NOTE: If you're blown away by the possibilities of Go, do check out this amazing post about Go

Honourable Mentions 

Laravel
Laravel is a web framework for PHP that says, "No, PHP is not over yet." I've never programmed in this framework before, but you can still give this a try since there still are some avenues open for this. And the good thing is, there are only a few developers around me who know Laravel. Apart from this, I can't really advise on this.

Node Sub-Alternatives

So we have discussed all the alternatives to Node in backend web development. This is for all the people who know a bit of Node.js or who are looking to start learning Node. I will be discussing alternative frameworks for Servers in Node.js.

1. Express

If you start any course for Node.js, you will find it using this framework. Majority of Node.js developers use Express, and so do many companies. 
It is obviously an amazing framework. Hardly anything to learn in it. To be honest, I never had any problem using it. 
But how can you compare anything when that's the only thing you've tried?
As per experts' opinion, Express is really slow, being dependent on other modules. We also need additional modules while modifying or reading request elements. It is important, or rather fun to consider other options too.

2. Hapi

Known as the frameworks of the Enterprise, Hapi's structure is quite different from Express. So if you're not a newbie, you might have trouble shifting into this new framework. However, this is known to be really structured, and makes working in teams much simpler.
As a developer who has worked in teams, I must say that it wasn't really the sweetest time when I tried reading the other person's code. Oh, the nightmare! 
While I haven't worked on Hapi before, I hope this remains true to its word.
Hapi's syntax looks somewhat similar to an AJAX method call, but it still is a LOT different than Express. 
Does seem challenging, it would be really fun to make an API on this!

3. Koa

Koa is something that is structurally very different from Express. They are known to have the same internal modules, but still, it is different. Never having heard about this, my knowledge about this framework seems limited, and so does the internet's. Here is a rare detailed comparison on the two frameworks for you to read.

In conclusion, there are a lot of frameworks and possibilities in Back-End Web Development. Just because the world currently runs behind a select few is no reason for you to rally behind them. Pick one of these new options, learn them, and when the world realises their importance, it'll realise yours.




Comments

Popular posts from this blog

Namaste JavaScript Quick Notes

Note:  Akshay Saini's Namaste JavaScript is probably the best course for JavaScript developers out there. These are my personal notes that I made while watching the course; they serve more of as an online quick reference for my understanding and revision, and I hope it benefits anyone reading it too! Everything in JS happens inside an Execution Context. Before a JS code is run, memory is allocated and variables are set as undefined   , and functions are set as their exact code in the scope within the Execution Context. The global execution context hosts all the global variables and function definitions. An Execution Context has 2 components: Memory, that stores variables and functions; and Code, that reads and executes the code. Call Stack maintains the order of execution contexts. Since JS is single threaded and asynchronous, at one point of time, only one function is executed which is at the top of the call stack. For each function, an execution context is created before executi

i3wm essentials - I (Brightness)

So you have started using i3 and somehow managed to open your browser and almost resumed your normal work.  But wait, the brightness is too much isn't it? Or is it too low? The mousepad used to work fine, but now all of a sudden tapping does not equal click?!  Don't worry.  This blog series will tell you all about the essential setup commands and common shortcuts that I use to navigate my work in i3, and how you can too. Changing the brightness So you just started i3 and you just can't take this brightness setting. You go for your function keys, and damn! They aren't working. Quick fix: Run the following command if you need to change the brightness ASAP. xrandr -q | grep ' connected' | head -n 1 | cut -d ' ' -f1 This will give an ouput that's the name of your monitor.  Use that monitor name here and change the values of brightness to suit your needs. xrandr --output <monitor-name> --brightness 0.7 Now that your eyes are comfortable, let me show

"Hey Google" get me a new T-shirt

Everyone loves Google for its amazing technology and creative workspaces! Guess what? Google loves its developers as much as the world loves it too! And yeah, you don't need to be an amazing programmer to be a developer in Google's community. All you need to do is to spare 30 minutes, just once, and maybe have some creativity! That's it! Oh, and you should be really checking your mails periodically, although if you don't currently have this habit, your excitement would develop that for you. What do we want? So you arrived here to know about getting a T-shirt. Would you also like having a Google Home ? Yup, that is also something you could get through this. And of course, as I mentioned earlier, an entry to Google's Developers Community Program! There're a lot of perks for it but let's first talk business. What do we have to do? In a nutshell: Make an Action for Google Assistant .  But what's an Action ? Action is a feature, or a sub-applicat