![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Think outside the box! ************************************************* |
|
Hello, I am working on a 3teired project, data,bizlogic, userinterface...I have a global class that at current is being passed around as parameters, this is, to say the least messy... I am reading up about singletons, but I wonder where to place it? Should I stick it in with the userinterface....how do I make it globally accessable if its in a different layer/project... Sorry if I sound like a noob, I am noob... Thank you John |
#3
| |||
| |||
|
|
Hello, I am working on a 3teired project, data,bizlogic, userinterface...I have a global class that at current is being passed around as parameters, this is, to say the least messy... I am reading up about singletons, but I wonder where to place it? Should I stick it in with the userinterface....how do I make it globally accessable if its in a different layer/project... Sorry if I sound like a noob, I am noob... Thank you John |
#4
| |||
| |||
|
|
If the singleton is used for UI bits, then the UI project (web project, winforms project) is the correct place. The example here would be application settings for the UI. If not, then it does not belong there. It belongs in the layer where it is used. If it is database settings, you can guess where it goes. If neither DB nor UI, it is probably a business object. I say probably, as you may be using a facade pattern and have it there (not as likely). Short answer: Need to know more about what you are placing in the singleton to answer more concretely. -- Gregory A. Beamer MVP, MCP: +I, SE, SD, DBA ************************************************* | Think outside the box! | ************************************************* "John Sheppard" <spam (AT) nospam (DOT) com> wrote in message news:fhtvkp0r2m (AT) news2 (DOT) newsguy.com... Hello, I am working on a 3teired project, data,bizlogic, userinterface...I have a global class that at current is being passed around as parameters, this is, to say the least messy... I am reading up about singletons, but I wonder where to place it? Should I stick it in with the userinterface....how do I make it globally accessable if its in a different layer/project... Sorry if I sound like a noob, I am noob... Thank you John |
#5
| |||
| |||
|
|
Think outside the box! ************************************************* |
|
Thanks Cowboy... Sorry my server was lagging at work and didnt see your response... Im still learning about patterns, at current the singleton is the first pattern im implementing... At current it is a Business object so its going there...I know we have some bad architecture issues which im working through, so its kinda half UI half BO...but it will in the end be a BO layer... Thanks once again, good answer, I very much appreciate it John "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld (AT) comcast (DOT) netNoSpamM> wrote in message news:%231S3dV$KIHA.4272 (AT) TK2MSFTNGP06 (DOT) phx.gbl... If the singleton is used for UI bits, then the UI project (web project, winforms project) is the correct place. The example here would be application settings for the UI. If not, then it does not belong there. It belongs in the layer where it is used. If it is database settings, you can guess where it goes. If neither DB nor UI, it is probably a business object. I say probably, as you may be using a facade pattern and have it there (not as likely). Short answer: Need to know more about what you are placing in the singleton to answer more concretely. -- Gregory A. Beamer MVP, MCP: +I, SE, SD, DBA ************************************************* | Think outside the box! | ************************************************* "John Sheppard" <spam (AT) nospam (DOT) com> wrote in message news:fhtvkp0r2m (AT) news2 (DOT) newsguy.com... Hello, I am working on a 3teired project, data,bizlogic, userinterface...I have a global class that at current is being passed around as parameters, this is, to say the least messy... I am reading up about singletons, but I wonder where to place it? Should I stick it in with the userinterface....how do I make it globally accessable if its in a different layer/project... Sorry if I sound like a noob, I am noob... Thank you John |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |