Why Flask For Beginners?

Python and Javascript been the top players in backend web development for quite a long time. Python framework called Django has been known for its ease of development and Node JS (same as javascript but a language on itself) has been known for its speed. So my first choice was Full Stack Web Developement and Node Js.

I learnt backend web development during the initial days of my quarantine. The Genius of me always tell me to take the long and difficult road for the skill that I'll get from it. Sure, that's how a really motivated person with lot of time would do. I learnt advanced CSS, Javascript and React before getting started with Node JS.

I used javascript.info to learn javascript in depth. The only programming language that I knew before was C++, so it took a lot of time for me to get around the idea of a programming language that is neither object oriented nor function oriented. I read on quora that learning React would benefit in learning Node Js. So I started learning React, which wasn't too hard to learn because I knew HTML and CSS before and has already learnt Javascript.

Now its turn for Node Js. I learnt Node Js from a Udemy Course and I didn't know what the heck was going on. The tutorial helped me in learning a lot of advanced Javascript, but I wasn't getting the idea of backend. The models, schemas, nosql databases, servers, middlewares, tokens (JWT was the worst XD), etc, wasn't making any sense. The first project didn't even have a front-end, second project used postman to create API and the thrid one was to create a chat application using Socket IO. I was lost!!

In my college we used to do a lot of web project, for most of which I did the fronend. My friend was a python developer and he used develop in Django. I would create templates for the website. That is how we worked. I didn't learn Django or Python because I knew I wouldn't go for Machine Learning or anything scientific. I loved web development, atleast the frontend, and I wanted to become a full stack web developer.

But things turned around, now I was feeling the need to learn python. I was introduced to Quantum Computing in the very end of 2020 and the whole Quantum Computing frameworks were built in Python. Now I had to learn python. I wasn't disappointed, Python was awesome!! I decided to learn Django or Flask to get better in python. You get the dilemma right! It was resolved with a few quora answers and I started learning Flask.

Flask wasn't like Node js where we would have to build everything from scratch. It wasn't even like Django where we did not have to build anything. That is what I liked about Flask. Flask community is big, but not as big as Django or Node Js. The big but relatively small community was better, atleast I felt like that. Entire community follows a pattern for flask development. It has a proper structure which is not enforced but is followed by most developers. There wasn't many useless videos which introduce us to a whole new topic for small things, which wastes our time. There is only limited amount of videos on Flask and all of them are awesome. Pretty Printed, Tech With Tim and Cory Schafer helped me a lot in learning the right thing.

One great thing about flask is that we have dedicated libraried for everything. Documentation doesn't confuse us with different platforms because it is dedicated to flask. There is even a Socket IO library dedicated to flask!!

The reason for me not liking Node Js in the first place was that everything is in Javascript and I couldn't see the distinction from client and server side javascript. Learning Flask helped me a lot in clearing the big picture. In Flask we can't send objects as JSON like we do in Node Js, we have to serialize it before to send it over a network as JSON. This helped me in clearning many wrong ideas on using a non object oriented language in backend. A real programming language like python (No offense to Javascript Developers, bcz I love Javascript : D) would help you get a clearer picture on web development.

So if I had a chance to start again, I would not go for Node Js in the first place. Learn HTML, CSS, Javascript, then learn Flask. Start building some applications and once you feel like you can't do this with just Flask, learn Django which won't be difficult because you already know Flask. Once you get comfortable with everything, learn Node Js, React, Mongo and become a Full Stack Developer.

Keep Coding : )