10-27-2011, 10:45 PM,
|
|||||
|
|||||
TDD with Curl (part 3)
Test-driven development does not mean ALWAYS having to take tiny steps - just that when the need arises, that you must be confortable proceeding by small increments. So I have taken a large step and built a prototype (the file is attached.) Building the prototype raised many testing issues which belong on a ToDo list. Attached below are also two snaps of the prototype as normally extended and as compressed. Two issues which may arise can be seen in the elastics.curl file which is attached. One issue can be seen when not using a Label on a CheckBox: compressing the box will compress the active area of the actual "check-here" graphic. But the Label itself requires to be set to compress correctly. Another issue arises when using TextFlowBox for a single line of text, such as our "Dawson Creek" in the center of our test widget. The simple way to prevent a line from wrapping as a box compresses is use escaped spaces in the text, as in "Dawson\ Creek". But was it a requirement that our box be able to shrink correctly? Well, a mobile user may be the most likely user to want a view of which towns are in which direction, so we need to add ToolTip to the ToDo list. And we need to test towns with rather long names both as the "central" location and as the "geo-link" locations. And when you get far enough north, there may be only one town to the SE and one to the SW – so we have to test for links from 0 to 8 and then n > 8 as an error ... I started the prototype in a Curl live-doc {example } window and then moved into Eclipse where most issues were caught by the CDE. What is important now is to set aside the prototype and return to our next tests. What the prototype does contain is a great deal of redundant code and a great many constant values rather than variables. And we should remember that Curl now has ValueClass as an option, should that prove useful. For the final widget we may want to add to the ToDo list both StyledControls and StyleSheets with StyleRule's.
Robert Shiplett, Curlr
Fredericton NB Canada |
|||||
« Next Oldest | Next Newest »
|
Users browsing this thread:
3 Guest(s)
3 Guest(s)