From: Anton v. S. <an...@ap...> - 2002-04-17 02:28:32
|
> First - I'm getting double responses from Anton and Gavin. FWIW... I'll be more careful - it comes from hitting "Reply All" on messages from some mailing lists (majordomo?) > Since I can't use Hibernate (SQL Server 2K support via MS driver isn't > complete yet) Not sure what the issues with MS driver are, but I've had good success with the commercial driver JTurbo (http://www.newatlanta.com/products/jturbo/index.jsp). We initially evaluated a slew of JDBC drivers for MS databases (SQL 6.5, 7.0, and 2000), and found all sort of compatibility problems. JTurbo was one of the few that didn't have any problems that we could find, and was reasonably priced. We also had pretty good success with the open source JDBC driver from the FreeTDS project (http://www.freetds.org/software.html), but there was a compatibility problem with SQL 6.5 at the time we tested. > FWIW, I wrote a DTO-generator for the project I'm working on > today. ... > It goes straight from the DB schema (tables or views) to Java DTO > code. I use Jakarta's commons-digester to read the map file and > Velocity to define the .java file template. > > My main point is just that I wrote this in a day, so it's not a Herculean > effort. Great. Perhaps the various different object architecture philosophies being discussed can be handled using a set of classes and interfaces that can be mixed and matched to generate classes according to taste. For example, whether the "master" schema info comes from the database, the Hibernate mapping file, the beans themselves, or some other custom schema/mapping file, it could all be made accessible through the same set of interfaces, so that code which processes it wouldn't have to care where it came from. Using something like Velocity, how that data is mapped to the DTOs and BOs would also be very customizable. Now all we need is an open version of all this... As I said, I'll do some of this myself if I'm not preempted, but I haven't gotten to that point yet. I'm interested to see Brad Clow's generator, too. Anton |