473,378 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Using Application Settings in N-tier architecture

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.

Jan 23 '07 #1
7 2042
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.
----------------------------------
<sc************@gmail.comwrote in message
news:11**********************@m58g2000cwm.googlegr oups.com...
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.

Jan 23 '07 #2
Hello sc************@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
---
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.

Jan 23 '07 #3


On Jan 23, 7:46 pm, Michael Nemtsev <nemt...@msn.comwrote:
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.
Jan 23 '07 #4
Hello sc************@gmail.com,
On Jan 23, 7:46 pm, Michael Nemtsev <nemt...@msn.comwrote:
>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) Michelangelo
Jan 24 '07 #5


On Jan 24, 6:15 pm, Michael Nemtsev <nemt...@msn.comwrote:
Hello schoenfeld....@gmail.com,
On Jan 23, 7:46 pm, Michael Nemtsev <nemt...@msn.comwrote:
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
Jan 28 '07 #6


On Jan 23, 6:10 pm, "RobinS" <Rob...@NoSpam.yah.nonewrote:
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?
Jan 28 '07 #7

<sc************@gmail.comwrote in message
news:11**********************@j27g2000cwj.googlegr oups.com...
>

On Jan 23, 6:10 pm, "RobinS" <Rob...@NoSpam.yah.nonewrote:
>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.
Jan 29 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Veeneman | last post by:
How do I persist properties bound to application settings in the VS 2005 Designer? I am binding form and control properties to application settings using VS 2005, as explained in MSDN: ...
0
by: Luther Hert | last post by:
I solved my problem, but I am not sure whether or not I understand how I arrived at the solution. I leraned about and checked: IIS> creating virtual directories> configuring web extensions >...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
16
by: Timm | last post by:
I'm trying to use ASP objects (basically formed and populated based on Web.Config settings) and I want to use them in a different non-asp program with minimal reprogramming. So, my question is how...
3
by: Testguy | last post by:
Hi, I have been reading various messages in this group, and could not find an answer regarding what I am trying to do. At least, I could not find an easy answer. I am trying to figure out how...
4
by: Sai | last post by:
Hi, I am using VSTO 2005 Beta for building an excel application. I added application configuration file to the project (app.config) and it has the following section in it. <configuration>...
13
by: Eric Renken | last post by:
I currently use statements like this in my 1.1 code. System.Configuration.ConfigurationSettings.AppSettings I use this in DLLs that are referenced by the application. The application has this...
3
by: xycos | last post by:
Hello. I apologize for asking this question as the information I need is availible via the MSDN library, however I cannot seemt o understand what I need to do, so I'm asking here. I have created...
6
by: TS | last post by:
I cannot get this to work. I added an app.config to a project i reference from my web application project (vs 05) but can see no way to access the settings within it. the other thing is that I...
1
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I've done this type of thing many times before so I know it works, but for some reason it's not working in this particular application. In an event handler I save some values into the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.