Wednesday, April 4, 2012

Sixth Client Meeting

Hi,

We had our sixth client meeting.  It went pretty well, actually, all things considered.  Importantly, the renderer worked exactly as expected.

There was some misunderstanding about the method of moving the template's menu to the front (a problem we had encountered that I had quickly written a fix for).  Ackley suggested that the template simply be moved in front.  The issue, as I (incoherently) attempted to explain, is that the template's parent could contain other things that shouldn't be in front.  I drew a pseudocode diagram as follows:

//template's div
<div ...stuff...
    -images
    -text
    -menu
//page's div
<div ...stuff...
    -images
    -text

My current algorithm is simply to take the menu out of the first div and add it into the second.

Ackley suggested simply changing the z-index of the menu instead.  Unfortunately, HTML doesn't work this way, so that wouldn't change anything.  Then, he suggested removing both div tags so as to put all the components into the same level.  I objected that this would raise positioning problems.  This is true, but as Ackley pointed out, those are workable and just because something is hard doesn't mean it's not the right solution.  What I was intending to say was more that those div tags contain important information (among which are positioning).  This includes backgrounds, images, etc. that the page really does need to override.

Now, again, that's not to say that this is impossible.  In subsequent discussions with Theo, we established that removing the top level hierarchy is indeed possible functionally--it's just not as simple as Ackley thought.  You can't just delete the top level hierarchy.  SmartGWT adds it in for a reason, and it's more subtle than just setting up styles and positioning.  Like I said, it's not impossible to remove, but it's not something that necessarily improves the result in terms of sensibility.

This brings up another point.  The current algorithm works and could be trivially generalized for anything else we want to move.  However, it maintains the current hierarchy.  We could also do (a version of) what Ackley suggests and remove the hierarchy (or at least combine it).  Doing anything else, Ackley calls "a hack"--but I definitely think that's too narrow of a perspective.  I'm not sure what the "right" solution is--and the current algorithm has intrinsic merit--you're separating the template's stuff from the page's stuff--transferring to the page everything that really should be there in the first place, so it makes sense.

I'll admit that don't know what the "correct" algorithm is, in terms of sensibility.  But, I will be discussing this with the group, and I will ensure that we have that algorithm for next week's meeting.

Ian

No comments:

Post a Comment