views:

74

answers:

1

I've been asked to start a new web project and I'm a bit scared of what path to take.

I've been help this community and I've learned a lot from you as well in this last year, you are great! and when this question pop up, you are the only friends I can ask for a direct and responsible answer.

The project has to handle more than 20000 online users for 24 days (in December), sending emails to all everyday and became sort of a portal that handle landing pages from those emails, acting together with Flash to make everything user configurable.

I got, from my experience, that I should use MailChimp as the email handler as they have cheap prices for this and all can be accomplish from their API.

My only dubt is what technology to use.

All my live I've been Microsoft lover, since ASP and last 5 years .NET, but this is all growing sooo fast! I can't keep with it.

My first idea was MVC 2.0 in Azure, but I'm kinda scared as I never developed for a "cloud" and all that cloud repositories... to handle so many users, and mostly I never used MVC before and always got me on hold to dive in as it's kinda go back to the ASP days and the scripting language...

I think that WebForms for this kinda configuration is a killer, so I'm open to any ideas.

Should I invest in me and dive in into MVC for 2/3 month and finish this big project? that the really developing part is handle the Administration area that gives users the ability to change everything about the entire landing page.

Should I just keep into my confy "space" and do WebForms with URL redirects

wireframe for one of the menus can be seen bellow to illustrate the "thousand" little options that a user can have

alt text

It doesn't seam to be an overkill, I just need to design the Database properly and thinking about extensibility... I'm just afraid I get into a brick wall and realize that I should not do things like that and wasted 15 days .... as an example :(

any idea is greatly appreciated.

A: 

MVC 2.0 is very very DRY out of the box (bar some reliance on magic strings)
Take, for example:

<%= Html.EditorForModel() %>

BAM!, now all your forms are reduced to 1 line... automatically rendering the right form for the right model supplied...

public class LoginToken
{
  [Required, StringLength(50), RegularExpression("blahblah")]
  public string Username { get; set;}

  [Required, StringLength(50)]
  public string Password { get; set; }
}

Note the declarative validation attributes which can be added to the form just by including the already-included jquery.validate.js (they are re-validated automatically on the server-side) and a about 2 more lines of code in your views.

And also, all your fields are mapped back to your classes automagically:

[HttpPost]
public ActionResult Login(LoginToken token) {

  // re-display the form is there's any validation errors
  if (!ModelState.IsValid) return View();

  // validate username/password and logins
  bool result;

  using (var db = GetDB())
    result = (from u in db.Users
              let pwdHash = db.HashPassword(token.Password)
              where u.Username == token.Username &&
                u.PasswordHash == pwdHash
              select u).Any();

  if (result) // blah blah
}

You can also map parameters from URL such as /url?paramOne=1&paramTwo=2 or /url/users/1/items/2 to userId = 1 and itemId = 2 automatically

I could list more but the DRY-ness of things was enough for me to switch.

Note that almost everything in MVC can be customized to your liking (e.g. the template that is used to render the form... the template for rendering listboxes etc.)

I am a very code-centric guy, thus my bias, but I think these benefits should apply to you just as much.

Imagine how much code/time you could save by having automatic validation and form data parsing built-in to the framework.

So just dive in! It might take a while before you're used to it, but once you grok it, you won't want to turn back to WebForms again... especially for projects with lots of forms like that.

chakrit
I like the "automagically" part :)
balexandre