摘要: Play applications can be deployed virtually anywhere: inside Servlet containers, as standalone servers, in Google Application Engine, Stack, a Cloud, ... 阅读全文
posted @ 2015-04-22 11:23 下里巴人or知己 阅读(438) 评论(0) 推荐(0) 编辑
摘要: Here some simple tips to optimize your application for production.Configure your application.confFirst off, the best way to specify production mode is... 阅读全文
posted @ 2015-04-22 11:14 下里巴人or知己 阅读(400) 评论(0) 推荐(0) 编辑
摘要: When you work in a team, different developers will use different configuration keys in theirapplication.conf. For example, the log level, some databas... 阅读全文
posted @ 2015-04-22 11:13 下里巴人or知己 阅读(321) 评论(0) 推荐(0) 编辑
摘要: When you use a relational database, you need a way to track and organize your database schema evolutions. Typically there are several situation where ... 阅读全文
posted @ 2015-04-22 11:12 下里巴人or知己 阅读(255) 评论(0) 推荐(0) 编辑
摘要: The Play logger is built onLog4j. Since most Java libraries use Log4j or a wrapper able to use Log4j as a backend, you can easily configure logging th... 阅读全文
posted @ 2015-04-22 11:12 下里巴人or知己 阅读(292) 评论(0) 推荐(0) 编辑
摘要: Play’s dependency management system allows you to express your application’s external dependencies in a singledependencies.ymlfile.A Play application ... 阅读全文
posted @ 2015-04-22 11:11 下里巴人or知己 阅读(584) 评论(0) 推荐(0) 编辑
摘要: A Play application can be assembled from several application modules. This allows you to reuse application components across several applications or s... 阅读全文
posted @ 2015-04-22 11:10 下里巴人or知己 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 本章译者:@nixil虽然Play在设计之初就考虑了安全性问题,但是任何人都无法阻止程序员们自毁长城。以下的向导将会涉及web应用常见的安全性问题,以及在Play中该如何避免。Sessions你经常会需要保存一些跟用户有关的信息,比如登录状态之类的。如果没有session,用户就得在每个请求当中都携... 阅读全文
posted @ 2015-04-22 11:09 下里巴人or知己 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Creating automatic test suites for your application is a good way to make it robust. It allows you to work in a very agile way.Play tests are built us... 阅读全文
posted @ 2015-04-22 11:08 下里巴人or知己 阅读(195) 评论(0) 推荐(0) 编辑
摘要: To create high-performance systems, sometimes you need to cache data. Play has a cache library and will useMemcachedwhen used in a distributed environ... 阅读全文
posted @ 2015-04-22 11:07 下里巴人or知己 阅读(178) 评论(0) 推荐(0) 编辑
摘要: E-mail functionality uses theApache Commons Emaillibrary under the hood. You can use theplay.libs.Mailutility class to send e-mail very easily.A simpl... 阅读全文
posted @ 2015-04-22 11:07 下里巴人or知己 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 本章译者:@nixil使用国际化支持(I18N)能够使你的应用根据用户所在地区的不同选择不同的语言。下面介绍如何在引用中使用国际化。只允许使用UTF-8Play只支持UTF-8一种字符编码.这是因为多编码会导致十分诡异难以处理的问题,所以我们决定仅支持一种。UTF-8编码涵盖了所有语言的所有字符。确... 阅读全文
posted @ 2015-04-22 11:06 下里巴人or知己 阅读(1231) 评论(0) 推荐(0) 编辑
摘要: Play在内部使用了jQuery这个JavaScript库,让我们能够非常方便的进行Ajax操作。同时,为了能在JavaScript中方便地生成某个action对应的Url,Play还提供了一个jsAction标签,简化操作。配合jQuery使用jsAction标签在play的页面中,如果我们想取得... 阅读全文
posted @ 2015-04-22 11:05 下里巴人or知己 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 本章译者:@Sam Liu (译者未留下自己的主页,请Sam Liu见此文,加入群168013302联系‘大黄蜂@翻译play’)这一章主要讲解如何运用异步模式实现典型的长连接(long-polling)、流(streaming)和 推送方式(Comet-style) 的编程,以便于响应数以千万计的... 阅读全文
posted @ 2015-04-22 11:04 下里巴人or知己 阅读(343) 评论(0) 推荐(0) 编辑
摘要: Because Play is a web application framework, most of the application logic is done by controllers responding to HTTP requests.But sometimes you will n... 阅读全文
posted @ 2015-04-22 11:03 下里巴人or知己 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Theplay.libspackage contains several useful libraries that will help you to achieve common programming tasks.Most of these libraries are simple helper... 阅读全文
posted @ 2015-04-22 11:02 下里巴人or知己 阅读(371) 评论(0) 推荐(0) 编辑
摘要: Play provides a set of very useful helpers to simplify the management of your JPA entities.Notethat you can still go back to the plain JPA API wheneve... 阅读全文
posted @ 2015-04-22 11:01 下里巴人or知己 阅读(491) 评论(0) 推荐(0) 编辑
摘要: Validations ensure that the data has certain values or meets specific requirements. You can use validation to verify that your models are correct befo... 阅读全文
posted @ 2015-04-22 11:00 下里巴人or知己 阅读(274) 评论(0) 推荐(0) 编辑
摘要: Play has an efficient templating system which allows to dynamically generate HTML, XML, JSON or any text-based formatted document. The template engine... 阅读全文
posted @ 2015-04-22 10:59 下里巴人or知己 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 本章译者:@freewind业务逻辑代码通常位于模型(model)层。客户端(比如浏览器)无法直接调用其中的代码,所以模型对象提供的功能,必须作为资源以URI方式暴露给外部。客户端使用HTTP协议来操作这些资源,从而调用了内部的业务逻辑。但是,这种从资源到模型之间的映射是单向的:我们可以根据需要提供... 阅读全文
posted @ 2015-04-22 10:58 下里巴人or知己 阅读(1132) 评论(0) 推荐(0) 编辑