Saturday 26 March 2011

UpdatePanel and JQuery Tabs CSS losing StyleSheet on update

This problems always seems to happen when you least expect it, or when you think that browsers would have come to realise this is an issue.  Anyway, I came across this problem last week and not just in IE, but also Chrome and Firefox.

I have a default.aspx page with a user controle, unit1.ascx.  Unit1.ascx has a user control  ImageList.ascx inside that.  This has a jQuery Tabs control inside that.


First clue on solving this was UpdatePanel Css StyleSheet upon partial-refresh bug in IE

However, the solution was fairly simple in the end.

replace the following




This captures the partial load and makes sure the jQuery is fired, although the state has been lost (We'll deal with that in a minute).  But looking at the memory leaks using sIEve more worryingly is that each time the updatepanel refreshes the amount of memory used by IE is increased. (thanks to http://www.codeproject.com/KB/ajax/jqmemleak.aspx  for pointing this out).

Adding the following disposable method in the jQuery helps to resolve this.


Now to the previous issue, the state of which tab was clicked.

All we need to do is capture the number of the tab selected, place this in a control that isn't affected by the update panel, then pas it back after the update.

To do this we need to make sure we get the value as an int but also the correct asp.net control from its id.  To do this we use ('[id$=hfSelectedTAB]') instead of $('#hfSelectedTAB').

below is the final code block






Many thanks to http://www.dotnetfunda.com and Stackoverflow

Thursday 27 January 2011

Project Management and Influence Charts

For the past three years I have been theorising the use of Influence Charts as part of the decision analysis of Project Management.  Original I was trained in the use of Prince 2 methodology, but the past three years I have used and introduced Agile(scrum) into several companies I have contracted with.  The constant with all IT Projects is the number of differing influence there are in scooping and managing these projects.  This doesn’t matter if it was using Prince 2 or Agile methodology.

One of the most common influence people think of is the personnel link, such as the Forrester Social
Influence Chart (http://chainringaction.blogspot.com/2010/03/forresters-social-influence-chart.html , Last Accessed 27 Jan 2011).  There are other influence charts, such as Newark’s soil impact chart (http://en.wikipedia.org/wiki/Newmark's_influence_chart , last accessed 27 Jan 2011). However, there are many other influences that impact the development of software and what complicates it even more is that many of these influences change over time, often referred to in Agile as Impediments.

To help me plan and control software development I developed a method of charting these influences as a way of understanding the whole picture. Now I have seen it work, although I am still developing it, I have
decided to share my experiences so far.

Typical influence types:    

  • Fixed – Never changes.  Such as the core operating system
  • Static – Not intended to change, but can be extended.  Such as the expected browser in web applications 
  • Growing – Amount of influence can increase depending on external changes.  Such as the addition of a new page means changes to menu structure 
  • Reducing – Amount of influence depending on internal changes.  Such as a reduction on the number of Browsers being supported (Static) 
  • External – An influence that is external to the development but must be aware of.  Such as Press release dates, advertising etc. 
  • Crossover – This is an external influence that has direct impact on project.  This can alter state and become a Static or External influence depending on interaction of Growing or Reducing influence.  Such as expected number of site visitors or external api connection 
Influence type graphical representation:

Fixed

Static

Growing

Reducing

External

Crossover


Full Graphical Representation:

As you can see these can grow very large, but it does give you a larger picture on what is happening during a project.

Over the next few weeks I will show how these charts can help with controlling the backlog and  impediments in an Agile scrum methodology.