Python+Tornado vs Scala+Lift?

发布于 2024-12-02 03:58:31 字数 412 浏览 3 评论 0原文

我正在寻找一个基于 Google 地图的网络应用程序。 我最初的想法是,第一阶段的重点应该放在前端,后端应该易于编写和原型化,并尽可能地帮助前端的开发。

不会有“经典”页面,只有 meebo.com 风格的界面。 javascript + jquery。 (也就是说,静态页面很少,甚至根本没有)。

我的眼睛已经注意到了彗星式的服务器推送范例,我真的很想用它来做一些概念证明。

方面有什么建议、优缺点或经验吗

您在使用Python + TornadoScala + Lift

?该选择可能会给 Web 应用程序的其他领域带来哪些其他优点或缺点?

注意:这适用于最多 2 名开发人员,而不是大型分布式和不断变化的团队。

谢谢

I'm looking to start a Google Maps based web application.
My initial thoughts are that in the first phase the focus should be on the front-end, and the backend should be easy to write and to prototype, and should aid as much as possible the development of the frontend.

There will be no 'classic' pages, just a meebo.com style interface. javascript + jquery. (meaning, very few if none at all static pages).

My eye has caught the comet-style , server push paradigm, and I'm really interested in doing some proof of concepts with this.

Do you have any recommendations or advantages and disadvantages or any experiences in working with :

Python + Tornado vs Scala + Lift ?

What other advantages or disadvantages in other areas of a web application might a choice bring?

Note : This is for max 2 developers, not a big distributed and changing team.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

国产ˉ祖宗 2024-12-09 03:58:31

我认为 Python 和 Tornado 是一个很棒的团队,原因如下:

  • Tornado 实际上是一个 IOLoop,恰好附带了在其上运行的 HTTP 实现(以及一些帮助程序)。

这意味着它配备了您进行网络开发所需的一切。

这也意味着,如果您发现以后需要其他后端服务来帮助扩展您的应用程序,龙卷风很可能在该领域发挥作用。实际上,我在 Tornado 中编写的后端服务比前端服务还要多(但一位同事对此的体验完全相反——他更面向前端,并且发现与它一起工作同样好) )。有点偏离主题,但我们也在龙卷风之外使用了他们的模板模块,并取得了巨大成功。该代码非常模块化,几乎没有相互依赖,因此重用其组件非常容易。

  • 你可以学习它,并且非常非常快地了解它。

你需要一整天的时间才能弄清楚。它的代码很干净,并且有令人难以置信的良好注释,此外它还有不错的文档。我能够在大约一周内使用 Tornado 0.2(大约 2009 年)制作出以前从未见过的生产服务。龙卷风源代码非常反魔法。

  • 它快速、稳定。负载下。

我不知道它是否是现有的绝对最快的东西,但在我使用过它的项目中,它在并发用户数量和数据传输方面承担了一些非常重的负载(例如,大容量图像上传),并且它a)在稳定性方面完全坚如磐石,b)速度足够快,我不必考虑水平扩展或获得更大的硬件。

  • Python 非常灵活且适应性强。

我经常使用 Python 来使用 Tornado(以及其他东西,有时包括 Django)进行 Web 开发。不过,我也将它用于与 Web 服务本身完全无关的事情,例如系统管理/自动化任务、报告和服务。数据修改(例如,我用 Python 编写 hadoop 作业),以及其他东西,其中标准库模块(os、sys、shutil、itertools、集合等)使构建速度快得令人眼花缭乱。我可以在任何环境中使用 Python 来完成任何事情,无论输出是通过流、浏览器、胖 GUI 还是控制台。

它周围还有一个很棒的社区,里面有非常聪明的人,也非常友好。我无法将它与 Scala 社区进行比较,但与许多其他社区相比,Python 无疑是我最喜欢的,这与我如此迷恋它有很大关系。我会多种语言,但如果我有问题,我最想向 Python 社区成员提出这个问题:)

I think Python and Tornado are a great team, for the following reasons

  • Tornado is really an IOLoop that happens to come with an HTTP implementation that runs on it (and a few helpers).

This means that it comes with everything you need to do web development with it.

