Top 10 Best Practices for Production ASP.NET Applications
In no particular order, here are the top ten things I’ve learned to pay attention to when dealing with production ASP.NET applications. Hopefully they will help you save you some time and headaches. As always, your thoughts and additions are welcome.
Daptivate & by Kyle Beyer – Top 10 Best Practices for Production ASP.NET Applications
Regular Expressions cheat sheets
Regular Expressions (RegEx) give me a headache most of the time. That’s where cheat sheets like these com in handy:
http://www.ilovejackdaniels.com/cheat-sheets/regular-expressions-cheat-sheet/
http://regexlib.com/CheatSheet.aspx
http://www.funduc.com/regexp.htm
http://krijnhoetmer.nl/stuff/regex/cheat-sheet/
http://opencompany.org/download/regex-cheatsheet.pdf
Secured Subversion on Windows
Recently I decided that I want to move to Subversion 1.1, and have a central repository that manages all my code. The main reason for this was that I got myself a laptop, so having a file-based repository1 that I can access from my laptop.
Being security minded person, I want to tunnel this through SSH, so nobody could look at my valuable code – I’m currently implementing bogo-sort, no less 🙂
Design Patterns and Refactoring
Design patterns
In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn’t a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.
Antipatterns
The AntiPattern may be the result of a manager or developer not knowing any better, not having sufficient knowledge or experience in solving a particular type of problem, or having applied a perfectly good pattern in the wrong context.
Refactoring
Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.
Troubleshooting Expired ASP.NET Session State and Your Options
I have a love/hate relationship with the ASP.NET Session. It’s such a convenient place to put things, but when you start putting applications into production there are a number of less-than-obvious edge cases that can come up and bite you.
Most often the Session is used when managing state over a long process like a multi-step wizard or questionnaire. However, when people use the Session, they often lean on it a little. They’ll bake it into their design so deep that when it doesn’t work, they’re screwed. That’s not to say they shouldn’t be able to lean on it, I’m just saying that there’s a lot of things going on with Session (not just on ASP.NET, but other frameworks as well) in order to get it to look seamless.
Scott Hanselman’s Computer Zen – Troubleshooting Expired ASP.NET Session State and Your Options
CSS Reference
One of the most complete and comprehensive references about CSS from the guys of SitePoint:
Web Developer’s Field Guide
This site is pretty much a collection of links that I’ve found very useful over the last year, or so. First, and foremost, I must thank Vitaly.Friedman for getting the vast majority of them together all in one place for the first time. I used his version of this page for many months before taking on the not small task of creating my own. Why would I do such a thing?
PNG in IE6 and IE7
Two related posts about the same problem. The solved mine 🙂
While working on a new site, I started playing around a little more with 8-bit PNG files, comparing them to GIFs. In a few cases the PNG was smaller (it didn’t used to be that way, but perhaps Photoshop CS2 does a better job of compressing PNG files or something), so used it. All was good until I started testing the design in IE, where the colors were all off. Here’s a breakdown of how the same graphic (placed as a CSS background image against a background color equal to its own background color) rendered between the two browsers:
Easy Reader – PNG color oddities in IE
In setting up the new vehicle details page for DDC, I noticed that the background color for the 24-bit PNGs did not match the css background color, but only in IE6.
Searching online, I found this is a known bug with IE that stems from a flawed interpretation of the PNG’s gAMA setting. It’s fantastic that the IE team added PNG alpha transparency to IE7, but apparently they kept the gAMA bug in IE7 to make sure browser compatibility specialists keep their jobs for years to come.
PHP Code Beautifier
This tool is designed to beautify PHP code, applying most of the PEAR standard requirements to it. It can even process really scrambled scripts, e.g. all code in one line, and thus may help you to get scripts into a more readable form.
HTML Entity Character Lookup
Using HTML entities is the right way to ensure all the characters on your page are validated. However, often finding the right entity code requires scanning through 250 rows of characters.
This lookup allows you to quickly find the entity based on how it looks, e.g. like an < or the letter c.
Log4net: simple way to use in your Asp.net application
Log the actions of your applications is very important especially when you develop new features or develop very difficult logical business.
But it is also important when users use your applications to understand the critical issues or problems.
To implement quickly the log operations Apache developed an opensource library for .Net developers.
Emanuele’s Blog: Log4net: simple way to use in your Asp.net application