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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Play, Scala, and Iteratees vs. Node.js, JavaScript, and Socket.io

16 点作者 brikis98超过 11 年前

1 comment

ollysb超过 11 年前
The play API is far less clear and doesn't seem to add any value. It's like they've created a bunch of special classes to do things that could have just been written in scala. Formatting the message is a good example, with socket.io it's just a plain old function call. With play you have to create an "adaptor", which appears to be a function but is wrapped in some special case wrapper called an Enumeratee. As for the names, if you have to explain what every class is actually for you've done a pretty poor job in choosing the names. The socket.io API seems vastly superior, it allows you to do exactly the same thing is smaller and clearer whilst having all the power and perhaps, less restrictions. Sorry for the rant but with so many good examples of APIs (particularly for web interactions) the play API really should be better.
评论 #6793517 未加载