Which language is better python3 or JavaScript for backend?? | SoloLearn: Learn to code for FREE!

+8

Which language is better python3 or JavaScript for backend??

2/16/2020 12:54:42 PM

Chandan Soni

90 Answers

New Answer

+25

Hey folks. The only way to know which is better for you, is to try them both. Take python and Django, try them for serious a test drive. Take javascript and Node, take em for another serious drive with an open mind. What I like, you may not like. What you like, I may not like. Now, I feel I need report this question as open ended, meaning only rambling "blablabla" comes out of it.

+19

[Part 1 of 3] Chandan Soni This thread is going to be better in your personal feed. I wish it could remain in Q&A. However, you simply won't get a clear answer as most will respond based on their limited personal experiences and biases with one over the other or get lost in the pedantic nuances between these choices. *Although I'm marking this for deletion,* I'll post my own opinion and experience which you can take or leave. From my anecdotal experience as a seasoned professional software engineer for the past 24 years, I would pick Javascript over Python for any project beyond that of a simple utility script. For clarification, NodeJS is the generally accepted reference for differentiating server side Javascript from Javascript that runs in the browser. NodeJS is the server side runtime for JS where as the browser is the clientside runtime for JS. Anyone who still thinks of JS as a client side language is simply mistaken. [UPDATE] *mfd removed by Fox.*

+17

[Part 3 of 3] Anecdotally speaking, many trusted devs I talk to generally share the following concerns for Python: - Python code bases get ridiculously more difficult the larger it gets. - Relatively poor performance in stress tests, especially when attempting to run asynchronous tasks. - Bad experiences with Python in past projects. - Fundamental limitations for scoping support create a ripple effect of awkward language design decisions that will simply never be undone. Ex: - no block level scoping - lack of explicit variable declaration - access modifiers as an afterthought - While Python has a few cool unique language features, it feels very dated for missing many features found in other scripting languages. If I had more time, I could go much deeper into details. This link covers much of what I would list and is echoed when talking with many other experienced professionals in my network. https://softwareengineering.stackexchange.com/q/15468 Take it or leave it. Just my 2 cents. 😉

+14

[Part 2 of 3] From a capabilities standpoint, NodeJS can be used to build simple to complex utility scripts, console apps, micro services, web servers, RESTful services, mobile apps, desktop apps, games, be used for machine learning, etc. Recently, we conducted an internal poll within my current company across 2 dozen or so dev teams who operate with full autonomy in tech stack selection. I was surprised to learn that not a single team is willing to use Python beyond the occasional prototypes and simple scripts used for various utilities, automation, and DevOps related tasks. This seems to be consistent among my wide network of professional developers across many different companies across many different job markets throughout many countries. (continued...)

+11

Sonic I too have read many articles "claiming" Python to being prominently used in many large companies. It's one of the reasons I've reached out to many developers in my network to figure out what I've not seen myself. After realizing everyone else I've spoken to about this have been just as confused, we all started questioning the validity of these claims. I suspect the claims are mostly from students, nontechnical "tech" journalists, or writers who mistakenly lump core application development in with DevOps and Data Science scripts. I think the rampant adoption of Python in universities combined with a few high profile companies who have embraced Python at one time or may just be stuck supporting it has built this massive hype machine that won't stop. TIOBE Index simultaneously reflects and further perpetuates this hype of massive searches on Python. Too many articles place too much weight on TIOBE Index as a primary indicator. That said... (Response to Sonic continued... )

+9

Django is not python Python is not django Django uses python Python uses python Django is a markup Python is a programming language Python has been in the web long time before django comes into existence, I mean the actual python. BTW @OP, I'll suggest you go for python since it's a general purpose programming language, with it's knowledge you'll get to do some other interesting things javascript might fails to do

+7

[Part 2 of Response to Sonic] I fully acknowledge my own experience is merely an anecdotal observation that could just be isolated within my own narrow bubble. I even acknowledge this anecdotal bubble includes the observations of roughly 25 very experienced software developers and architects across 18 to 20 companies and maybe 4 times as many if you include our collective past employers and side contracts from the past 5 to 10 years. This is still anecdotal if you extend this to the general collective feedback shared by many other developers to those in my immediate network. I would still consider TIOBE Index to be far less credible as an indicator for predominant use in application development over all. Rather, I would spend some time reviewing the results of a report reflecting the frameworks used on the top 10K, 100K, 1M, and 11M websites based on data collected from webcrawlers. https://www.similartech.com/categories/framework

+7

