Jodd,一把java的瑞士军刀

http://inhu.net/jodd.html
Jodd是一个普通开源的Java包,你可以把它想象成一把小而锋利的瑞士军刀。它包含了许多便捷的功能,如:字符串处理、日期处理、类型转换、邮件发送、文件处理、数据库连接、剖析SQL查询……太多的功能就不一一列举了。不过如果用它官网的一条公式来概括的话,便是 Jodd = tools + ioc + mvc + db + aop + tx + html < 1.2m


Jodd Tools
在String的操作和处理上并不比Apache的Lang包逊色,而且有过之而无不及。在String的操作和处理上,它扩展了replace、equals、转化大小写、分割……等等功能。jodd对String上的处理当然没我文中说得简单,那么它强大在哪里呢?如一字符串:a,b,c,d 你要匹配是否存在 b 这个值,我们仅仅需要调用jodd的一个方法就可以了。

在日期的操作和格式化也是很强大的,JDateTime 这个类包含了上百个方法基本涵盖了我们日常需要对日期进行处理的所有方法,而且性能上比Java5 的 Calendar类高出40%,

在Web开发上也有很多的工具类可以使用,其中包括了Jodd tag library代替c标签,Form tag代替Struts……如果要细数估计可以出一本书了。

BeanUtil – fastest bean manipulation library around.

Cache – set of common cache implementation.

Compiler – embeded Java compiler that uses jikes or jdk.

Printf – formatted value printing, as in C.

JDateTime – elegant usage and astronomical precision in one time-manipulation class.

Email – sending and receiving emails.

Props – enhanced Properties replacement.

Type Converter – converting types.

StringUtil – more then 100 of additional String utilities.

StringTemplateParser – simple string template parser.

Finding, scanning, walking files – few easy ways.

Class finder – find classes on classpath.

Wildcard – using wildcards.

Servlets – various servlets-related tools.

Jodd tag library – new power to the JSP.

Form tag – automagically populates forms.

Reference Map and Set – reference aware map and set.

Class loading in Jodd – great ways for loading classes.

Fast buffers – really fast appendable storage.

HTTP – tiny, raw HTTP client.



Jodd Frameworks
框架更是有强大之处,框架实现了MVC、IOC、JDBC、事务……等等的一系列封装,我们完全可以利用Jodd的强大功能快速的开发出一个Web应用。

这些东西貌似并非显得它很强大,不过看完下面的介绍或许你会改观:

HtmlStapler



Jodd,一把java的瑞士军刀
看了上面的演示是不是觉得很厉害呢?这个就是HtmlStapler的功能,把多个Js、css文件合并成一个请求,不过据我不深入的了解这个功能每次请求是200的,并不会浏览器缓存起来。

Jerry

注意,别看错了是Jerry。你有想过在java中也能像jQuery那样操作Html的dom吗?如果你有这个需求的话,恭喜你。你找到一个java版的jQuery——Jerry。

Madvoc – elegant web MVC framework that uses CoC in a pragmatic way to simplify web application development.

Petite – slick and lightweight DI container that supports sufficient most of features offered by other containers.

Proxetta – the fastest proxy creator with unique approach for defying pointcuts and advices.

Db & DbOom – efficient and thin layers that significantly simplifies writing of database code.

JTX – enjoyable transaction manager.

Paramo – extracts method and constructor parameter names.

VTor – validation framework.

Lagarto – html parser.

Lagarto Parsing – how Lagarto is parsing.

HtmlStapler – transparent HTML resource bundles.

Decora – web decorator framework.

CSSelly – CSS3 selectors parser.

Jerry – jQuery in Java.

Methref – strongly-typed method name references.

SwingSpy – inspection of swing component hierarchy.



结语:看完了本文对Jodd的介绍是否有一种冲动想立马尝试一下?Jodd的功能很好很强大,而且注重性能、更注重Safe,在1.2m的体积上涵盖了这么齐全的功能,我相信以后Java的开发销量会更加高而且最重要的是,可以使我们程序猿更加快、更加好的完成工作,多抽点时间陪陪家人。

在此Inhu给大家先拜个早年,祝愿广大程序猿蛇年更少bug、需求不再改,技术大大提升,跻身CTO行列!

猜你喜欢

转载自panyongzheng.iteye.com/blog/2087202