BusinessRx Community

Dedicated to the advancement of software, technology and the people who devote their lives to it.

Welcome to BusinessRx Community Sign in | Join | Help
in Search

BusinessRx Reading List

These blog entries are written by industry experts and leaders. We consider this content to be a good read for any software developer or web technologist.

ASP.NET Best Practices, IMO

In the comments of one of my recent posts someone asked me what I would consider ASP.NET best practices to be, so here is a quick list of what I would do if I was starting a new ASP.NET project today.

One overall comment first: The web is not just another way to write .NET applications. The web is an entirely different way of developing applications, if you don't know XHTML, CSS, and Javascript you need to learn it before writing ASP.NET.

Avoid Controls and the Page Controller. I have always used ASP.NET controls and the standard ASP.NET page model. But after playing with Rails and MonoRail I would go with a template and front controller approach instead. I would most likely use MonoRail, or some other MVC method.

Use CSS. This should be obvious, but I see tons of inline styles in ASP.NET applications. Inline styles just make your pages slower and most likely less consistent.

Use AJAX the right way. I prefer Ajax.Net Pro, but it's not really about the framework. Use direct Ajax and not indirect Ajax. Update Panels and the like send the entire request and response over the pipe which is much slower than just sending and receiving the data you need.

Use divs instead of windows. Popup windows often get blocked and window to window interaction is usually bug ridden. Stick with a nice div based modal instead.

Watch the Pipe. Get in the habit of using Fiddler and running your application to watch what is going over the pipe. The least amount of requests and the smallest responses is the goal.

That's all I can think of for right now, what are ASP.NET best practices in your opinion?

-James
Published Friday, August 31, 2007 4:43 PM by .Avery Blog

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems
'