We eventually rewrote it using NodeJS in a fraction of the time and effort with massive performance gains. Your Comment: "Python is ideal for large project as it can do anything that can be done using PHP while node.js lacks the clean coding standard." My Response: The challenges I'm referring to regarding large projects isn't based on what can be implemented, but rather that coordination of multiple developers merging their respective pull requests and the inherent complications that come from such merges over time. While this is inherently challenging for any language, it's a nightmare for Python in too many ways to enumerate here. The bugs that slip in from the most seemingly harmless merges based on white space is where the nightmares stem from. (continued...)

+7

Regarding the "clean coding standards" I'm not sure if you are referring to architecture standards like Clean Code and SOLID Principles or if you are making a general reference to some coding standard like PEP 8. If you are referring to the Pythonic Code Standards, this is where I will say it's a matter of preference. People either love it or hate it. I personally am not a fan for many different reasons that would be too off topic. The basic premise for me is my teams typically evolve our coding standards as they make sense for the team. Regardless of the standard we choose, it's about our choices and preferences. With Python, the philosophy of one way, which is often contradicted in the conflicting naming conventions across different libraries, core devs, and timelines. I'm not criticizing the discrepancies as these are to be expected. I just can't blindly follow standards that were created by some council or the BDFL just because they said so. Again, this is a matter of preference for me. 😉 Anyway...

+6

i found more threads but i reached char limit i guess

+5

It is not necessary to compare which is better. For Python, you can use Django. For JavaScript, you can use Node.js They can achieve the same results.

+5

Mirielle👽 // Node.js accesses all server variables variables require('dotenv').config(); const serverVars = process.env

+5

Chandan Soni if you seriously tried them both, with a SERIOUS test drive, and cant make up your mind as to what is best. Perhaps you are just not truly satisfied with any of those two and should try another option (PHP, Go lang, Ruby, etc). Or just flip a coin : Honestly, for me, choosing a language to program is just as trivial as what I will eat today for lunch or what color of socks to wear. Also you could SEARCH your question before you POST as this question has been asked before. https://www.sololearn.com/discuss/1870271/?ref=app https://www.sololearn.com/discuss/431074/?ref=app https://www.sololearn.com/discuss/2146599/?ref=app https://www.sololearn.com/discuss/895786/?ref=app https://www.sololearn.com/discuss/178123/?ref=app https://www.sololearn.com/discuss/190760/?ref=app https://www.sololearn.com/discuss/1878487/?ref=app https://www.sololearn.com/discuss/2166605/?ref=app https://www.sololearn.com/discuss/1792758/?ref=app https://www.sololearn.com/discuss/1909043/?ref=app https://www.solole

+5

Content I love to see. I think I'm going to stop fuelling my indecision and suspend forthwith, any more "Python or Node.js" searches on the internet. After reading David Carroll's post, I feel justified in my decision to learn JavaScript/Node. Now I'm just looking forward to completing my Udemy Node.js course and start building stuff! ✌️

+5

Mirielle👽 I can only speak from my personal experiences working with both languages. I'll try to respond to a few of your comments using specific examples from a small slice of my own experiences. Your Comment: "Well node.js will only be be best free when compared with python in web application development." My Response: While I've done a lot of web application development in NodeJS over the years, that might represent only half of the types of development I've done in NodeJS. A few examples of services and console apps in NodeJS I'm referring to are: - File extraction from HAR files. - Image processor for a number of media file conversions like, EPS to SVG to PNG to resized PNG. - Scanning over 100 SVN repos via SVN client commands to refresh course XML files in MongoDB GridFS based on comparison of commit revision numbers. - This was originally prototyped in Python. We spent much effort hacking around the limitations of the GIL and various alternative work arounds. (continued...)

+4

ChillPill yeah, this is the case for most "which is better" questions.

+4

David Carroll I'm just curious to know why so many prominent companies have chosen to use Python on their back-end and in globally used web sites. Is it due to the "Python when you can and C when you must" mantra or something like that, although I can't recall exactly where I heard that?

+4

David Carroll very interesting discussion indeed. It's a bit sad when threads like this get mfd'd as I feel that others in the future can also glean some facts from them, even if any 'truths' are concealed amongst the myriad of opinions here backed by articles from so called tech journalists. As to the BDFL, I heard that Guido has had one or more stints at Google. I wonder if the Python hype at big tech has got something to do with that as well. However I also recently heard that Facebook had a lot of trouble with Python during some scaling-up activities, although I don't know if this is Django related or not. As to collaboration, I wonder if more Python friendly merge tools (with better contextual treatment of white space) will help in larger projects in the future.

+3

🅰🅹 - Pʀᴏᴅᴜᴄᴛ Mᴀɴᴀɢᴇʀ node.js can be used in the backend to access database, create server etc. But JavaScript can't do that.... I'm surprised seeing everyone taking JavaScript as node.js like it was for django

+3

Mirielle👽 What is "the interesting thing that Python can do and JavaScript might fails to do"?