Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting started - key issues...

Status
Not open for further replies.

MarkatTekTips2004

Programmer
Jan 12, 2005
15
0
0
US
Starting an ASP.NET project (in C#) and wanted to pose a few questions to those of you with experience of whipping-up solutions. There are a few key areas which are fairly unrelated, but which pose a slight hurdle in my initial thinking of how to put a project together...

1. From what I gather, the db connection string should go in the web.config. I'm told not to place the user/pass in plain text there though -- even though no one has access to this file. If I'm to encrypt it, I presume I then need to unencrypt it before use, right? This the best place to put the conn str?

2. Global variables... they come in quite handy. Where does one put them however? Should I plan to use the SESSION object for per-session global settings? What about application-wide settings -- use a global static class? I know I can put into and retrieve stuff from the web.config file, but is that better than a global static class?

3. Of course I wish to do a 3-tier architecture... the data layer is my biggest hurdle. I recently checked out the Data Access Application Block 3.1. This is a big help -- but is it the way most of you out there get easy access to your data? I know I'd like to be able to easily switch from SQL Server to Oracle if need be and from what I gather, this block can do that using the "AdoHelper". But is there a better way using some 3rd-party tool.

4. In addition to the data layer, I am believing that I will need to create a class per table to follow proper "OOD". this true? If so, any suggestions on saving time doing this with a particular tool?

5. Inheriting all pages from a base page class... this a good idea? I use VS 2003 and have read that if I do this, I will need to remove the "html" and other tags from each of the pages which inherit from the base. This sounds like extra work considering VS will automatically put all those tags into each aspx page I create. Input? I know I'd like to use CSS and maintain a flexible design so that users may change the overall color/font scheme, thought this method might help, but not necessarily the best; don't know.

6. I've posed part of this before, but wish to confirm... should I plan to count on creating a field in my tables as an "identity" field and use "autoincrement" as my primary key? Or do most of you generate your own PKs? If the latter, any particular method you use and what is the reasoning to avoid using the former (the identity field)?

These are the primary areas which haunt me in getting started. Any outside tools and/or methods, addressing the above, would be appreciated.

Thanks for your input!

Mark
 
Mark, you may find more help for this in the ASP.NET forum. It is forum855

------------------------------------------------------------------------------------------------------------------------
If you don't have a sense of humor, you probably don't have any sense at all.
- Anonymous
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top