473,398 Members | 2,343 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,398 software developers and data experts.

Where to stor config file?

Dear all,

I am building a set of libraries working in a n tiers architecture
Some of those libraries use common configuration settings like the database
connection string and some others.

I can imgaine that I can get one config file per buisness library.
What is teh best way and where to store configuration files ?

Should I get only one with everything in and located in a particular common
folder ?
Should I get many and all store in a kind of config folder ?

I do not want to configure for instance data access layer from the client
application app config file for security reason somehow.

Thanks for your comments and help
regards
serge
May 31 '07 #1
8 1626
>
Should I get only one with everything in and located in a particular
common
folder ?
One XML Config file for each N-Tier layer that is needed with the file
physically being at each N-Tier level with the library or executable.

That's why a config file is an XML type file with tags/elements so that you
can locate a particular tag/element within the XML config file and read the
data belonging to the tag/element.

Jun 1 '07 #2
So if I have properly understood, I need to merge all my library settings in
a single XML config file using section group that each library will refer to
get it own settings.
Then I copy this single config file at every place I need it .

IS that correct ?

regards
serge

"Mr. Arnold" wrote:
>

Should I get only one with everything in and located in a particular
common
folder ?

One XML Config file for each N-Tier layer that is needed with the file
physically being at each N-Tier level with the library or executable.

That's why a config file is an XML type file with tags/elements so that you
can locate a particular tag/element within the XML config file and read the
data belonging to the tag/element.

Jun 1 '07 #3
On 31 May, 15:38, calderara <calder...@discussions.microsoft.com>
wrote:
Dear all,

I am building a set of libraries working in a n tiers architecture
Some of those libraries use common configuration settings like the database
connection string and some others.

I can imgaine that I can get one config file per buisness library.
What is teh best way and where to store configuration files ?

Should I get only one with everything in and located in a particular common
folder ?
Should I get many and all store in a kind of config folder ?

I do not want to configure for instance data access layer from the client
application app config file for security reason somehow.

Thanks for your comments and help
regards
serge
Well, I belive .net doesn't sets any standard on how to configure your
data.

In my opnion if you got any data which are application specific then
put in app.config file of the client. By doing this you can access the
configuration setting from within any classes in the project.

Now regarding the database connection type of setting create the xml
file within the class project and then mark that file as "Copy to
Output Direcotry" . But in this case your data access class need to
read this file seperatly.

I hope this helps

Jun 1 '07 #4

"calderara" <ca*******@discussions.microsoft.comwrote in message
news:2A**********************************@microsof t.com...
So if I have properly understood, I need to merge all my library settings
in
a single XML config file using section group that each library will refer
to
get it own settings.
Then I copy this single config file at every place I need it .

IS that correct ?
No, that is not what I am saying.

In the N-tier solution I have seen, there was a dedicated config file for
each tier.

One for the UI that at best had configurations that pointed to the business
tier.

The business tier had configurations pointing to the UI and Data Access
Layer tiers.

The DALC or Data Access Layer Component tier had a config with
configurations pointing to the Business tier with multiple connection
strings for SQL Server, based on which application needed the connection to
SQL Server.

This was one giant N-tier solution that many applications were using the
same config files at the tiers, with *section groups* for each application.

I can't say that's the only way it should be done, but that is what I have
seen implemented.
Jun 1 '07 #5
Hoo ok sounds more logic then.
It is effectively logic and better organise to get a config file for each
tiers.

Now based on those tiers that you have seen, how there were organised
physically ?

I mean, if we talk about the buisness tiers which propose different
services, how those different services are split ? are they all in a same
assembly named Buisness with different class per service, or were they one
assembly per buisness servcie ?

How did tehy know then to which tiers the assembly or set of assembly belongs?
Was it by specifying specific name space ?

thnask for coment

