« Optimizing TheLadders Website for the iPhone | Main | YSlow Review »

Dynamic Entity Framework

Having a high number of web-pages means that the Product team keeps demanding for a variety of dynamically generated web components like popups and sliders on the pages. I will call them Dynamic Entities or DE henceforth. Currently we support three types of Dynamic Entities - DE's on our website. The most popular is the cloudover, which is nothing more than a popup having the focus while graying out the parent browser, thus actively forcing the user to act. Sliders are other user attention grabbers; these are small in size and slide out from the navigation tab, but they do not get the user focus. The last one is the good old popup which can be closed or ignored by the user; needless to say these are used only when the user should be given an option to ignore it, if he wishes so.

The framework has some basic code constructs like a small controller which applies the various rules such as sampling rate, maximum number of samples, views/ web pages containing these dynamic entities, entry conditions, recurrence conditions and exclusion conditions. All the DE's are available as rows in the dyn_popup table; an interceptor filters over each of the user request and delegates to the framework. It applies the various rules of all the DE's and chooses one to be shown. Each web page has a component which triggers the DE if it has been selected and passed to the page by the framework.

All the visitors to the website are not shown the same content. There might be slight differences in wordings, placement of a link or availability/unavailability of a field in a form. These help in fine tuning the site and also keeping a control group of users who are not exposed to a campaign. DE framework takes care that only a specified percentage of the visitors be exposed to a DE (sample rate), and that the campaign be stopped after the specified number of total views (max samples).

Two key concepts are 'Entry Conditions' and 'Recurrence Conditions'. Entry conditions for example can be used to distinguish a specific type of targeted user such as guest, basic or premium; or the user hitting a page second time in a session; or the user haven't visiting an important area of the website for a long time. Recurrence conditions allow a DE to be shown multiple times such multiple times in session, month or even once in a lifetime of a user. It helps to have a separate construct for each condition, although they may all derive from a single abstract type thus providing a convenient interface.

As soon as a user requests a page, framework picks up the associated DE's for that page, 'Entry Conditions' and 'Recurrence Conditions' these are checked and non-conforming ones are removed. Selected DE's are fed to an 'Exclusion Manager', which applies exclusion conditions to exclude the ones not needed, and then the first one in the list is selected to be shown to the user.

Needless to the say that all the information about a DE being shown should be entered in the database with the various parameters for Business Intelligence and data-warehousing purposes.

TrackBack

TrackBack URL for this entry:
http://configure.goodadvice.theladders.com/mt-tb.cgi/4811

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)