Monday, April 14, 2008

Anatomy of a web page – ISN Take Five Videos


1 - IIS - Intel Dual Xeon 3.6GHz (Irwindale) core machine 4Gb RAM w/Windows Server 2003 (32bit)

2 - SQL Server 2000 - Same configuration


1 ASP.Net (C#)

2 TSQL (Stored Procedures)


4 jQuery (

dimensions plug in

tool tip plug in


Greybox Redux (

5 Querystring ( Adam Vandenberg)

6 formatDate ( Svend Tofte)

7 Unobtrusive Flash Objects ( Bobby van der Sluis)

8 My Uploader Java Object (

9 Ajax.NET Professional (

10 West-Wind Web Tools (

11 Blip.Tv Wiki API Tools (

12 Google AJAX Feed API’s for reading RSS feeds

And more..

Where to start… I suppose you can visit the web page ( to see the end result but better to start on the back end to understand the integration.

We chose to write this software in ASP.Net C# and I wanted the entire web page to be able to run site agnostic so there is nothing really in the way of typical ASP.Net code-behind and controls. Since all the data in the web page is delivered with JSONP style implementation ( In my case the data set is small so it is delivered with the page itself as opposed to secondary calls. If the data set gets larger before the whole app gets re-written then I will go to Category based services calls for each subset of data.

For the ISN Video Repository ( we chose to go with for our video hosting over YouTube and you can see all our videos at and the community submitted videos at Our stakeholders wanted to build a site that contained all of our videos in one single place as to join all the intel communities together. Blip provides a REST based API ( and RSS feeds that make this all possible.

Steps involved in writing this web application:

Back End -

A> Database to keep a copy of the RSS feed data containing all the details for our videos.

First we need a database to synch our information and to be able to add more information. Microsoft SQL Server 2000 fueled by a BlipTv RSS feed and page=2 etc. (see a pattern forming here.)

Using RSS.Net from SourceForge provided us a nice easy way to get our RSS Feed data from BlipTv and only a few modifications to the code were required to make it internally for testing (proxy support required.)

B> Using a ASP.Net spawned thread timer to retrieve the data.

We wanted to make this happen on an automatic basis and therein lies some choices. 1> Create a batch timer script set to run on a interval. 2> Or spawn an ASP.Net timer thread within the web administration tool (where we are going to have the process monitoring anyway.) Batch process’s still require monitoring tools and debugging smarts so we chose the second option as the code is kept within the admin tool and this the monitors is in the same place.

I have a video up on the community site that shows off the “How To: ASP.Net Batch Processing via Thread Timer”

Considering how many times Blip has updated the RSS feeds, renaming variables, breaking this process I am glad I went with a spawned process thread under ASP.Net as it was much easier to manage and see errors from within the admin tool (if there are any that need to be addressed.)

So we spawn a timer thread to process all the pages in the RSS feed and then synch data to SQL. We never delete anything (anymore) as there have been times that Blip’s RSS feed has broke and deleted all our videos. When the RSS feed came back the code recreated all the links with new ID’s which made a good mess off things. We update for changes like description, tags, title, thumbnails, etc..)

Note: Blip recently changed the RSS to include a new smaller thumbnail and it appears that they made the older thumbnail into a much bigger image size (not 100% sure about the sizing change though.)

Note: They made some more fixes to video thumbnail sized and clarity fixing some very low resolution problems that were there for almost a month. Still small thumbnails but much better looking.

The admin back-end allows us to add some additional meta data to each video like an extra RSS Feed link to an ISN Communities or Author/Celebrity Feed related to the Video.

Front End - Above

From top to bottom (skipping some elements as the are composite of others):

CSS header graphic region with a simple jQuery click event to open the ISN Home Page

jQuery JavaScript library makes up a ton of the pages code as our group is in love with the simplicity end elegance that it imparts to web page client side code development. jQuery is lightweight and cross browser compliant and easy to get started with. The community support for jQuery add ins and UI are awesome!

JSON DATA in Page – BlipTv provides a JavaScript API that allows you to add a dynamic script tags to the web page which allows you to get back data and in a single JavaScript method called blip_ws_results(JSON_Data_Structure) and here is an example call that retrieves that data,m4a,mov,mpg,mp4,m4v,avi. This JSON Data structure contains everything you would want to know about the video for client side display (height, width, duration, media source, thumbnails, categories, timestamps etc.) Dynamic script tags (JSONP are easy to do in many JS libraries and manually

The TV set like theme of the player window is accomplished in a typical fashion of CSS repeating graphics and rounded images in boxes in the corners. I typically hate Photoshop mockups as they put a huge pain in the azz burden on the developers and this was no exception. Page mockups with rounded borders are just frell

The video player is managed via Unobtrusive Flash Objects or UFO for short and works quite well and provides nice progressive FLV format rendering. BlipTv does the translation from MOV,WMV etc uploaded formats so that save use the trouble of file hosting and pseudo streaming of files.

Larger View button uses GreyBox Redux to provide a popup window in a window.

We have a concept called “video series” as well where they can setup a series of videos. Series added it’s own complications for sorting and page display and I had to re-conceptualize it more than once to get all the end user page features working correctly but all in all I think it looks good.

Direct download links, embedding code are straightforward generations

Common Services – All bundled into JavaScript files and an .ASHX backend calling mechanism

Common options to most ISN pages are things like Email a friend, Support feedback, Page Comments, Rating (thumbs up or down)

Found typically around the Right hand channel page and feed options

Email a friend popup

ISN Support popup


AJAX provides us post ability for the submitted comments and a character counter of encoded characters to be posted. Akismet and Arne Brachhold provided the .Net API’s for anti-spam prevention

Voting on favorite videos – Notice CAPTCHA popup to help prevent spam voting.

The VIDEO CATEGORIES toolbar and QueryString JavaScript provide dynamic linking to categories with some simple URL parsing. By adding on ? Category=Community onto the end of the main page display it will auto-navigate the interface to bring these items to the main page display and shifts the toolbar. I had some issues with the timing of events when displaing categories that were off screen so I close this in a short delay timer in JS code

if (catg == "Virtualization" || catg == "CommunityUploads")

setTimeout( function(){ $("#vcatRight").click(); }, 500);

Mouse over video images and Videos Series hypertext links pops up the entire video description via the jQuery tool tip plug in and makes for a nice effect.

Sharing on the Right hand navigation seems to never get used so I am not going to talk about it here except to say that we gave the ability to upload community videos with a nice progress indicator upload Java Applet - My Uploader Java Object ( but again there has only been about one or two community submissions.

Last feature I would talk about if the search

Which works quite cool in that it goes through the entire data set and filters the display to only show the search for keywords. There was not enough time to write the search to be AND/OR capable so it just parses for single keyword and updates the display.


Good experience and brings into play quite a few API’s and conceptual technologies

CONS: What I would do different If we do this app again.

I would toss all PhotoShop look and feel as it is entirely unnecessary marketing bloat and does not pertain to developers/technologists who have a different mindset.

"Entirely AJAX" stinks for Google search crawlers and makes an big loss. You need to have URL’s to crawl or an alternate method for Google to follow to pull all the links.

Page is very large - Small fast page size would be much better end user experience as opposed to the bloated one that it is right now.

Provide easier cross linking of ISN Communities and Forums for a better social experience. Blogs are linked in but not always obvious and our Forums are not linked on these pages

No comments:

Blog Archive