HelpSystem implementation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

HelpSystem implementation

Danny Chan
Hi Thorsten!

I have two questions regarding your implementation:

- What is the reason to have HelpBuilder and to create a hierarchy of
HelpTopic instances mirroring the layout of the actual content classes? Why
not use the class objects directly?
- Why do you use pragmas for the titles of the pages? If I understand
correctly, pragmas are for metadata of methods, but it seems to me that the
title of a page belongs to its data just as much as its contents do.


Danny


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: HelpSystem implementation

Torsten Bergmann
Hi Danny,

> - What is the reason to have HelpBuilder and to create a hierarchy of
> HelpTopic instances mirroring the layout of the actual content classes?
> Why
> not use the class objects directly?

HelpBuilder builds the topics/books from code. I just wanted to decouple
the storage mechanism (here ST source code). Topics/books could also
be stored in an external database/files or even created on the fly from
dynamic information.

> - Why do you use pragmas for the titles of the pages? If I understand
> correctly, pragmas are for metadata of methods, but it seems to me that
> the
> title of a page belongs to its data just as much as its contents do.

Did'nt like

  firstPage
     ^#{'First Page Title' 'Contents'}

No other reason. Or we return a dictionary in #pages?
Would this be better?

Bye
T.






--
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: HelpSystem implementation

Danny Chan
Am Sonntag, 14. Februar 2010 21:19:57 schrieb Torsten Bergmann:

> Hi Danny,
>
> > - What is the reason to have HelpBuilder and to create a hierarchy of
> > HelpTopic instances mirroring the layout of the actual content classes?
> > Why
> > not use the class objects directly?
>
> HelpBuilder builds the topics/books from code. I just wanted to decouple
> the storage mechanism (here ST source code). Topics/books could also
> be stored in an external database/files or even created on the fly from
> dynamic information.
>
I've thought a bit about this. I see two problems with this. Let's say I
want to create a book with high level documentation about a package. But one
chapter should be the complete API documentation. The easiest way would be if
he could write documentation in the current way and for the sub books return
in addition one object that generates the needed nodes automatically. It seems
to me that it would be easier if the content node knows how to retrieve its
data. Secondly, let's say I want to browse the whole API of the system.
Because building the nodes is a separate step and the HelpTopic/HelpBook
instances do not know how to do this, I would need to create the whole help
content before browsing, and this takes quite some time I guess.

I would prefer to have a simple protocol to query a node for its contents and
its sub books. Then specific subclasses could implement the required fetching
behaviour.

I will try to find some time to write actual code to show what I mean.

Danny

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project