电脑技术学习

Web框架 Stripes 1.3 发布

dn001
Stripes 1.3 版本发布了.

Stripes是一个视图框架用于利用最新的Java技术来构建Web应用程序.

它具有以下特点:不需要对每一page/action进行映射配置(ActionBeans将自动被发现,它利用注释进行配置),强大的绑定引擎用于构建复杂并脱离请求参数(request parameter)的web对象,易于使用并可本地化的验证与类型转换系统.可重复使用ActionBean作为视图帮助类.支持一个form对应多个事件.透明的文件上传能力.支持持续开发(比如在构思你的ActionBean之前可以先构建与测试JSP)等

官方提到的新特性:

Expression Based Validation: Validations can now be written in the JSP Expression Language (EL). The expression is specified in an annotation along with other validations.

Flexible Validation Methods: ActionBeans can now have more than one custom validation method, and additional control can be asserted over when the validation is run (by event, by error state etc.)
Validation Filtering By Event: It is now possible to fine tune validations by specifying that a field is required only for a particular event or events, or is required for all events except specified events.

Interceptor System: Stripes now includes a generic Interceptor system. The request processing lifecycle is defined by an enumeration, and it is possible to interceptor around any/all lifecycle stages easily. An example interceptor ships with Stripes that enables before/after methods within ActionBeans.

Exception Handling System: A new ExceptionHandler interface is used to handle any unhandled exceptions raised anywhere in the application. The primary benefit of this system is to be able to execute arbitrary java code on exceptions instead of simply rendering a view.

URL Alternatives: It is now possible to specify fully qualified class names or provide Class objects almost anywhere the system expects a URL. While not everyone will like this it provides significant flexibility to change URL strategies without impacting other classes and views.

标签: