如果您愿意考虑使用 Python(听起来像),您应该查看web2py。
- 它的主要目标是ease of use, rapid development, and security。
- 更多关于安全的信息here 和here
- 如果您所说的“易于验证”是指输入/表单验证,它有一个很棒的forms and validation system。
- 为了方便和可移植的数据库通信,它有一个database abstraction layer,可与 SQLite、PostgreSQL、MySQL、Oracle、MSSQL、FireBird、DB2、Informix、Ingres 和 Google App Engine(即 BigTable)以及部分支持 CouchDB。
设置和试用非常容易——只需download,解压缩并运行它。它不需要安装或配置,没有依赖项(二进制发行版甚至包括它自己的 Python 解释器),并且包括一个支持 SSL 的 Web 服务器、一个关系数据库、一个脚手架应用程序和一个基于 Web 的 IDE/管理界面错误记录和票务系统。它是一个集成良好的全栈框架,具有许多功能,包括缓存、会话管理、国际化、身份验证和基于角色的访问控制、Web 服务、Ajax 等。
我对 Spring MVC 不太熟悉,但我认为您会发现 web2py 不那么冗长。比如看this Spring MVC tutorial——下面是web2py中的等价代码(其实就是web2py代码增加了字段验证,一个JS datepicker,一个图片上传):
from gluon.tools import Crud
db=DAL('sqlite://storage.sqlite')
crud=Crud(globals(), db)
db.define_table('person',
Field('name', required=true'),
Field('birthdate', 'datetime'),
Field('address', 'text'),
Field('image', 'upload'))
def index():
db.person.id.represent=lambda id: A('view', _href=URL('show', args=id))
return dict(people=db(db.person).select(),
new=A('new contact', _href=URL('edit')))
def edit():
row=db.person(request.args(0))
return dict(form=crud.update(db.person, row, next='show/[id]')
def show():
row=db.person(request.args(0)) or redirect(URL('index'))
return dict(form=crud.read(db.person, row),
link=A('edit', _href=URL('edit', args=row.id)))