Nowadays there are so many languages and frameworks to choose from: PHP (and Laravel), C# (ASP.Net), JavaScript(Node.js), Python (Flask and Django), Ruby (Ruby on Rails). Go, Java, Perl and some other languages stay apart and they are not used so widely.
When we were thinking about which language/framework to use for our boilerplate we had the following requirements:
As Python was used pretty widely we looked at it. The language look pretty promising so we decided to give it a try. We also found a couple of frameworks: Django and Flask. We started from Django.
To be honest, the first several installations didn’t go smooth. We were confused by the recommendation to install virtual environment, another not-too-easy thing were environment variables. The Python itself was installed globally but we had to install packages separately, and using different versions of Python was pretty confusing. Django turned to be big and heavy and we, although spent the whole day on it, didn’t succeed to run.
We tried Flask then.
The funny thing was that it looked almost the same as Express in its minimal configuration. The code, routes, settings - everything looked so familiar (except it was Python not JavaScript). We spent just 20 minutes and were able to run it. Another 10 minutes and we added a new route and a new page. The rendering engine Jinja worked absolutely predictable and we didn’t experience any problems with it. Adding Vue.js was not a real problem either even though we had to change the initial settings for Jinja because of incompatibility - but now, when our boilerplate uses React we don’t have to do that.
So, it was our experience and now I would like to talk a bit about if it’s a good choice for SaaS at all. We won’t compare the speed, or the convenience to use - this is a question of personal preferences but there are things that makes Python unique and suitable for SaaS solutions.
We also have a “third-party” proofs. First of all, this video shows the evolution of Python (2008 -2018).
Also, Stackoverflow itself conducted survey (2019):
See some insights from other SaaS-builders: - https://usersnap.com/blog/cloud-based-saas-architecture-fundamentals/ - https://julien.danjou.info/is-python-a-good-choice-for-entreprise-projects/
And the insight from the Flask’s author: https://www.infoq.com/presentations/saas-python/
Now, let’s have a look at the SaaS Forge boilerplate in terms of using Python: We use Flask-JWT package for authentication SQLAlchemy as ORM for working with database Flask-Mail and many other packages for workflows. Amazon Web Services has a great library covering all the APIs called boto3
There is a lot of IDEs available for free but our favourite is Microsoft Visual Studio Code. It may not have all the cool features that you can find in its big brother, Visual Studio, but it's still might and lightweight IDE.
Another option is a community version of PyCharm. We found it slower and harder to use that MS VS Code, but you can give a try!
The article wouldn't full without reviewing some flaws of Python. You can find them on the Internet but be careful: some websites like this one http://net-informations.com/python/iq/disadvantages.htm has pretty outdated information.
First of all, Python is not compiled language what means it's compiled on-the-fly, without previous compiling. It may cause some slowness of working. Another "problem" is some bugs and errors are not visible until the executable hits them.
That's it! Truly, we don't know any other disadvantages using Python.
{{newComment.content}}