JSFoo 2014

JavaScript as the centerpiece of a complex web stack

Aakash Bapna

@AAKASH_

UI @ Flipkart: A Node Direction

Submitted Aug 10, 2014

Flipkart.com sees a pretty huge number of daily visitors across the website. Serving content to them, reliably and efficiently is a problem which is only getting more complicated with more users connecting to the internet via mobile and more users getting comfortable with online shopping.
In this session, we talk about how we came up with a new framework for serving front-end content efficiently and effectively. Using a good mix of new technologies like Node, Express and ReactJS, we are creating a way to serve content in a beautiful manner to the user without compromising on developer comfort.
Specifically, amongst other things, we talk about isomorphic javascript, profiling node code and an efficient css delivery mechanism which balances code optimization and delivery optimization.

Outline

I will give an insight into the overall philosophy and the architecture we developed for moving away from a PHP based stack to a Node based stack. We faced a lot of problems like prioritizing maintainability, code readability, testability, availability, extensibility and reusability. Figuring out if a certain change might help out in the future bigtime, or is it just a case of premature optimization? How do we migrate the core stack of a website without any downtime or slowing down the feature launches? Single page apps are the bee’s knees, but what about SEO? These are just some of the questions we faced and tried finding the answers to.

Some things we will definitely touch upon are:

  1. Code maintainability: a small team of 3-4 people might come up with a new and better way of doing things. But how do you get 100 or 1000 other people to work on it without adding hacks and ‘quick fixes’ every day?
  2. High availability: For a website like Flipkart.com, 100% uptime is very important and keeping servers up and running in case of high loads, errors or attacks is crucial.
  3. Rich UI and Performance: Customers expect a fully functional, rich interfaces across all their devices. And any lag or jank is a strict no-no. Building rich UI without compromising on performance is key.
  4. Testability: Testing is important and helpful. No matter how tedious and boring it might seem, putting some time in it definitely helps in the long run. One key point here being, what should be tested and what is ok to be left to manual testing only.
  5. Profiling: Finding out what is slowing down the application and why
  6. Isomorphism: Sharing code between client and servers makes the development much more efficient as you can “code once, run everywhere”
  7. CSS: “inline css? NEVER!” That might be true in a lot of cases, but we will see how some of the old idealogies no longer apply, and might actually be slowing the internet down.

Requirements

An open mind :)

Speaker bio

I am a UI engineer at Flipkart. I’ve been active in web development and UI for over 4 years. Having solved many interesting problems with my team, involving scale, cross-browser issues and UI performance, my interest in UI just keeps increasing day by day!
On the personal front, I love music, photography, travelling and driving. And its always fun to hack with new libraries and frameworks, trying to see what they can do, and what I can build using them :)

You can find me on:
Twitter: https://twitter.com/_abhinavrastogi
Github: https://github.com/abhinavrastogi

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

JSFoo is a forum for discussing UI engineering; fullstack development; web applications engineering, performance, security and design; accessibility; and latest developments in #JavaScript. Follow JSFoo on Twitter more