Click here to Skip to main content
15,897,371 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Help on Design for Cross-Platform Application Pin
brdavid4-Sep-07 11:28
brdavid4-Sep-07 11:28 
AnswerRe: Help on Design for Cross-Platform Application Pin
Ed.Poore10-Sep-07 0:57
Ed.Poore10-Sep-07 0:57 
Questionsingleton pattern example Pin
Vinay Dornala3-Sep-07 19:29
Vinay Dornala3-Sep-07 19:29 
AnswerRe: singleton pattern example Pin
satyaki mishra4-Sep-07 1:31
satyaki mishra4-Sep-07 1:31 
GeneralRe: singleton pattern example Pin
led mike4-Sep-07 5:06
led mike4-Sep-07 5:06 
GeneralRe: singleton pattern example Pin
DavidNohejl4-Sep-07 6:12
DavidNohejl4-Sep-07 6:12 
GeneralRe: singleton pattern example Pin
led mike4-Sep-07 6:45
led mike4-Sep-07 6:45 
GeneralRe: singleton pattern example Pin
DavidNohejl4-Sep-07 7:28
DavidNohejl4-Sep-07 7:28 
"one of the case you can use singleton pattern is to create a connection for your data base application."

Ok, if I was asking about singletons this wouldn't help me. In that I agree with you. But I believe that he is talking about scenario when you have class that manages connection to db, and creates connection in constructor. If that class is singleton, only one instance is created, so only one connection is created (which is usually very expensive operation). But then there's a pooling and you will have connection opened for whole lifetime of the singleton object, sometime you'll connect to db even when you don't need to etc. Which is why I say this is not the supercleanest use of singleton pattern.



[My Blog]
"Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

GeneralRe: singleton pattern example Pin
led mike4-Sep-07 7:35
led mike4-Sep-07 7:35 
GeneralRe: singleton pattern example Pin
DavidNohejl4-Sep-07 7:49
DavidNohejl4-Sep-07 7:49 
AnswerRe: singleton pattern example Pin
led mike4-Sep-07 5:03
led mike4-Sep-07 5:03 
JokeRe: singleton pattern example Pin
Colin Angus Mackay4-Sep-07 9:13
Colin Angus Mackay4-Sep-07 9:13 
AnswerRe: singleton pattern example Pin
Colin Angus Mackay4-Sep-07 13:08
Colin Angus Mackay4-Sep-07 13:08 
AnswerRe: singleton pattern example Pin
Urs Enzler4-Sep-07 21:37
Urs Enzler4-Sep-07 21:37 
GeneralRe: singleton pattern example Pin
Colin Angus Mackay5-Sep-07 4:35
Colin Angus Mackay5-Sep-07 4:35 
GeneralRe: singleton pattern example Pin
Urs Enzler5-Sep-07 4:40
Urs Enzler5-Sep-07 4:40 
GeneralRe: singleton pattern example Pin
led mike5-Sep-07 6:24
led mike5-Sep-07 6:24 
GeneralRe: singleton pattern example Pin
Urs Enzler5-Sep-07 7:04
Urs Enzler5-Sep-07 7:04 
GeneralRe: singleton pattern example Pin
led mike5-Sep-07 7:27
led mike5-Sep-07 7:27 
GeneralRe: singleton pattern example Pin
Urs Enzler5-Sep-07 7:51
Urs Enzler5-Sep-07 7:51 
GeneralRe: singleton pattern example Pin
led mike5-Sep-07 8:07
led mike5-Sep-07 8:07 
GeneralRe: singleton pattern example Pin
Urs Enzler5-Sep-07 20:19
Urs Enzler5-Sep-07 20:19 
AnswerRe: singleton pattern example Pin
hotcodeking5-Sep-07 1:58
hotcodeking5-Sep-07 1:58 
AnswerRe: singleton pattern example [modified] Pin
ElSpinos13-Sep-07 23:00
ElSpinos13-Sep-07 23:00 
AnswerRe: singleton pattern example Pin
etkid8421-Sep-07 3:02
etkid8421-Sep-07 3:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.