Associated Press is a 150 year old institution, the largest and most trusted newsgathering operation in the world. Their video archive includes over 1.5 million global news and entertainment stories dating back to the beginning of the 20th Century.
Their brand new site, AP Video Hub offers curated archive content mixed with breaking news topic pages, for preview and download in a variety of broadcast-ready formats. I was the front end developer on the project.
The beta version of the site has just gone live (April 2012) and is already generating major interest from media organisations.
Progressively enhanced single page app
I’d previously seen the History API used in the great Github interface with real URLs and ajax-powered view switching. Where the browser supports the History API, I intercept the any clicks on the links and reload just the main content panel using Ajax. The Ajax call is routed to the same server side template that’s used for the whole page load, and only the section of that template for the main content area is returned.
This setup gives the following benefits -
- the History API means the URL changes as you switch views so you can bookmark / revisit.
- speed – only a portion of the page is reloading so it’s very fast
- you only need to maintain one set of server side templates, and either the whole template is returned eg. if the user has hit a URL directly; or if an ajax request part of the template is returned
Code structure and testing
I also wanted to find a way to get higher-level functional test coverage and picked up Selenium IDE for the first time. I rate it better than Selenium 2 / Webdriver as a tool for developers to generate and run tests quickly, which I think is critical for test coverage to keep pace with development.
The site is iPad and iPhone compatible – an HTML5 video container used instead of the default Silverlight.
It’s been a great contract to work on – a talented team and a trusting and accessible client in AP. And I’ll miss the daily dive into Camden’s food stalls :)