José M. Pérez

José M. Pérez

Engineer at Facebook and GDE in Web Techologies. Ex Spotify.

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...

Changing job

This week I change jobs, from Signum Software to Tuenti.

Working at Signum Software I have met a group of very professional people and I learnt a lot from them. It is a pleasure to work at a company that takes care of their own products, always trying to improve them. And for a developer it’s even better when that product is a complete framework that optimizes and makes your work easier.

Continue reading about Changing job...

Front End Tech Talk - Facebook

Yesterday I watched this Front End Tech Talk by Facebook. I found it very interesting because they explained how they faced the problem of having a lot of javascript code and how they managed to reduce it. I think this can be applied not only to a website of the size of Facebook’s, but also any other project where we could refactor existing code.

We had about 1MB of JS on the homepage

They realized they had a problem with so much JS code and they worked at different levels to shrink it. We had about of 1MB of JS on the homepage

Continue reading about Front End Tech Talk - Facebook...

The not so good web performance tips

Yesterday I was reading Zakas’ Performance on the Yahoo! Homepage slideshare presentation, and I got very surprised when I saw that Yahoo had realised that two of the wide accepted tips for improving website performance had not work so well for them. Yahoo's Home page

Continue reading about The not so good web performance tips...

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...

Updates on BigPipe using ASP.NET MVC

It’s been several weeks since I wrote a tutorial to implement BigPipe using C# and ASP.Net MVC. And I have just read a PDF from a presentation at Velocity China in which Changhao Jiang, from Facebook, explains some details about Bigpipe, as well as other techniques they use to improve Time to interact (both real and perceived), as well as data savings. These techniques (named Quickling and PageCache) are based on hijax and an intelligent update of specific content of the page instead of the whole page when data changes.

Continue reading about Updates on BigPipe using ASP.NET MVC...

Lazy loading Javascript: On-demand scripts to faster load times

Loading on-demand code can boost website performance in the sense that the browser does not need to request and execute Javascript code that is not needed. Depending on the script, a different approach can be taken to lazy load it.

Continue reading about Lazy loading Javascript: On-demand scripts to faster load times...

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...