Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 6,131 | Comments: 45,568

filter by tags archive




Barry Dahlberg

Gee if you had those all in custom controls you'd be able to make one change to fix all your labels so they are associated with their text boxes...



Barry Dahlberg

Ack, blog ate my HTML, or rather, didn't eat my HTML... should that be HtmlEncoded?

James L

WebForms, I do so hate thee...

Chris Cyvas

Your webform brings all the boys to the yard! ;)

I think the hipster coders might knock a few points off your "cool" factor for displaying such an antiquated technology. At least, that's what they would say. :)


Postbacks? Oh no! Even back in 2000 with classic ASP I always did command/query separation (or controller/view separation). View pages posted their forms to controller pages and controller pages redirected to view pages. You can do webforms but no posbacks for Christ sake!

Ryan Riley

If you are pulling YAGNI, why are you starting with ASP.NET? Why not start with your HTML? After all, ASP.NET is producing HTML forms, which are really just documents with a designated action attribute for processing (which is also optional). So you could in fact just have the form and then create an ASP or ASP.NET page for the processing, then redirect. Or use CGI and really go caveman style. :)

Seriously, though, how did you decide that classic WebForms was YAGNI? On what were you calling YAGNI? MVC? If so, I don't follow the logic as those are two different approaches to achieving the same thing. If you had called YAGNI on ASP.NET in favor of ASP, I would understand (and possibly agree).


What is this strange MasterPageFile you speak of? All looks a bit new and technical to me :)

Fair play man. If it doesn't change too much and isn't causing sleepless nights, roll with it.

Bradley Landis


Wouldn't having controller pages and view pages right from the get go defeat the point of the experient. You Aren't Going To Need It! I think ayende is saying, he will gladly refactor to something like that when the need arises, he is just waiting for the need to arise.


I know we all hate Web Forms, but really, we don't even know what this project/application is meant to do. If it's 3 web pages that show a grid with a few text boxes, Web Forms will be just fine..


I am calling YAGNI on this code. Why do users even need to login?

Frank Quednau

Nobody doubts this works, but it's brutal.


I like it!

Tobin Harris

I like it too, beginners mindset in action. Also better than the 350+ LOC that comes with MVC AccountController (assuming userService isn't a refactoring of that).

Jason Stangroome

I'm really interested to see where this takes you as your application evolves. I presume you're still writing tests.

Chris Smith

If it works, does it matter? I've released a few things built this way and I've never had any trouble. I mean BIG things which have over a million hits a day.

Don't forget:

ViewState == ViewData

Code behind == Controller

Ayende Rahien


Your parallels are quite mistaken

Chris Smith

I don't think there is a stable definition of MVC in a web context which we can build on. It means different things to different people. Ok slight clarification on my point..

View State <= ViewData. ViewData is actually greater than View State. You have to pass the state via View Data to the view. ASP.Net provides a black box abstraction for this and persists it automatically between requests. The concepts are equivalent and you do spend a lot of time building ASP.Net on top of ASP.Net MVC.

Code behind == Controller. Each is responsibly for managing UI state and interaction with the model. ASP.Net MVC uses request data for state management (you manually recover state). ASP.Net web forms manages state for you.

Same generalised concepts, different application.

MVC is so blurred, it's impossible to take sides.

Comment preview

Comments have been closed on this topic.


  1. RavenDB Conference 2016–Slides - 2 hours from now
  2. Proposed solution to the low level interview question - about one day from now

There are posts all the way to Jun 02, 2016


  1. The design of RavenDB 4.0 (14):
    26 May 2016 - The client side
  2. RavenDB 3.5 whirl wind tour (14):
    25 May 2016 - Got anything to declare, ya smuggler?
  3. Tasks for the new comer (2):
    15 Apr 2016 - Quartz.NET with RavenDB
  4. Code through the looking glass (5):
    18 Mar 2016 - And a linear search to rule them
  5. Find the bug (8):
    29 Feb 2016 - When you can't rely on your own identity
View all series



Main feed Feed Stats
Comments feed   Comments Feed Stats