<div>Someone asked about how hard it would be to port HelpSystem. Find below my survey of the code. I'm going to try to get it ported today, and I'll report back to the list if I run into anything tough (most likely differences in Morphic.)</div>
<div> </div><div>Well, let's have a look. In Squeak 4.3 there are 4 packages related to HelpSystem. One is a test suite, one is the core of the help system, and two are packages which appear to be help content (Help-Squeak-Project and Help-Squeak-TerseGuide.) </div>
<div><br></div><div>I wouldn't count the test suite against the total complexity of HelpSystem. So there's just one package to examine, which has five categories and one extension method. Here's the extension method:</div>
<div><br></div><div>Class>>asHelpTopic</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>^SystemReference forClass: self</div><div><br></div><div>That's not too bad, and actually pretty elegant. Here are the categories:</div>
<div><br></div><div>HelpSystem-Core-Builders (4 classes)</div><div>HelpSystem-Core-Help (4 classes)</div><div>HelpSystem-Core-Model (1 class)</div><div>HelpSystem-Core-UI (3 classes)</div><div>HelpSystem-Core-Utilities (3 classes)</div>
<div><br></div><div>I'm going to cover each category in turn.</div><div><br></div><div>------------</div><div>Builders</div><div>------------</div><div>Note that the category name has nothing to do with ToolBuilder AFAIK.</div>
<div><br></div><div>4 classes: HelpBuilder (which appears abstract, see below) and 3 subclasses of it (ClassAPIHelpBuilder, CustomHelpHelpBuilder, and PackageAPIHelpBuilder.)</div><div><br></div><div>HelpBuilder has five very short instance methods, and one short class side method. The instance method #build sends #subclassResponsibility, suggesting abstractness.</div>
<div><br></div><div>Its subclasses total 14 instance methods and 1 class method. That seems slim for three classes, so there may be a refactoring opportunity here.</div><div><br></div><div>-------</div><div>Help</div><div>
-------</div><div>4 classes, none of them have instance methods. They seem to be the supplied "help on help" series, and occupy 25 class methods which mostly just answer the content as string literals. Makes sense, but I suspect that there may be a refactoring opportunity here as well.</div>
<div><br></div><div>----------</div><div>Model</div><div>----------</div><div>This seems to be where the meat of it is. 1 class (HelpTopic) with 17 instance methods and 3 class methods. Not too big a deal.</div><div><br></div>
<div>----</div><div>UI</div><div>----</div><div>This is where I'm most likely to run into trouble. 3 classes, 16 instance methods, 12 class methods. HelpIcons has no instance methods, and only a handful of class methods that store icons. It can probably go. Noting that there's really very little code in the UI, and it's not bad looking either.</div>
<div><br></div><div>------------</div><div>Utilities</div><div>------------</div><div>3 classes, 14 class side methods, no instance methods.</div><div><br></div>-- <br>Casey Ransberger