Saturday, February 12, 2005

ASP.NET Enterprise Environment

I have been reading a lot about agile practices lately, sopping up as much information I can get my hands on. I'm hooked. I knew immediately that these practices would benefit me at work. The problem is that these are geared towards general development. Web development is slightly different, and it poses some problems with source control, unit testing, and other things...

For source control I setup Subversion on our test server, then installed Apache to serve up the repository over http. It uses WebDAV and Apache permissions to identify the user. As many people know, the subversion admin directory (.svn) doesn't play well with Visual Studio .NET Web projects. I think it has something to do with FrontPage server extensions, but whatever. Anyway, there is a modified version of TortoiseSVN availalable that can convert this to a more friendly (_svn) directory. Beware of using this though... other tools will not work if you use this method. For Visual Studio integration I am using AnkhSVN (which you can configure to use _svn directories). This works very well, however it's still not idea. Here's why:
I frequently run into commit conflicts on my .dlls, .suo, and .pdb files. This really doesn't matter since the .dll's will be recompiled, but it gets quite annoying. I'm really looking on a better way to manage my directory structure to easily omit these files from the source control. (I'm thinking that NAnt may help me setup a different structure, but I haven't messed around with it yet)

For unit tests, it's quite difficult to implement in a web environment (at least it appears to be). One thing I quickly realized is that most of our logic was residing directly in the page. Obviously, this is not desirable so I started work on a robust class library (which is coming along quite nicely now). But how do I write unit tests for code that inserts data into a database? Should I insert, then check to see if the data was inserted? I can easily see this doubling my work. Almost ALL of my code is database interaction.

I have also started configuring CruiseControl.NET to do some continuous integration on my repository. This is waiting on a few other factors, but is the next step in improving my development environment at work.

I know I'm on the right track, but I am not finding enough good resources specific to ASP.NET development with architecture, directory structures. I'd love any advice on how to improve in these areas, maybe some book recommendations.... Thanks!
Comments are closed.