All Things oDesk
July 18, 2012 by Yiota Tsakiri

Yiota Tsakiri, a Product Architect at oDesk, helped lead the development side of oDesk’s recent site redesign. She and her team worked tirelessly to launch the new site—which includes the new blog you see here! Here is an inside look at some of the changes they made.

One of the reasons I love my job at oDesk is because I actually have the freedom to choose and implement technologies I like, while at the same time having the opportunity to impact the lives of millions of people around the world who use our site for their work. In my time at oDesk so far, the visitor site redesign was one of the most challenging and exciting projects I have worked on.

We had to essentially rewrite the entire visitor site, and as a first step of this process, we had to move our homegrown CMS into a more robust and full-featured one. Knowing that we’ll eventually need to develop the rest of the visitor site in the same infrastructure, and after benchmarking drupal vs django-cms (see here for the analysis), we picked django-CMS. So currently, all of our static pages are built via our django-CMS installation.

Building static pages with reusable SCSS components

One of our primary goals was to be able to use reusable CSS components in our static pages, so we don’t end up with a high level of customized CSS in our static pages. We were using Compass to define CSS components but we wanted to expose them in our CMS also, so we had to create a custom plugin for django-CMS. The plugin includes five basic fields, which you can see here:

And the way this works is as follows:

class SassStylesheetPlugin(CMSPlugin):
    name = models.CharField(...)
    css_media = models.CharField(...)
    scss_body = models.TextField(...)
    compiled_css_body = models.TextField(...)
    upload = models.BooleanField(...)

    def _get_compiled_css(self):
        compiled_body = scss_compiler.compile_scss(self.scss_body)
        content = '<style type="text/css" media="%s">%s</style>' % (
        self.css_media, compiled_body)
        if not self.upload:
            return content
        return compressor.output()

    def save(self, commit=False):
        self.compiled_css_body = self._get_compiled_css()
        return super(SassStylesheetPlugin, self).save(commit=commit)


The plugin reads the input SCSS and compiles it to a CSS output. The compressor we use is django-compressor and the SCSS compiler we use is pyScss.

Writing static pages this way in our CMS becomes easier and less messy. CMS administrators can @import reusable SCSS components that are globally defined in our stylesheets and use them in their pages. As a result, we can have static pages that are using less CSS code and actually look and feel similar to the rest of the site.

Using S3 as a shared resource

One of the things we always have in mind while developing the visitor site is that we are operating in a distributed environment in the cloud—our services are replicated on multiple EC2 instances in multiple availability zones. As a result, a single server instance failure or even a whole availability zone failure should not impact our reliability.

When admins create static pages or upload content such as images, these files need to be stored in a central location so that they can be accessed by all servers. S3 provides an ideal solution for this, as it is a storage service that can also serve the content directly to the visitors.

Every time a page on the CMS is modified we automatically compile the SCSS to CSS, we create a file and upload it to S3 (just as we do with images and other files) and then just append in the HTML of the page a link to the stylesheet.

Yiota Tsakiri

Product Architect

Yiota Tsakiri is a Product Architect at oDesk. She leads oDesk’s visitor site and blog projects, working to provide the end user with an excellent experience. Before joining oDesk, Yiota worked at Atypon Systems as a Software Engineer and graduated from Illinois Institute of Technology with an MSCS.

  • Apple imac discount

    okay I thank your site about the redesign. is quite complicated to learn html code. the article that you created, I wanted to learn the html code for all the websites I’ve made.

  • Nina

    I like how the site redesign turned out. Its much easier to move around and work with stuff now.

  • Charles

    Now we’re talking, site feels alive.Good stuff

  • NY

    The new site design is absolutely NOT user friendly for the providers or the clients.

    Please reconsider your design and also spend some time on the oDesk forum reading the very unhappy comments from those who make oDesk what it is.

  • http://Internet abdssamad

    Internet est un système d’interconnexion d’Autonomous System et constitue un réseau informatique mondial, utilisant un ensemble standardisé de protocoles de transfert de données. C’est donc un réseau de réseaux, sans centre névralgique, composé de millions de réseaux aussi bien publics que privés, universitaires, commerciaux et gouvernementaux. Internet transporte un large spectre d’information et permet l’élaboration d’applications et de services variés comme le courrier électronique, la messagerie instantanée et le World Wide Web.
    Internet ayant été popularisé par l’apparition du World Wide Web, les deux sont parfois confondus par le public non averti. Le World Wide Web n’est pourtant que l’une des applications d’Internet.
    L’accès à Internet peut être obtenu grâce à un fournisseur d’accès à Internet via divers moyens de communication électronique : soit filaire (réseau téléphonique commuté (bas débit), ADSL, fibre optique jusqu’au domicile), soit sans fil (WiMAX, par satellite, 3G+). Un utilisateur d’Internet est désigné par le néologisme « internaute ».