New topic: Best place to instantiate a DB object - for Multi user
<http://forums.realsoftware.com/viewtopic.php?t=39821> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message tseyfarth Post subject: Best place to instantiate a DB object - for Multi userPosted: Wed Jul 13, 2011 1:17 am Joined: Sat Dec 04, 2010 9:14 pm Posts: 302 Hello all, I was just going through all of my DB class objects to update them to use Session.db rather then db as was originally defined in a Global Module Property. Code:db As PostgreSQLDatabase This var was used throughout all classes, so when the module was removed, and the Property replaced inside of Session, that code had to be added. About 1/2 way through (there was ALOT of these), I got to thinking that I wonder if this is really the best approach since it really is not encapsulated anymore. I thought all along this was a good thing, since it allowed for one stop opening and closing of the db, but now not sure. What do you guys think? Should this declaration really be made inside of the class object or globally as it is now. Tim Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
