摘要:
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知己
阅读(453)
评论(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知己
阅读(411)
评论(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知己
阅读(333)
评论(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知己
阅读(276)
评论(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知己
阅读(302)
评论(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知己
阅读(602)
评论(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知己
阅读(294)
评论(0)
推荐(0)
摘要:
本章译者:@nixil虽然Play在设计之初就考虑了安全性问题,但是任何人都无法阻止程序员们自毁长城。以下的向导将会涉及web应用常见的安全性问题,以及在Play中该如何避免。Sessions你经常会需要保存一些跟用户有关的信息,比如登录状态之类的。如果没有session,用户就得在每个请求当中都携... 阅读全文
posted @ 2015-04-22 11:09
下里巴人or知己
阅读(201)
评论(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知己
阅读(207)
评论(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知己
阅读(186)
评论(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知己
阅读(279)
评论(0)
推荐(0)
摘要:
本章译者:@nixil使用国际化支持(I18N)能够使你的应用根据用户所在地区的不同选择不同的语言。下面介绍如何在引用中使用国际化。只允许使用UTF-8Play只支持UTF-8一种字符编码.这是因为多编码会导致十分诡异难以处理的问题,所以我们决定仅支持一种。UTF-8编码涵盖了所有语言的所有字符。确... 阅读全文
posted @ 2015-04-22 11:06
下里巴人or知己
阅读(1278)
评论(0)
推荐(0)
摘要:
Play在内部使用了jQuery这个JavaScript库,让我们能够非常方便的进行Ajax操作。同时,为了能在JavaScript中方便地生成某个action对应的Url,Play还提供了一个jsAction标签,简化操作。配合jQuery使用jsAction标签在play的页面中,如果我们想取得... 阅读全文
posted @ 2015-04-22 11:05
下里巴人or知己
阅读(220)
评论(0)
推荐(0)
摘要:
本章译者:@Sam Liu (译者未留下自己的主页,请Sam Liu见此文,加入群168013302联系‘大黄蜂@翻译play’)这一章主要讲解如何运用异步模式实现典型的长连接(long-polling)、流(streaming)和 推送方式(Comet-style) 的编程,以便于响应数以千万计的... 阅读全文
posted @ 2015-04-22 11:04
下里巴人or知己
阅读(355)
评论(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知己
阅读(202)
评论(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知己
阅读(391)
评论(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知己
阅读(508)
评论(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知己
阅读(286)
评论(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知己
阅读(380)
评论(0)
推荐(0)
摘要:
本章译者:@freewind业务逻辑代码通常位于模型(model)层。客户端(比如浏览器)无法直接调用其中的代码,所以模型对象提供的功能,必须作为资源以URI方式暴露给外部。客户端使用HTTP协议来操作这些资源,从而调用了内部的业务逻辑。但是,这种从资源到模型之间的映射是单向的:我们可以根据需要提供... 阅读全文
posted @ 2015-04-22 10:58
下里巴人or知己
阅读(1207)
评论(0)
推荐(0)
摘要:
在Play程序中,模型(model)占据了核心地位。它是程序操作的信息的特定领域的表现方式。Martin Fowler这样定义模型:负责表达业务概念,业务状态信息以及业务规则。尽管保存业务状态的技术细节是有基础设施层实现的,但是反应业务情况的状态是有本层控制并且使用的。领域层是业务软件的核心。Jav... 阅读全文
posted @ 2015-04-22 10:57
下里巴人or知己
阅读(2998)
评论(0)
推荐(0)
摘要:
HTTP路由HTTP路由(译者注:Play的路径映射机制)组件负责将HTTP请求交给对应的action(一个控制器Controller的公共静态方法)处理。对于MVC框架来说,一个HTTP请求可以看成一个事件。这个事件包含2方面的信息:请求的路径(例如 /clients/1542, /photos/... 阅读全文
posted @ 2015-04-22 10:56
下里巴人or知己
阅读(1373)
评论(0)
推荐(0)
摘要:
The MVC application modelA Play application follows the MVC architectural pattern applied to the web architecture.This pattern splits the application ... 阅读全文
posted @ 2015-04-22 10:55
下里巴人or知己
阅读(212)
评论(0)
推荐(0)

浙公网安备 33010602011771号