Posts with tag asp net mvc

BigPipe in ASP.Net MVC using Razor

It’s been some time since I posted the tutorial to implement Facebook’s BigPipe using Microsoft ASP.Net MVC. And since then, Razor view engine has increased its presence for providing a way to implement cleaner views and make it easy to avoid ending up with spaghetti code.

Though now I am focused on PHP, in my previous job we decided to migrate to Razor as soon as possible since it is a more convenient way to implement ASP.NET MVC views, while you can keep your models and controllers code the same. However, Razor does not behave well with the proposed BigPipe solution due to its way of managing the partial views code. You can’t write to the output in your inner views using Response.Write() nor flush because Razor renders pages from inside out. Thus, the inner most view is rendered and written to a buffer, and then the partial view / content place holder where it is defined, and so, until the outer most layout is reached. Then, the content of the buffer is written and flushed to the browser.

Continue reading about BigPipe in ASP.Net MVC using Razor...

AsyncController: Server-side parallelism

I usually face asynchronous WPO from the browser side, for instance making async requests to include Javascript files or AJAX-requesting any other content.

Continue reading about AsyncController: Server-side parallelism...

Tutorial: Implementing Facebook's BigPipe Using ASP.Net MVC - Part 3

Parts of the tutorial

  1. Introduction to BigPipe
  2. How ASP.Net MVC fits in the model. Registering and generating pagelets
  3. Browser implementation of BigPipe. Loading pagelets and their resources effectively
  4. Check out the demo Visual Studio solution

In this third part of the tutorial to carry out a technique similar to BigPipe I will cover the browser side. BigPipe is not only focused on server side, but it also sets how the different resources that our pagelets need have to be requested and loaded in the document.

Continue reading about Tutorial: Implementing Facebook's BigPipe Using ASP.Net MVC - Part 3...

Tracking action execution time in ASP.Net MVC

Using filter attributes we can add features to our actions or controllers easily. In this case, I have implemented an action filter attribute that stores how much time has taken to execute an action.

Continue reading about Tracking action execution time in ASP.Net MVC...