"Mr. Arnold" wrote:
>
"calderara" <ca*******@discussions.microsoft.comwrote in message
news:2A**********************************@microsof t.com...
So if I have properly understood, I need to merge all my library settings
in
a single XML config file using section group that each library will refer
to
get it own settings.
Then I copy this single config file at every place I need it .

IS that correct ?

No, that is not what I am saying.

In the N-tier solution I have seen, there was a dedicated config file for
each tier.

One for the UI that at best had configurations that pointed to the business
tier.

The business tier had configurations pointing to the UI and Data Access
Layer tiers.

The DALC or Data Access Layer Component tier had a config with
configurations pointing to the Business tier with multiple connection
strings for SQL Server, based on which application needed the connection to
SQL Server.

This was one giant N-tier solution that many applications were using the
same config files at the tiers, with *section groups* for each application.

I can't say that's the only way it should be done, but that is what I have
seen implemented.
Jun 1 '07 #6
I>n my opnion if you got any data which are application specific then
put in app.config file of the client. By doing this you can access the
configuration setting from within any classes in the project
No reaaly practicle if your work a a distributed environement especially for
Buisness and data layer.
Now regarding the database connection type of setting create the xml
file within the class project and then mark that file as "Copy to
Output Direcotry" . But in this case your data access class need to
read this file seperatly.
This is actually what I am doing
"-pb-" wrote:
On 31 May, 15:38, calderara <calder...@discussions.microsoft.com>
wrote:
Dear all,

I am building a set of libraries working in a n tiers architecture
Some of those libraries use common configuration settings like the database
connection string and some others.

I can imgaine that I can get one config file per buisness library.
What is teh best way and where to store configuration files ?

Should I get only one with everything in and located in a particular common
folder ?
Should I get many and all store in a kind of config folder ?

I do not want to configure for instance data access layer from the client
application app config file for security reason somehow.

Thanks for your comments and help
regards
serge

Well, I belive .net doesn't sets any standard on how to configure your
data.

In my opnion if you got any data which are application specific then
put in app.config file of the client. By doing this you can access the
configuration setting from within any classes in the project.

Now regarding the database connection type of setting create the xml
file within the class project and then mark that file as "Copy to
Output Direcotry" . But in this case your data access class need to
read this file seperatly.

I hope this helps

Jun 1 '07 #7

"calderara" <ca*******@discussions.microsoft.comwrote in message
news:63**********************************@microsof t.com...
Hoo ok sounds more logic then.
It is effectively logic and better organise to get a config file for each
tiers.

Now based on those tiers that you have seen, how there were organised
physically ?

I mean, if we talk about the buisness tiers which propose different
services, how those different services are split ? are they all in a same
assembly named Buisness with different class per service, or were they one
assembly per buisness servcie ?
They were based off a Common Base Business Framework that kept things common
and consistant. Each appliaction's Business Entities were derived from the
base framework. So, each application had its own Bussiness Entity library
which was derived from the Common Base Business Framework.
>
How did tehy know then to which tiers the assembly or set of assembly
belongs?
Was it by specifying specific name space ?
There was a Common UI Base for Web Forms, User Controls , etc, etc. For the
Web Form development, all Web Forms had to be derived from the Common UI
Base Form library, which was then used by the various business applications
that derived their own specific forms library.

Yes, there was a Common DALC Base Framework that all applications derived
from as well for data access.

So it made it easy to determine what application the library belonged too as
well on what tier the library was functioning on, a classic Windows DNA
setup.

Think Company Frameworks geared towards a company's needs.

http://whitepapers.techrepublic.com....x?docid=116195
http://www.microsoft.com/presspass/f...02-23dna2.mspx

Since you seem to be in this area, here is a good book to read ISBN
0-321-26820-2.

If you really what know about frameworks, n-tier design and business
objects, then you might want to look at CSLA, read the book, download the
framework, put it together, download the project put it together and run it,
to see the power and the concepts in use.

http://www.lhotka.net/Article.aspx?i...b-e0059cc82ee7

