views:

429

answers:

11

I am re-building our poorly designed web application from scratch, and wanted to get into TDD and basically "do things right" as kind of a learning project. What tools, processes, and resources are recommended to do it "right" from the start? I will be working alone as the architect and developer, with the backup of a business analyst and business owners for usability testing and use cases.

EDIT: Right now we use SourceSafe for source control, is there any reason technologically that I'd want to try to get us to switch to subversion?

EDIT #2: Looks like the consensus is: Cruise Control.NET Subversion(if I want to stop using SourceSafe) ASP.NET MVC NUnit for unit testing Resharper

+4  A: 

I highly recommend that you take a look at MVC for ASP.NET if you want to make unit testing a high priority in your development process. It sounds like it is perfect for what you are trying to do.

I would also recommend CruiseControl.NET for continuous integration (this is important if your team is going to grow).

Subversion is my favorite source control system when I am working on small teams. Use Tortoise SVN for Windows Explorer integration.

spoon16
+1  A: 

We are using a setup with Visual Studio 2008, Resharper 4.1, Subversion for sourcecontrol, Cruise control for automated builds and the build in unit testing for all our automated tests. and Linq2Sql for or mapping. You could swap out anything but VS (obviously) and resharper (it's so cool) but you could easily use another sourcecontrol, or mapper or unit testing tool.

Per Hornshøj-Schierbeck
+1  A: 

Here are some tools that can make it easier and safer to work (Googling the names will bring up the relevant pages):

Subversion - Source control
NUnit - Testing framework
CruiseControl.Net - Automated builds

toast
+1  A: 

Visual Source safe has a strict locking policy so that only one person can work on a file at a time....CVS or subversion allows multiple users to work on the same file at the same time.

EvilEddie
So, if I'm working alone it's not a big deal, but it would become so when I get a new developer hired to work under/with me huh?
Ryan Skarin
There are plenty of large teams that use SourceSafe. If your team members work on different components of the system where they rarely overlap, it won't be that much of a problem. You might stick with it until its a problem, then make the switch. My personal preference is SVN though.
JasonS
There is option Allow Multiple Checkouts in SourceSafe
Goran Peroš
+1  A: 

All of the suggestions here are good, but there is no magic bullet. You'll have to look at how big your app is, how many users, how is it deployed, etc. to make your architectural, process, tool set, and other decisions. TDD, for instance, is a good methodology, but not the only good methodology for "doing things right". Another one, CruiseControl is awesome, but in a single developer project, it is probably overkill.

Be consistent in whatever you do is my best suggestion - if you go with TDD, GO WITH TDD if you know what I mean.

JasonS
I know that there is no "magic bullet", what I am looking for here is some suggestions from others for what has served them well in the past. I plan on taking these GREAT suggestions and sitting down and doing a bunch of research and designing the best strategy for me and my project.
Ryan Skarin
"Another one, CruiseControl is awesome, but in a single developer project, it is probably overkill." I don't mind a little overkill as I expect my team to grow in the future and I'd like to use these tools on an ongoing basis, not just to "get the job done and move on".
Ryan Skarin
+2  A: 

An answer to your source control question...

Redesigning an app from the ground up will probably be a time-consuming project, I wouldn't waste time changing source control unless you already know exactly which one you will use and have experience setting it up.

Visual SourceSafe gets the job done, especially in a 1 person effort, and its already in place so run with it.

Keith
A: 

If you are just starting out then I would change as little as possible (especially since you are the only developer), so stick with Sourcesafe. There is absolutely nothing wrong with it in your situation.

Later down the line, you might look towards the MS Team System, or perhaps go for other 3rd Party tools.

Personally I'm not a fan of Subversion, but I recognise that it's a popular tool across the industry.

As for TDD-specific software, I can't offer any advice. Do you have preferred tools for UML or whatever formal methods you are using?

CJM
Right now we have no formal methods, and thats part of the issue. It was a very much "just make it work" type of ideal around here before I got here. The developer that wrote most of the app I am re-writing is not with the company anymore and it just makes me ill to look at how he designed this app.
Ryan Skarin
A: 

One thing to mention: Be a 100% sure that you understand what the program's doing and what's it supposed to do, before doing any changes. A 'bad' softwer often turns out to be 'not that bad' after understanding the whole situation.

Sourcesafe can be ok, especially for one person, but when there'll be more and more ppl on the team, the lock model can get annoying, but for the time of being: stick with it

snomag
Oh, I FULLY understand what it's supposed to do, and what it currently does. I helped finish the project when I started, and have been maintaining it ever since. It was written in asp.net as if you were still using asp classic.
Ryan Skarin
This thing started out as 15 user controls that were loaded on the same page and swapped to visible as the user navigated! He also had multiple aspx pages using the same codebehind files and selectively called methods based on what page was currently using the file, just lots of craziness like that.
Ryan Skarin
+1  A: 

We re-wrote our website like you're doing and we are using C# with MVC. Its great. We use Microsoft's SourceSafe to control our code and it works awesome. Since you are the only developer it will depend on what you like.

Microsoft's sourcesafe allows us to create a branch that we can work off can keep under source control, and we can switch between both easily. (I really haven't used subversion to much so I can't comment on it.)

We use NUnit to test/ mock out our code. It super easy to mock them out. We created a class that will save and read the objects.

The save function: Stream stream = File.Open(simplePath, FileMode.OpenOrCreate); BinaryFormatter bwriter = new BinaryFormatter(); bwriter.Serialize(stream, actual);

The read function: Stream stream = File.Open(simplePath, FileMode.Open, FileAccess.Read, FileShare.Read); BinaryFormatter bwriter = new BinaryFormatter(); object returnObject = bwriter.Deserialize(stream);

We've used NUnit to mock out xml and SQL.

Good luck

Brad8118
+1  A: 

If you're about to set up a fresh instance of subversion and continuous integration, starting green from a VSS background, these two free packages will likely save you days (or weeks) of time:

  • Visual SVN Server Sets up everything needed for a subversion server, including Windows AD auth and an admin GUI. Free, you may consider supporting their excellent VisualSVN VS addin for source control integration in Visual Studio. Alternatively, can look at AnkhSVN

  • TeamCity A Continuous Integration package (alternative to CruiseControl.NET) from JetBrains (makers of ReSharper, a fantastic tool, as mentioned) which is free for the professional version (up to 20 users and 3 build servers).

These two packages are some of the easiest installs around, challenging VSS itself :-)

Using SVN may take a little adjustment; but with the excellent doco for whichever client you pick (AnkSVN, VisualSVN, TortoiseSVN, or some combination), you'll be fine.

Besides, you know where to find people eager to answer any questions you might have in exchange for Rep ;-)

Matt Ryan
+1  A: 

Check out TypeMock or Rhino Mocks. Mocking can save you so much time and pain when you're unit testing a web application.

Robert S.