TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How would you defend Python against Node.js in a SaaS web app?

4 点作者 bcambel将近 12 年前
Some folks at the office would like to use Node.js for a SaaS webapp, which I find extremely useless. We don't except huge amount of customers, and we already have a WebSocket api written in Clojure ( which will change in the future, Node.Js might be a good fit here) . What do you think Python's biggest strength against Node.js ? First thing that come to my mind is the development speed, great open source projects, tools and huge community, years of experience, etc.. Help me out to support my argument.. All server side code will be in CoffeeScript( if node.js will be chosen ) Thanks

6 条评论

declandewet将近 12 年前
I don&#x27;t think any of those except &quot;years of experience&quot; are valid points against the use of Node.js, and even that isn&#x27;t really on the mark with reality. This is because Age !== Experience. Perl has been around longer than Python, but it sounds like you wouldn&#x27;t want to use it. Granted, Node.js is still considered <i>fairly</i> new, but remember - it <i>was</i> released in 2009. We&#x27;re a few months away from 2014, and this has been more than enough time for Node.js to mature just enough to be suitable in a production web app.<p>I&#x27;m not advocating the use of one over the other for you (personally I&#x27;d go with Node because my expertise in it outweighs my expertise in Python), I&#x27;m simply stating my opinion that these are not valid reasons to disregard the technology. The Node.js community is bustling, the amount of modules available on NPM are in the tens of thousands, and many open source projects use it (Yeoman, Grunt, Stylus, Jade, Roole, LESS, Bower, CoffeeScript to name a few).<p>Development speed is likely the most probable of your points, but even so - you can write a Node.js app in CoffeeScript, which you might be more inclined to do since your love of Python is so prominent, and CoffeeScript borrows many ideas from Python, such as significant whitespace and chained comparisons. A manual compile step isn&#x27;t necessary as this feature can be done by most IDE&#x27;s implicitly. Express.js also helps big time.<p>The only reason I would use Python over Node (if I was in your position <i>and</i> actually knew enough Python) would be if the web app in question required intensive mathematical or scientific calculations - Python would shine over Node in that respect.
staunch将近 12 年前
I&#x27;ve found that, at the end of the day, choices of which technology to use are rarely (but <i>certainly</i> not never) actually technical decisions. You could create this app with C-based CGI scripts if you really wanted to, and you could probably make it work perfectly well.<p>Realizing that your decision isn&#x27;t a technical one is the first step in actually having a fruitful discussion. Arguing that you <i>can&#x27;t</i> use any reasonable technology is just going to turn into a pointless argument.<p>In my experience 95% of the time the right choice is whatever your team is excited about using. The more excited and motivated your team is the more likely you are to build something good, and that&#x27;s what <i>really</i> matters.
brianchu将近 12 年前
<i>If</i> you have a sufficiently JavaScript-heavy client-side codebase, there is a very strong argument for essentially unifying the server-side and client-side tooling. Being able to write and run unit tests in exactly the same way (jasmine or mocha), being able to use the same IDE or text editor plugins, being able to use the same package manager (npm), being able to move client-side and server-side developers relatively effortlessly, being able to use the exact same build tools (grunt or something else). You also get to share code between the client and server (this isn&#x27;t a huge benefit, though).<p>As a bonus you get the fact that node.js can scale better, though this should not be a huge concern.<p>Python has a real advantage if you&#x27;re doing lot&#x27;s of data analysis &#x2F; machine learning, as the node.js ecosystem for those applications is nearly non-existent.
amccloud将近 12 年前
I&#x27;m a huge fan of Python. I&#x27;ve recently started to benchmark websocket servers. Python (gevent, eventlet) completely locked up when I subjected it to the load, ~30 frames per second, I was sending to a Node.JS and Go server. I kinda expected that. Maybe i&#x27;m doing something wrong. For now I think i&#x27;ll stick to nodejs.
mattwritescode将近 12 年前
Maturity, and development speed is what it comes down too.<p>(Development speed also includes support, and community willing-ness to help)<p>Its all well and good selecting a technology because its got a lot of hype at the moment but what happens when you need to support, fix and maintain the code.<p>Or even better debug the darn thing!
apphrase将近 12 年前
Tools and community are the key, the rest can be argued for days or months or years with no real winner nor real value to it...