Jun 2 '07 #8
On 2 Jun, 04:37, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
"calderara" <calder...@discussions.microsoft.comwrote in message

news:63**********************************@microsof t.com...
Hoo ok sounds more logic then.
It is effectively logic and better organise to get a config file for each
tiers.
Now based on those tiers that you have seen, how there were organised
physically ?
I mean, if we talk about the buisness tiers which propose different
services, how those different services are split ? are they all in a same
assembly named Buisness with different class per service, or were they one
assembly per buisness servcie ?

They were based off a Common Base Business Framework that kept things common
and consistant. Each appliaction's Business Entities were derived from the
base framework. So, each application had its own Bussiness Entity library
which was derived from the Common Base Business Framework.
How did tehy know then to which tiers the assembly or set of assembly
belongs?
Was it by specifying specific name space ?

There was a Common UI Base for Web Forms, User Controls , etc, etc. For the
Web Form development, all Web Forms had to be derived from the Common UI
Base Form library, which was then used by the various business applications
that derived their own specific forms library.

Yes, there was a Common DALC Base Framework that all applications derived
from as well for data access.

So it made it easy to determine what application the library belonged too as
well on what tier the library was functioning on, a classic Windows DNA
setup.

Think Company Frameworks geared towards a company's needs.

http://whitepapers.techrepublic.com....02-23dna2.mspx

Since you seem to be in this area, here is a good book to read ISBN
0-321-26820-2.

If you really what know about frameworks, n-tier design and business
objects, then you might want to look at CSLA, read the book, download the
framework, put it together, download the project put it together and run it,
to see the power and the concepts in use.

http://www.lhotka.net/Article.aspx?i...a-bacb-e0059cc...
There is one more very efficient application framwork provided by
Microsoft for distibuted architechture. Its called "Enterprise
Development Reference Architecture". There is another document which
shows how to implement this architechture and its called "Enterprise
Development Reference Implementation"

You can find it on MSDN site of microsoft or www.gotdonnet.com web
site. If you can't then let em know and I will forward you this
document.

I found it very useful.

Jun 4 '07 #9

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

Similar topics

3
by: Geoff Pennington | last post by:
It is really pathetic that I don't know this, but here it is. I have been writing ASP.Net apps for a while, and all configuration information, such as the database connection string, goes in a text...
4
by: Ed_P. | last post by:
Hello, I have the following scenario: I have a solution with 4 projects Project1 = MainWindow (Windows EXE) Project2 = PresentationLayer (DLL) Project3 = BusinessLayer (DLL) Project4 =...
4
by: harvie wang | last post by:
In .Net,Through System.Configuration.ConfigurationSettings Get Application's Settings I can't find the Configuration Value from Register Where the ConfigurationSettings saved? How to Read it...
7
by: Yongsub Eric Shin | last post by:
Hi. I'm just a beginner in ASP.Net. I started writing codes and I keep on getting this Runtime Error page, where it says "Description: An application error occurred on the server. The current...
5
by: feng | last post by:
Hi, We just converted our VB.Net Windows exe project from VS.Net 2002 to VS.Net 2003 and ran into a problem. the MyApp.exe.config file that we use for our customized configuration settings is...
3
by: Richard Lewis Haggard | last post by:
I have a test application that is calling an assembly that reads some strings out of a config file. Normally, this assembly supports a web application and the information can be read just fine....
4
by: WT | last post by:
My web site is using a library created in a separate project. VS 2005 has created for it an App.config file. The library is included as a refernce in my web site. When I copied my web site to it's...
6
by: charles_gero | last post by:
All: Quick question regarding reentrancy and C99 signals. If we have a C statement such as: variable = 123456; And the resulting compiled machine code for a particular fake platform is to...
4
by: Rob | last post by:
The app.config in VB 2005 appears to be riddled with bugs.... From solution explorer I right click on the Project | Properties... then I use the grid to add the app settings... AND they are saved...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.