Posts tagged ‘Architecture’

DevConnections – Architectural Decisions for ASP.NET

This talk was given by Michele Leroux Bustamante.

Michele went into a lot of detail about implementing globalization in ASP.NET. I have not done any globalization yet, so this was pretty much all new to me.

There are a few way you can do this. You can duplicate all the data and pages in each culture. A better way is to put all the culture strings into a resource, and pull the right one based on the user’s culture. You can use resources to manage assemblies, images, string, and more.

You can set the current threads culture based on the setting of the user’s web browser, or by a user setting. A user setting would be letting the user select the culture they want.

Her suggestions for globalization is, if there is any chance that you may need it, plan for it up front. You’ll save yourself months of rework.

She talked a little about output caching and the ways of doing this. ASP.NET kernel caching has 10x performance gain, where as user caching has 3x performance gain.

She talked about distribution of functionality. This is something I’ve heard that is a good thing to do, but no one has given me a reason as to why. Michele explained this quite well.

You should consider using a service boundary for security purposes. Instead of using a n-tier architecture, call a service that does the data access. This way, if a hacker compromises your site, they’ll only be able to go through your service, and won’t be able to access your data directly. To reduce the attack surface, use role based access for your service methods. Run with least privilege.

AJAX can only use HTTP services, so if you want to be secure, use a "router" service. The router will forward requests to the real service. Then you can verify that the request came only from the router.

Michele talked about load balancing considerations; what to do, and what not to do. I’ll write the to do here. Create new proxies and cache the channel. Limit downstream service calls.

Michele went in detail on these subjects and had many examples. I just touched the surface of her talk here.