web applications - Which web framework should I choose? -
i java developer. want develop web site own. want choose rapid web application framework. have experience of spring mvc. wondering if should choose web framework. here list of want:
- rapid develop
- easy secure
- easy validate
- easy communicate db(mysql or nosql)
i have heard ruby,python,groovy , scala. should include these choices? how effort these take? should invest time on these or stay in java world? please kindly give me advices.
thanks lot.
if you're willing consider python (sounds are), should check out web2py.
- it's primary goals ease of use, rapid development, , security.
- more on security here , here
- if "easy validate" mean input/form validation, has great forms , validation system.
- for easy , portable database communication, has database abstraction layer works sqlite, postgresql, mysql, oracle, mssql, firebird, db2, informix, ingres, , google app engine (i.e., bigtable), partial support couchdb.
it's easy set , try out -- download, unzip, , run it. requires no installation or configuration, has no dependencies (the binary distribution includes own python interpreter), , includes ssl-enabled web server, relational database, scaffolding application, , web-based ide/administrative interface error logging , ticketing system. it's well-integrated, full-stack framework lots of features, including caching, session management, internationalization, authentication , role-based access control, web services, ajax, etc.
i'm not familiar spring mvc, think you'll find web2py less verbose. example, see this spring mvc tutorial -- below equivalent code in web2py (actually, web2py code adds field validation, js datepicker, , image upload):
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)))
Comments
Post a Comment