PC Review


Reply
Thread Tools Rate Thread

Using Application Settings in N-tier architecture

 
 
schoenfeld.one@gmail.com
Guest
Posts: n/a
 
      23rd Jan 2007
How are Application Settings supposed to be used in multi-tiered
applications?


If I have a winforms application consising of 2 projects

1. UI PROJECT: has the settings

2. DATABASE PROJECT: needs the settings

It seems 2 must reference 1, but that would create a cyclic reference
as 1 needs 2 as well.

 
Reply With Quote
 
 
 
 
RobinS
Guest
Posts: n/a
 
      23rd Jan 2007
Actually, you should have 3 layers.

1) UI
2) Business layer
3) Data layer

The UI talks to the business layer, passing in what it needs and
using its classes and the methods and properties thereof.

The business layer calls the data layer to access and update the
data.

Specifically what kind of application settings are you talking about?

Robin S.
----------------------------------
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How are Application Settings supposed to be used in multi-tiered
> applications?
>
>
> If I have a winforms application consising of 2 projects
>
> 1. UI PROJECT: has the settings
>
> 2. DATABASE PROJECT: needs the settings
>
> It seems 2 must reference 1, but that would create a cyclic reference
> as 1 needs 2 as well.
>



 
Reply With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      23rd Jan 2007
Hello (E-Mail Removed),

Use the setting specific to the domain next to your domain app, so all ui
settins are next to ui project and db settins are next to db project
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

> How are Application Settings supposed to be used in multi-tiered
> applications?
>
> If I have a winforms application consising of 2 projects
>
> 1. UI PROJECT: has the settings
>
> 2. DATABASE PROJECT: needs the settings
>
> It seems 2 must reference 1, but that would create a cyclic reference
> as 1 needs 2 as well.
>



 
Reply With Quote
 
schoenfeld.one@gmail.com
Guest
Posts: n/a
 
      23rd Jan 2007


On Jan 23, 7:46 pm, Michael Nemtsev <nemt...@msn.com> wrote:
> Hello schoenfeld....@gmail.com,
>
> Use the setting specific to the domain next to your domain app, so all ui
> settins are next to ui project and db settins are next to db project


I couldn't get Settings files to work in my Class Library project. Any
ideas?

> ---
> WBR,
> Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
>
> "The greatest danger for most of us is not that our aim is too high and we
> miss it, but that it is too low and we reach it" (c) Michelangelo
>
> > How are Application Settings supposed to be used in multi-tiered
> > applications?

>
> > If I have a winforms application consising of 2 projects

>
> > 1. UI PROJECT: has the settings

>
> > 2. DATABASE PROJECT: needs the settings

>
> > It seems 2 must reference 1, but that would create a cyclic reference
> > as 1 needs 2 as well.


 
Reply With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      24th Jan 2007
Hello (E-Mail Removed),

> On Jan 23, 7:46 pm, Michael Nemtsev <nemt...@msn.com> wrote:
>
>> Hello schoenfeld....@gmail.com,
>>
>> Use the setting specific to the domain next to your domain app, so
>> all ui settins are next to ui project and db settins are next to db
>> project
>>

> I couldn't get Settings files to work in my Class Library project. Any
> ideas?


What the settings are - just XML!
Use System.Xml namespace to work with them. For example i prefer to to use
XPath to get values from config's libs

---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangel


 
Reply With Quote
 
schoenfeld.one@gmail.com
Guest
Posts: n/a
 
      28th Jan 2007


On Jan 24, 6:15 pm, Michael Nemtsev <nemt...@msn.com> wrote:
> Hello schoenfeld....@gmail.com,
>
> > On Jan 23, 7:46 pm, Michael Nemtsev <nemt...@msn.com> wrote:

>
> >> Hello schoenfeld....@gmail.com,

>
> >> Use the setting specific to the domain next to your domain app, so
> >> all ui settins are next to ui project and db settins are next to db
> >> project

>
> > I couldn't get Settings files to work in my Class Library project. Any
> > ideas?What the settings are - just XML!

> Use System.Xml namespace to work with them. For example i prefer to to use
> XPath to get values from config's libs


I was kind of hoping to reap the benefits of the Visual Studio
Application Settings Editor.

It seems it only works on top-level projects.

> ---
> WBR,
> Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
>
> "The greatest danger for most of us is not that our aim is too high and we
> miss it, but that it is too low and we reach it" (c) Michelangelo


 
Reply With Quote
 
schoenfeld.one@gmail.com
Guest
Posts: n/a
 
      28th Jan 2007


On Jan 23, 6:10 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote:
> Actually, you should have 3 layers.
>
> 1) UI
> 2) Business layer
> 3) Data layer
>
> The UI talks to the business layer, passing in what it needs and
> using its classes and the methods and properties thereof.
>
> The business layer calls the data layer to access and update the
> data.


Actually, I have many more tiers (emissary. I was giving a simple
example of what I need.



> Specifically what kind of application settings are you talking about?


In VS.NET 2005 you can create/edit/remove settings in an editor. The
editor creates the XML file and also updates a statically typed
settings class which references that XML file.

I want to use those features but in all my tiers, not just the top-
level tier.

Can I do that?


 
Reply With Quote
 
RobinS
Guest
Posts: n/a
 
      29th Jan 2007

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> On Jan 23, 6:10 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote:
>> Actually, you should have 3 layers.
>>
>> 1) UI
>> 2) Business layer
>> 3) Data layer
>>
>> The UI talks to the business layer, passing in what it needs and
>> using its classes and the methods and properties thereof.
>>
>> The business layer calls the data layer to access and update the
>> data.

>
> Actually, I have many more tiers (emissary. I was giving a simple
> example of what I need.
>
>
>
>> Specifically what kind of application settings are you talking about?

>
> In VS.NET 2005 you can create/edit/remove settings in an editor. The
> editor creates the XML file and also updates a statically typed
> settings class which references that XML file.
>
> I want to use those features but in all my tiers, not just the top-
> level tier.
>
> Can I do that?
>


I know how to do it in VB. Do you want me to post it, and you can
figure out how to do it in C#?

Robin S.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 Tier architecture Dan, Vascas Microsoft Dot NET Framework Forms 2 31st Mar 2006 08:46 PM
N Tier Architecture ? Silent Ocean Microsoft ADO .NET 2 11th Aug 2005 04:48 PM
n-tier Architecture and IIS Curt Microsoft Dot NET Framework 8 31st Aug 2004 09:42 PM
Message board layered architecture 2-tier or 3-tier? Vin Microsoft Dot NET 0 22nd Jul 2004 08:46 AM
n-Tier Application Architecture question Will Microsoft C# .NET 2 4th Nov 2003 04:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:57 PM.