Home All Groups Group Topic Archive Search About

n-tier, connectionstring and web.config

Author
18 Jan 2006 9:12 PM
Bobstar
Hello
Im trying to figure out how to build an n-tier application the best way.
Many of the resources i've read all points to a not so elegant solution.
Hopefully I can get a brilliant advice/ hint here.

As I mentioned I'm currently designing an n-tier solution with PL, BL, DL
etc. I want the DL to be a true layer and the BL to be installed on an
applicationserver and the Pl could then be placed on a webserver / client.
Therefore I need a clear separation between the applicationserver and DL,
but unfortunately many of the architecture guidelines provided to build such
a solution all references the web.config file. "Just place the
connectionstring in the web.config".... huh ? - IMO that's clearly not a
separation between the PL/BL and / or the DL.

So my question... How do I build a solution where the web.config or for that
sake  App.config for the client is'nt required to get a true n-tier model?
Ofcause I still need the ability to have some sort of configfile for my
DL-assembly (a hardcoded solution is not what I want)

/

Author
19 Jan 2006 12:36 AM
john smith
Bobstar wrote:
Show quote
> Hello
> Im trying to figure out how to build an n-tier application the best way.
> Many of the resources i've read all points to a not so elegant solution.
> Hopefully I can get a brilliant advice/ hint here.
>
> As I mentioned I'm currently designing an n-tier solution with PL, BL, DL
> etc. I want the DL to be a true layer and the BL to be installed on an
> applicationserver and the Pl could then be placed on a webserver / client.
> Therefore I need a clear separation between the applicationserver and DL,
> but unfortunately many of the architecture guidelines provided to build such
> a solution all references the web.config file. "Just place the
> connectionstring in the web.config".... huh ? - IMO that's clearly not a
> separation between the PL/BL and / or the DL.
>
> So my question... How do I build a solution where the web.config or for that
> sake  App.config for the client is'nt required to get a true n-tier model?
> Ofcause I still need the ability to have some sort of configfile for my
> DL-assembly (a hardcoded solution is not what I want)
>
> /
Where the connection string is stored is totally irrelevant and
unrelated to your n-tier layering/design. It has to be stored somewhere,
and a config file of some sort (one of the existing or roll your own
using a serialized data class) works quite well, I don't see how this is
inelegant or goes against the design/mentality in any way. I usually
leave mine in web.config (on the app server where the DAL/BLL is),
encrypted using the DPAPI. I'd love to help, but I just don't see where
the problem is...

AddThis Social Bookmark Button