Monday, October 18, 2010

DevReach 18+19 October Sofia, Bulgaria (part3)


.Net tips and tricks

1. SQL injection prevention
<%: ... %> -- for and it prevents SQL injection etc
Use it instead of <%=...%>

2. Trace it
-- better for debugging

add as a attribute in the page xml ->  
makes the other traces to be colored in red

3. Caching - Update Callback

He's showing some web caching with load testing.

<% OutputCache ... - he increased the performance for a page showing database entries from 25 requests/sec to 250 req/sec.

4. use IDisposable when net using WCF
and "using()"

5. Action / Func keywords for lambda
Don't Repeat Yourself - principle :) We know it. Nothing new.
Action is for better logging.

6. Extension methods:
Search for some extension methods to improve given sites. 

7. Testing different vesions of configurations
custom config sections

8. WebForms - don't use Labels too much
9. WebForms - ViewState - be careful with its usage
- move the viewState to the bottom of the page because of bots collect a few thousand bytes from a page to scan it. Put your data to the top!

10. Some tools he uses everyday
LinqPad -
Reflector - - similar to Java Decompiler - see the source of a class file
FireBug - for Firefox
Fiddler - for IE
ViewState Decoder -


No comments:

Post a Comment