It also means that if you find, down the road, that you need other back end services to help scale your application, tornado is very likely of good use in that area. I've actually written more back end services than front end ones in Tornado (but a coworker has the exact opposite experience with it -- he's more front-end oriented and finds it just as nice to work with). A bit off-topic, but we've also used their template module outside of tornado with great success. The code is very modular and there's almost no interdependence, so reusing its components is a breeze.

  • You can learn it, and know it well, very, very quickly.

It would take you all of a day to figure out. It's code is clean and unbelievably well-commented, and it has decent documentation besides. I was able to produce a production service with Tornado 0.2 (ca. 2009) in about a week having never seen it before. The tornado source code is very anti-magic.

  • It's fast, and stable. Under load.

I don't know if it's the absolute most blazing fast thing in existence, but in the projects I've used it in, it's taking on some very heavy load, in terms of both number of concurrent users, and in terms of data transfer (high-volume image uploads, for example), and it's been a) completely rock solid in terms of stability, and b) fast enough that I haven't had to consider scaling it horizontally or getting bigger hardware.

  • Python is extremely flexible and adaptable.

I use Python regularly for web development using Tornado (and other things too, including Django on occasion). However, I also use it for things completely unrelated to the web services themselves, like sysadmin/automation tasks, reporting & data munging (for example, I write hadoop jobs in Python), and other things, where the standard library modules (os, sys, shutil, itertools, collections, etc) make things blindingly fast to build. I can use Python for just about anything, in just about any environment, whether the output goes over a stream, into a browser, to a fat GUI, or a console.

It also has a fantastic community around it of really smart people who are also very friendly. I can't compare it to the scala community, but in comparison with lots of other communities, Python is easily my favorite and has a lot to do with why I became so attached at the hip with it. I'm a polyglot, but if I have a question, I would most like to pose that question to a Python community member :)

缺⑴份安定 2024-12-09 03:58:31

Scala 是一种非常简洁的语言,使您能够根据自己的需要使用面向对象和函数式范例。

Python 有更多的语法糖,并且信奉“只有一种方法可以做到这一点”的哲学。

Scala 通常与 Eclipse/Idea 等 IDE 一起使用 - 尽管也存在对 vim/emacs 的支持 - 并且使用 SBT 构建。如果您不习惯这些工具,第一次设置它们可能需要一些努力。

Python 通常与更轻量级的编辑器一起使用。默认情况下,重新运行更新后的 Python 脚本会更容易。

Lift 真正针对的是 Web 应用程序,可实现类似桌面的响应能力和行为。如果您只是想创建一个主页,那么肯定还有其他框架,但这些框架并不能让您像 Lift 那样学到很多东西。

Scala is a substantially cleaner language and enables you to use object-oriented and functional paradigms as you see fit.

Python has much more syntactic sugar and embraces the "there is only one way to do it" philosophy.

Scala is usually used with IDEs like Eclipse/Idea - although support for vim/emacs also exists, too - and built with SBT. If you are not accustomed to these tools, it might take some effort to set them up the first time.

Python is often used with much more lightweight editors. Re-running an updated Python script is easier by default.

Lift is really targeted at web applications, enabling Desktop-like responsiveness and behavior. If you're just wanting to create a homepage, there are certainly other frameworks around, which don't make you learn as much as with Lift.

金兰素衣 2024-12-09 03:58:31

我建议使用 Python,原因如下:

1.调试

我发现在编写 Python 代码时特别有用的是能够轻松调试(请参阅 pdb 模块),您所需要的只是一个命令提示符和一个文本编辑器来设置断点。
使用 Scala,您可能必须依赖 IDE 来完成所有调试。

2.易于学习

至于编程语言,我不知道您对这两种语言的体验如何。如果你同时是Python和Scala初学者,我个人的观点是你会更快地学习Python。

I would suggest going with Python for these reasons:

1. Debugging

What I find especially useful when writing Python code, is the ability to easily debug ( see the pdb module ), all you need is a command prompt and a text editor to set your breakpoints.
With Scala, you will probably have to rely on a IDE to do all your debugging.

2. Easy to learn

As for programming language, I don't know what your experiences with either languages are. If you are both Python and Scala beginners, my personal opinion is that you will learn Python faster.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文