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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code Behind Files versus Components which is best for a Newbie

Status
Not open for further replies.

StillLearning

Programmer
Jan 12, 2000
11
US
I have a basic newbie question regarding code behind files and components (dlls). Which one should I use? I am developing my first ASP.NET application and still learning my around Visual Studio. The application will be deployed to my company's intranet. A quick response is greatly appreciated.

He/she who does not take note, often forgets. Anderson Phillips III (10/22/01)
 
I'm a newbie and had a similar delimma..i decided to go with code-behind. I'm on my first .Net project as well and find it much easier to use code-behind as far as database connectivity and just having the code all in one place. But i've read it's up to the developer what to use and there's no one better way.
The threads below might help u decide:




 
Thanks for the info. I will check those threads.

He/she who does not take note, often forgets. Anderson Phillips III (10/22/01)
 
Code-behind is fine for small projects and people who are just getting started. Do it a few times to get used to the framework, the order in which events fire, etc. But at some point I would advise you to switch to using a separate DLL to hold the majority of your code.

Doing so will allow you to have some code reuse, so you can use the same DLL in another project. You might even be using the same DLL in your current project, which means that you only have to write and test it one time.

Also -- "real" projects (more than just a few pages) will organize their code this way so that you can have more than one person working on the site at a time -- one person can be doing the .aspx pages, while another is writing the database access routines, and another can be writing business rules in another DLL.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top