On Tue, May 06, 2008 at 11:37:55AM -0700, [EMAIL PROTECTED] wrote: > Why does my TurboGears/SQLObject app need an explicit connection to database > to > be exposed?
This is like asking why there are constructors in OO programming. The answer for both questions is - because you need to initialize the thing. > Isn't a goal for ORMs to hide all this database connection stuff? Yes, but remember these things: 1. The Law of Leaky Abstractions - it is very hard to completely hide the underlying level. 2. There is no way for an ORM to guess where you do want to connect to. 3. What if one would want to connect to two different databases? Should the ORM to guess both connections? How?! Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss