database - Complex data-driven web application in Java - Decision on technologies -
dear stack overflow community,
i java programmer in front of task of building complex, data-driven, web application (saas) , i'm searching technologies use. have made decisions , believe i'm proficient enough build appliaction using technologies have decided (i'm not saying perfect, working). however, i'd make task easier , that's why need help.
brief description of project
back-end
the application heavily data-driven, meaning stored in self-descripting database. means database entirely described metadata , application not know data reads , writes. there won't regular entities (in terms of jpa @entity) because application won't know structure of data; obtain metadata. metadata have pre-determined structure. put simply, metadata alpha-omega of application because tell application when , display , how display it.
the application utilize stored procedures perform low-level tasks on data, such automatical auditing, logging , translating user's language, eliminating possibility use orm frameworks because there won't simple crud operations. therefore, jdbc seems option (doesn't it?).
front-end
the ui "dumb" in terms not know data displaying (to extent, of course). know how display based on metadata obtain database. ui controls (like menu items, buttons, etc) created based on current application's state , ui not know controls do. means clicking menu item or button send identifier of associated action back-end , server decide do.
my goals
my main goal have application lightweight possible least dependencies possible. because application complex, i'd avoid heavy framework(s) because there high probability i'd need customize lot of functionality.
what have decided for
please object following decisions if think they're absolutely non-viable application, have implemented core functionality using these technologies:
servlets on tomcat, guice di, aop (aspectj)
i believe of these technologies lightweight enough , don't need learn j2ee.gwt gin-jection on front-end
seems best option me because i'm familiar java , swing , don't want write javascript, php or learn new language. gin little brother of guice , using same syntax , principles on both client , server.mssql rdbms
this requirement company management i'd rather go open-source solution. bad me..maven 2
i think no-one can object :)
what need with
db communication
i think orm ruled out (is it?) need use jdbc. think spring jdbc lightweight , flexible enough use? need "blindly" read data database, mapping generic entity (because won't assume pre-determined structure), , send data using generic dto client along metadata telling data , how display it. or know alternatives? or should myself?client/server communication
gwt , gwt-rpc mechanism seems not suited sending generic data need. although i'm convinced it's doable using gwt-rpc, there alternatives? want use gwt.security
do know security libraries / frameworks me? i'm aware of existence of spring-security; think it's flexible enough use or i'd better off implementing myself? also, spring's ioc integral part of spring framework, or able continue use guice?anything else think might useful?
i appreciate advice , suggestions because wouldn't dare try make such decisions myself. please ask me if need more information.
thank in advance! equi
ui framework , implications client/server communication
you ui action triger backend (and potentially db). mean ui interraction slow anyway, , more require round trip server.
gwt suited avoid as possible round trips server , ui work on client side. in model, information transit client server real data, , not ui metadata. gwt job, you'll using low level tool, needed advenced optimisation you'll unable perform anyway...
framework zk or vaadin seems more suited want do. client side has nice widgets rich ui, manipulate ui server side. framework manage client/server communication (no need of rest, rpc or javascript). main limitation of theses framework scalability, theses chatty round trip. because requirement impose chatty behaviour anyway, benefit abstraction provide, @ not cost in case.
i have tried both gwt , zk proof of concept company. ended choosing gwt, because of it's hability embedded nicelly existing ui , fine tune do... in particular avoid as possible rountrip server. zk easier , faster in term of developmeent hours.
the side effect totally solve client/server communication concern, leting framework performing in optimized way (zk able intelligently regroup several ui event before sending them server).
db , orm
for db design, tend think using fine granularity things in db make very slow. if each widget 1 or several rows in database you'll have perform many lookup perform simpliest thing.
problem if ui little complex few dozen of elements (a few button, checkboxes, labels , widgets), compositing screen require lot of requests db. rendering 1 page might slow , scalability very bad.
i know because worked on generic bug tracking system similar (but simpler) requirements yours , had problem.
so try describe ui in templating or xml format. maybe you'll not show data user, providing nice abstraction, instead of performning many queries 1 screen, you'll save whole screen 1 blob.
a dumb , basic implementation of store html/css/png file in db , load needed, user being responsible making theses html file hand. of course terrible user. that's why need nice , fancy editor ui editor work on intermediary format of own. dumb implementation sort of wiki templating. not need, need more. have idea, seek in direction...
for maintenance , debugging too, far easier whole ui description few file, understand implemented read lot of tabuled data in prefered sql editor. users have export/import format version, backup or experiment.
security
i hand... because have generic ui generated user seem security generic , dependant of database content.
hope help...
Comments
Post a Comment