I have had this idea in my head on HOW I wanted to solve a problem, but never really knew if it would work. I didn't KNOW because I am not very familiar with Tiles. So, today, I left work and brought with me my trusty Struts In Action book, my headphones, and a serious desire to at least TRY my idea. Two and a half hours later, it works.
I am a bit concerned though. I don't think I am doing it very "well" and I doubt that it will scale properly. Basically, I need to know what is in a List at the top and bottom of the page. The example I used for my test was a list of items in a shopping cart, and have the highest and lowest priced items displayed at the top and bottom of the page. So, I chunk the List into the request after filling it. Then I have a Tiles Controller grab it, get the pertinent information out and send it out to its tile. Then iterate over the List again for display.
Here are the two things that bother me. What if I want to send more than one list to be displayed? And do I want to iterate over each List twice? One strategy would be to fill the hi/lo bean while I am filling the list... I mean, the list is in a containing ActionForm, so I guess that ActionForm could hold the hi/lo information about the Lists. That kills the double iterate. I am thinking outloud here, and rambling, so I will go to bed and think about it some more.
I am secretly impressed that I started a brand new project from scratch and finished in 2.5 hours. Yeah ME! :) Props to Patrick for his awesome articles about Tiles, they really kick started this whole process.
Posted by carl at April 12, 2003 02:47 AM
So that's all you needed, eh?
For me, if and when I actually succeed at something I'll go back and look at my steps and try to find some sort of pattern. I've been doing that for years. The end result has been a 93.7% reliable "creative process" that I can pull out of my back pocket when all else fails ;)
Posted by: Edward at April 15, 2003 01:06 PM
Yes, just 2.5 hours. But I must admit. There was much reading, thought and consideration that went on before I sat down to write code. I think the valuable thing that actually happened was that I continued learning about the problem and the solution even after I finished the test.
Posted by: Carl at April 17, 2003 12:23 AM
Comments