java - Hard Coded SQL statements VS. Web Service to execute the queries -
i'm developing java application communicates mysql database in server. app should able read info xml file , insert
info read database
.
i used write sql statements
straight java code, friend advised me create web service sql
stuff tool, , allow tool's job read xml , send info web service.
my question is, deserve effort? why or why not?
sql in code not recommended becomes hard maintain. application tightly coupled database structure. every time database alter (or moving new database) need create changes code , release again.
i don't think web service right reply here. recommend seek 1 of following:
if application uses lot of tables , high throughput not critical, utilize hibernate orm tool. has many features , can cut down time spent on info access.
if not have many tables , don't have time larn hibernate, utilize ibatis. take 30 minutes grasp. allows set sql in separate xml file, read you. smaller applications useful , faster hibernate.
as lastly resort, rather set sql in text file(s) open , execute.
java sql database web-services
No comments:
Post a Comment