In-Depth

Live from VSLive!: 5 Questions with Paul Sheriff on Architecting ASP.NET

.NET author and consultant Paul Sheriff discusses the challenges and opportunities in architecting ASP.NET.

In his VSLive! pre-conference 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 in .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 though 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 the former editorial director and director of Web for 1105 Media's Converge 360 group, and she now serves as vice president of AI for company, specializing in developing media, events and training for companies around AI and generative AI technology. She's the author of "ChatGPT Prompt 101 Guide for Business Users" and other popular AI resources with a real-world business perspective. She regularly speaks, writes and develops content around AI, generative AI and other business tech. Find her on X/Twitter @beckynagel.

comments powered by Disqus

Featured

Subscribe on YouTube