ASP.NET
MySQL rand() benchmark, don’t use rand()
0The need to get a certain amount of data randomly to present on a website so that your audience can view that your website is alive and, in the most cases, to be aware of the variety of products you have to present. It’s very common as also the performance side effect.
There are so many approaches for rand() replacements: ‘rand() mixed soup variations’, using join’s, etc but I found that with queries over very large tables none of them actually ease you from the pain of having a lot of heavy queries over your database.
Rand is not efficient and if you need to retrieve random rows having several columns on the where clause it’s even worst.
App_Offline.htm, update your site/app the right way
0Have you ever thought about an easy way to stop all processing and requests during major app update or when you need do make some critical update that causes all sessions to go dead? IIS7 supports this new tweak called App_Offline.htm.
(more…)
Handling ASP.NET PostBacks with URL Rewriting
2Today a co-worker crossed with an strange error (Validation of viewstate MAC failed…) when posting a contacts form. Strangely the error only happened when using the re-written url off the contacts page (contacts/), calling contacts.aspx worked flawlessly all times.
Is IsPostBack confusing? No way…
0Last year I’ve posted a reply on the ASP.NET Forums that tries to clarify the most common error and misunderstanding about postbacks and in particular related with the page life cycle.
Page life cycle have several things to consider and the behavior must be understood for the several possible scenarios: regular aspx pages, master pages, using ajax, user controls (acsx) inside regular aspx pages, etc. Read more about page live cycle here.
The best web application framework
0So many times we see IT professional’s discussing about what is the best technology related to a certain area. Being a professional web developer I found myself many times observing (or involved) a discussion on the subject and trying to avoid to get in the middle.
The truth is that sometimes it’s hard to go away without throwing my own perspective. Yesterday I did that and my conscience is telling me that I was a bit fundamentalist defending my own perspective. (more…)


