问题描述
play2中有一个程序包play.api.libs.iteratee
,其中有一个大对象Iteratee
,该行有1000多行.
There's a package play.api.libs.iteratee
in play2, which has a big object Iteratee
which has more than 1000 lines.
为什么play2需要这么大的物体以及如何理解它?
Why play2 need such a big object and how to understand it?
推荐答案
我刚刚写了一篇文章,试图为那些试图发现Play2的人解释Play2提供的Iteratees的概念.
I just wrote an article trying to explain the concepts of Iteratees provided by Play2 for those who try to discover them.
http://mandubian.com/2012/08/27/对正常人的理解-播放2-迭代//
这是文章的结论,因为看来我必须把它放在必不可少的位置部分来回答您的问题.但是我的文章是整篇文章,您的问题也很大...
Here is the conclusion of the article because it appears I must put essentialparts to answer your question. But my article is a whole and your question is also quite large...
我想告诉你Iteratee/Enumerator/Enumeratee不是 人们发现功能结构的有趣工具.他们是 在许多领域都非常有用,一旦您了解了它们的工作原理, 可以向您保证,您将开始越来越多地使用它.
I want to tell you that Iteratee / Enumerator / Enumeratee is not a funny tool for people found of functional constructions. They are useful in many domains and once you will understand how they work, I can promise you that you will begin to use it more and more.
现代Web应用程序不仅是动态生成的页面 不再.现在,您可以操纵来自不同位置的数据流 来源,格式不同,可用性时间也不同.你 可能必须为海量的客户和大量的用户提供大量的数据 在分布式环境中工作.
Modern web applications are not only dynamically generated pages anymore. Now you manipulate flows of data coming from different sources, in different formats, with different availability timing. You may have to serve huge amount of data to huge number of clients and to work in distributed environments.
Iteratee适用于这些情况,因为它们安全,不变 并且非常适合实时处理数据流.让我们来告诉 您可以看到更多流行词&更多的实时Web应用程序"和Iteratee是 与此相关;)
Iteratee are made for those cases because there are safe, immutable and very good to deal with data flows in realtime. Let’s tell the buzzword you can see more & more "Realtime WebApp" and Iteratee is associated to that ;)
这篇关于如何理解play2中的`Iteratee`?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!