views:

247

answers:

5

My company is moving from classic asp (a nightmare) to .Net (rapidly becoming the same nightmare). We have over 800 forms, very similar in how they are processed, but 800 different sets of questions.

They have common code: add to the database, get from the database, validate user inputs, validate credit card info, etc...

We're using Visual Studio 2008. How would you organize these solutions/projects?

Do we put them all in one solution?

A: 

You probably could have designed this different. Perhaps with dynamically generated pages and polyporphism. But yeah, you won't gain anything by having separate solutions. It would probably add to your headache. What problems are you actually experiencing? Have you seperated database logic from your presentation? Are you basically just doing Classic ASP style coding in ASP.NET?

BobbyShaftoe
I'm too new to the company to tell you much, just that 800 forms in one solution looked wrong to me. They do have separated database logic and presentation, but given other things I've seen them do, I worried. I'll look into some of these things and come back. Thanks for the answer.
+6  A: 

take the opportunity - if at all possible - to convert the 800 forms to soft-coding

caveat: I have done something very similar to this where the forms were all legal agreements which vary significantly by state, and found that there was sufficient symmetry to them that they could be generated (and created!) out of a database, with the original documents reverse-engineered automatically into the new (database-driven) format. The results were automatically verified with screen captures - pixel-perfect reproduction.

Steven A. Lowe
Thanks, Steven. I'll look into this.
@[Net666]: let me know if I can be of assistance - email is ceo AT nov8r.com - and good luck!
Steven A. Lowe
@[Net666]: "800 forms, each with 10 to 100 questions..." holy cow, this should be ONE form with a backing database. Did someone get paid by the hour to code these? ;-)
Steven A. Lowe
They built an in-house app with a user-interface for non-programmers to create them. It's still in use, but long-in-the-tooth. One problem is that our SQL servers get very high seasonal traffic and I don't think the boss will like using the database to load the forms.
@[Net666]: asp.net (and sql server) caching is VERY good these days, should not be a problem. And you can always generate static pages from the database if need be - but i bet you won't need to!
Steven A. Lowe
A: 

800 forms? as in 800 web pages? That's a lot, but should be manageable. I'm surprised with that many forms that you haven't looked at using some kind of form building technology such that the layout of the form and what have you is stored in a database of some kind. Hopefully you can use some User controls to at least minimize/standardize the code a little bit.

Code wise, you might as well group them alphabetically and save yourself the headache of trying to figure out some common functionality between them...what if one form overlapped between groups? Whatever you do, don't let your code structure mess up how you want them arranged and presented to the user. Check out the SiteMap that .net has.

I assume that you are using web forms? Nothing wrong with that, and there are some perfectly valid reasons for sticking with it. But if you aren't too far in, check out the MVC framework and see how that grabs you.

Al W
800 forms, each with 10 to 100 questions. Each form is separated into "sections" of about 5 questions each, so the user fills in and then saves one group at a time. They are web forms. Do you think MVC is better?
No, I don't think it's better. It sometimes just makes more sense to some people. A form with 100 questions would make one massive controller function though. Stick with web forms, but beware the ViewState.
Al W
Thanks for the advice. "Beware of the ViewState"? What's that mean? I was thinking maybe ajax, so none of the usual post-backs at all. If I understand correctly, there's no ViewSate to worry about in an all -ajax application.
+2  A: 

You totally have to generate this out of the database. It's significantly easier to implement a configurable survey/questionnaire/exam system than to implement 800 forms.

If it was just 50 forms, I'd probably let it go sloppy, but 800 forms - programmatically generated all the way.

Cade Roux
Do you mean to "generate this out of the database" every time a form is called by a user? That's more load on our expensive SQL servers that get hit so hard during our busy season. Thanks for the reply.
No, there's always options for caching (even code generation), but yes, ultimately generated from the database.
Cade Roux
A: 

At this point, I would advise the following, from own experience:

1) Do not upgrade the project just for the sake of upgrading; if it works, leave it.

2) If your company has some "it MUST be upgraded" vision.. well ok, convert it to a .NET project but don't change any functionality. Leave it as it is. This will perhaps take a couple of days of minor fixes, depending on complexity of the app, but should be doable.

3) Try to persuade your boss/company to either a) build a new app from scratch, or b) use 3rd party survey software, like Cade Roux mentions. Until a new version is ready, leave the existing one running at all times.

Converting the app to .NET and rewriting it at the same time to a .NET paradigm will become a major nightmare, don't do it.

Thanks. These old apps will be in place for a while, but we have bugs galore (300 -- yes, that's three hundred -- bugs). So I'm trying to suggest re-writing. With that many bugs, it has to be easier. The old asp code is so hideous, it takes all day just to follow the spaghetti on one of them.

related questions