Case Study: Club Wedd 101 Things

http://apps.facebook.com/targetclubwedd/

Background

101 Things is a site for the Target brand, Club Wedd, that allows fiancees to browse through 101 different activities that they can do as newlyweds.

As a couple, they can create a list of activities they would like to do in the future, check off activities they have completed, and attach a comment and photo to preserve it all.

Attached to every activity is a collection of products they can add to their Target wedding registry right from the site.

The Challenges

The Stack

Challenge: Build a Flash-like site, without Flash.

Choosing a framework

Since we were tasked with building such a large application in JavaScript, it quickly became clear we needed a framework to help us organize our app.

Because we were going to be sitting on top of a (mostly) RESTful backend, we went with Backbone.

Why Backbone?

ClubWed.Activities = Backbone.Collection.extend(
{
  model : ClubWed.Activity,
  url   : "/activities"
} );

Challenge: Handle tons of dynamic content from the backend.

Mustache

Mustache allowed us to translate the copious amount of data from the backend into our views cleanly.

<ul class="carousel">
  {{#products}}
  <li>
    <div class="jcarousel-item-wrapper">
      <div class="product">      
        <img src="" width="52" height="52" alt="Temp Product Icon">
        <div class="name">    
          {{#hasBrand}}
          <span class="bolded">{{brand}}</span><br/>
          {{name}}
          {{/hasBrand}}

          {{#noBrand}}
          <span class="bolded no-brand">{{name}}</span>
          {{/noBrand}}
        </div>   
      </div>
    </div>
  </li>
  {{/products}}
</ul>

Challenge: Use a custom web font and @font-face.

Some pitfalls

Font Squirrel

http://www.fontsquirrel.com/fontface/generator

Compass

If you’re familiar with web fonts and @font-face, you know it’s very finicky.

Your CSS needs to be perfect to include web fonts across browsers.

Luckily, there’s a compass mixin for that!

@include font-face("this name", font-files("this.woff", "woff", "this.otf", "opentype"), "this.eot")