I'm currently involved in a migration to TFS from SVN of a large project that is going to be divided into five different sites. This project allows some providers to insert five different product data into the enterprise DB. Like a lot of companies out there, we have a technological debt that should be solved (or at least, reduced) with this new project organization. However, I'm quite new to ASP.NET and also our software is still running 2.0 .NET, so maybe I'm missing something or things should be done in a different way nowadays with 3.5+.
One of those five different parts is going to be a new one. This is the one I'm going to develop. In order to achieve high degree of modularity, the code of the current project is divided into several DAO (Data Access Object) under App_Code,
*.ascx modules living in different parts of the project structure, VB classes that inherit from
System.Web.UI.* (for each control that is displayed on the web) under App_Code, and lots of stored procedures for providing data to the controls. Also, we have several
*.aspx that use
<asp:PlaceHolder /> for displaying each of the controls that inherit from System.Web.UI.
The question comes when, for creating a simple
<select> dropdown list to display a list of providers, I see that I have to do the following steps:
- Create a class
cProviderinside the App_Code, that ultimately inherits from System.Web.UI, with a method that calls to the following DAOProvider object.
- Crate an specific DAO object to connect to the DB I need to.
- Create another DAO object, called DAOProvider, that inherits from the previous one, with the call to an stored procedure that retrieves the list of the providers.
- Create that stored procedure in the database.
- Create an
.ascxcontrol to display the
<select>with the options obtained from
If you're still there, here goes my question: Is this the right way to do things? Is this high level of modularity the correct way to develop mantainable .NET applications? Do I have to follow this style and organization or should I take another one (please give me your recommendations)?
From my point of view, having to do all those steps to paint a simple dropdown list doesn't follow KISS principles at all, and becomes unmantainable if somebody else has to take this project, knowing that the code is the only documentation we have.
EDIT: links to documentation regarding this topic would be highly appreciated.