Musings of Geekdom by Eric Newton

tail /var/log/thoughts
posts - 88 , comments - 41 , trackbacks - 68

My love/hate relationship with ASP.Net

I love ASP.Net.
  • The built-in controls' viewstate tracking was such a fantastic way for the controls to “know“ what they were set to during the last postback.
  • The validator controls with the built in Client side validation (when JavaScript was enabled) was just sheer genious!
  • I love the new MasterPages.
  • I love the skinning of controls... its just neat!
  • I love the DataGrid's/GridView's ability to quickly render simple-to-render data.
I hate ASP.Net.
  • When attempting to do anything with DataGrids/GridViews, its always been a difficult task of “tinkering“ with it to get the intended results... more often then not, Advanced editing is complicated.
  • I often find myself having to spend hours trying to “figure out“ the framework to do tasks that I could get accomplished in 10 minutes with ColdFusion or PHP.  I'm mostly talking about DataGrid/GridView and more advanced rendering. (Caveat: of course you can use the “code injection“ <% %>code into pages...)


Simply put, I feel like when I'm prototyping a web app, ASP.Net is great!  It gets the initial data views and some rudimentary data editing tasks accomplished quickly, ESPECIALLY the new ASP.Net 2.0 bits.  They're just great!

The problem comes in when I need to start actually getting into the guts of editing, enforcing business rules, etc.  Then I find myself spending lots of time and effort “learning” how to do the task in ASP.Net.   The entire time I'm “learning” the ASP.Net way, I feel like I could've got the same job done in a few minutes with the more esoteric ColdFusion and/or PHP, where you really have complete control over the HTML going out, without resorting to hacking (ie, intercepting HtmlTextWriter passage through the Render methods)

Another issue I have: whats the purpose of having to assign an event to GridView.RowEditing and RowCancelingEdit?  Why can't it just do the “standard“ thing of setting the EditIndex if the event hasnt been handled?  And why does RowCancelingEdit have a totally different type (GridViewCancelEditEventArgs) compared to RowEditing (GridViewEditEventArgs) with basically the same make up: a boolean Cancel property and an integer RowIndex/NewRowIndex property.  Whats the underlying reasoning here?  Is anybody really examining this stuff for sanity?  Its like ASP.Net makes things more complicated once you break out of the “RAD“ mold, which is entirely ironic to me!

On the other hand, System.Web.Mail (probably not the best implementation to begin with) is being shifted to System.Net.Mail (smart move, but still lacking basic “System framework” features that establish a few nice interfaces so that 3rd party Mail providers could provide the implementation... read up on this issue here) and is 100% managed (as far as I can tell... great job!)

System.Web.Caching (another silly namespace rooted types) are shifted to System.Net.Caching (i believe) and loses its ASP.Net “isms.“ so now we can use them in business facade layers to provide some caching and not have the enterprise templates complaining of System.Web usage ;-)

Now I don't really want to flame the ASP.Net guys, they are doing great work.  ASP.Net 2.0 has been another huge step forward in developing web applications.  However,

Ok, I'm done venting now...

UPDATE:  I found a fairly good tutorial that seems to have just recently been indexed by Google: that I hadn't been able to find.  It addresses the fallacy of my thinking with GridView, but finally I can see some reasoning or at least How to do what I need to get done.

Print | posted on Tuesday, June 7, 2005 6:20 PM |



# re: My love/hate relationship with ASP.Net

I pretty much avoid the DataGrid / GridView except maybe for quick prototypes -- and even then I seldom find it necessary once you get experienced either the Repeater or you have your own "Grid" control (like my UIMapper has). ASP.NET really is great, but there certainly are some features that are there for your drag-n-drop type of "development", but there are also great capabilities for "real" developers that need full control -- but the docs don't tell you which is which. :)
6/7/2005 8:57 PM | Paul Wilson

# re: My love/hate relationship with ASP.Net

Yeah, all these books and tutorials go on and on about how great the DataGrid is, but you don't find out the cold hard facts until you've tried using it for real.
The thing I find most annoying is that GridView uses inline styles, so you can't use style sheets to style your gridview! Arghh! That really sucks. Ok, there's these CSS friendly control adapters now (can you say afterthought?)
Ever tried adding client script to a GridView (yes, I hear you sniggerring) - well that was a complete waste of time! I tried adding a rollover effect so that the row the mouse is over changes color - sounds simple? Show me a way to do that that works on IE7 & Firefox & doesn't involve hacking ASP.NET to peices & I'll show you a happy man ;-)
Help me, I've been having thoughts about learning PHP...
4/24/2007 5:42 AM | Dave Bartlett
Comments have been closed on this topic.

Powered by: