News

Live From VSLive!: Five Questions With Paul Sheriff on Architecting ASP.NET

In his VSLive! preconference workshop on Monday, .NET author and consultant Paul Sheriff, president of PDSA, gave his full-day "Architecting ASP.NET" presentation to a ballroom full of attendees. We caught up with Paul right after his talk to find out more about the challenges -- and opportunities -- in architecting ASP.NET.

What do you think the biggest mistake is that people make when architecting ASP.NET?

Paul Sheriff: Probably just not wrapping up enough stuff in Microsoft's tools in ASP.NET. Sometimes I need to store my settings in the config file, and sometimes I need to move it to the registry. The problem is if I'm using the configuration manager to do the retrieval in those settings...I have to change everywhere that I've used that. Had I wrapped up the settings -- put a wrapper around the configuration manager call -- I could have changed the code in one place.

That's pervasive everywhere: ADO.NET...exception handling, configuration management. You need to wrap up more and more so you have the ability to change it in one place.

What's the most challenging aspect of moving from 1.1 to 2.0?

P.S.: There's nothing really revolutionary from 1.0 to 1.1 to 2.0. [Microsoft] made things easier. The biggest challenge that I see from most corporate developers is they're coming from desktop development -- coming from VB 6, coming maybe even from Windows Forms in .NET -- and now they have this whole state management thing to worry about. That's what I think trips most people up. Dealing with, 'Gosh, I do this page, I grab this data and now the data is gone.'

Even today, I covered a lot of stuff in my session that I consider fairly basic, but a lot of people are seeing for the first time....I think it's [because] there's so much in there. They learn one way, and that's it -- that's all they do. They don't go on and learn about the other ways that might be better.

What is your favorite feature or tool of ASP.NET 2.0?

P.S.: In 2.0, it definitely has to be GridView. In the previous versions of .NET, we had the DataGrid. With the DataGrid, we had to write code for sorting and paging. It wasn't a lot of code, but you had to write it. [With 2.0] even the selecting and built-in editing in GridView -- it's all done. No code. That saved a lot of coding right there.

There's one other [feature] that I think deserves mention and that's the object data source. The object data source now lets us -- without any code -- substantiate an object. It lets us take a business object that we've already created and bind directly to that. That was something we didn't have before; we always had to go through a data source.

Those two things right there just made our lives a lot easier.

You work with ASP.NET all the time. Is there anything in ASP.NET that still surprises you?

P.S.: There's not too much that's surprising. I think in every version that comes out we get some better utilities -- I think that Microsoft gets better [at helping us]. In certain areas of .NET 1.1 it took 10 lines of code to do something. Now it takes zero in 2.0. So I think the surprise is really coming with each version, and they're good surprises.

What do you think the biggest misconception is about architecting ASP.NET?

P.S.: I don't think it's a misconception or mistake...I think it's the lack of architecture. It's that people haven't thought about architecture, haven't thought about wrapping things up, haven't thought about the provider model. I think that's the biggest problem we see out there. I go into a lot of shops to clean up...and I walk in and there's code all over the place, and a lot of the same duplicate code all over the place. That's lack of architecture.

It's more that people don't think ahead of time; they don't think about building classes, creating things that are generic that they can reuse. They're just so heads-down coding on the business problem they're trying to solve, they're not focusing the big picture.

About the Author

Becky Nagel is a contributor to Application Development Trends. She is the editor of ADT's sister sites CertCities.com, TCPmag.com and Redmondmag.com, and is co-editor of RCPmag.com. You can contact her at [email protected].