• Post Reply Bookmark Topic Watch Topic
  • New Topic

Looking for best choice for database connectivity from a web application  RSS feed

 
Michael Rosenthal
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
I have been tasked with helping a client of ours determine what is the best way for their proposed new website to communicate with their database. They are considering JDBC, EJB, web services and would be open to other suggestions. From my experience straight JDBC coding seems to be the best solution 90% of the time. When the client is looking for a framework that many applications can build upon then I would recommend to them EJB's, but only then as I believe EJB's have too much overhead for smaller engagements. I do not know enough about web services or other options such as JDO/Hibernate to consider them at this point. Any insight or links to pages where this is discussed would be appreciated.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I lean towards Java and SQL and dig in and do it. I've worked with two vendor-provided meta-data object-relational mapping solutions. One used meta-data and reflection to move fields in and out of result sets and such, and the other used UML models done in Rose to generate Java code. I'm not sure either was any improvement over writing "SELECT * FROM TABLE" in long term productivity or performance. They tended to make 80% of the work a bit easier, and the other 20% a lot harder.
That said, plenty of folks swear by Object Relational tools, and will surely chime in with their favorites. I would not expect J2EE Entity Beans with Container Managed Persistence to be anybody's favorite, but ya never know.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm leaning towards JDO or some other OR mapping solution if you want it generic.
EJB is a behemoth that's overkill most of the time and even where not requires some other technology to do the database operations for it (CMP entitybeans should never have been invented).
I've once written my own mini-framework for database access (which was not completed but did the job). That's another option if available tools seem unsuited to your problem domain, roll your own (which might land you another contract to actually do just that ).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!