Troy Hunt: 5 Minute Wonder - Troy Hunt

Sponsored by:

5 Minute Wonder

A 3-post collection

5 minute wonders: Finding lazy loading nasties with ANTS Profiler

There will be those who disagree with me (hi DBAs!) but ORMs totally rock. Object Relational Mappers have been around for a while now and you may know them by names such as LINQ to SQL, NHibernate and Entity Framework (among others). The idea of ORMs is that all the plumbing between entities in the app and entities in the database can be abstracted away into a managed framework so that data access can become a no-mess, no-fuss affair. As with many automated ways to build apps, ORMs have their pitfalls and one of the worst – and most common – is the dreaded “n+1” brought about by lazy loading. Here’s how an n+1...

5 minute wonders: From zero to hero with AppHarbor

In case you’ve been living under a rock this year, AppHarbor is one of the hottest things to hit .NET since, well, just about ever. It packages up the entire app lifecycle of source control, build, deployment and hosting and makes it dead simple; in fact it couldn’t be easier. It then adds a comprehensive collection of add-ons to do everything from persisting data (MS SQL, MySQL, MongoDB) to caching services (Memcacher) to load testing (blitz). And the best bit? It’s free. Zero dollars. Nada. Zilch. If you want to get a bit demanding then you start to pay money but it’s in the order of figures like $10 a month for...

5 minute wonders: The ASP.NET membership provider

Consider this guidance now deprecated! The membership provider stored passwords as a salted SHA1 hash which is insufficient by today's standards and easily cracked. Refer instead to ASP.NET identity which is a sufficient stronger and more modern implementation. Often times I’ll have a discussion with a software vendor or developer about implementing a particular piece of functionality or performing a certain task which I perceive as easy but they’ll come back with some sort of outlandish estimate. “Securely implement an authentication mechanism? 3 weeks please!” “Identity network performance issues in a web app? Hmmm, maybe 2 or 3 days.” And so on and so forth. Part of my day...