[ 
https://issues.apache.org/jira/browse/TAP5-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14058795#comment-14058795
 ] 

Thiago H. de Paula Figueiredo commented on TAP5-2192:
-----------------------------------------------------

Hello, guys!

I'm sorry for my absence. Urgent stuff at my day job sucked all my time this 
week so far.

Actually, something I should have mentioned way earlier: most of what I'm doing 
here is to provide data for Barry's Tapestry Module's project 
(https://github.com/tapestry-modules/tapestry-modules), so we can have a 
registry where we can search for components, pages, mixins and component 
libraries. In addition, it would be also used as support to an eventual future 
feature which shows which component generated each part of the resulting HTML 
(Tapestry already generates HTML comments for this) and then link to source and 
JavaDoc from it.

Barry, I've already added the getComponentNames() and getMixinNames() methods 
to ComponentClassResolver, forming a trio with getPageNames(). The other 
missing part is the service configurations, and I'll do it as soon as I can.

While working on this ticket I've made a discovery: there's already a service 
which returns information about all the services in the T-IoC registry: 
ServiceActivityScoreboard, the one used in the Services tab/page of 
T5Dashboard. So we don't need to create a new service, just add a 
getConfiguration() method to ServiceActivity and the code to support it. My 
plan is to only store the services' configuration, so it can be obtained from 
ServiceActivity, if a given environment variable is set, as this could lead to 
large objects not being garbage-collectable. Anyway, that would be a dev-time 
only feature.

Lance, I really like the ComponentLibraryInfoSource idea. I'm just not sure 
about Resource being the right type, as it supposes to represent something in 
the server itself, and non-JavaDoc documentation is usually not present in 
JARs. Maybe Asset is the right type, as it has a client URL, while Resource 
doesn't. Or even String, as long as the code using them recognize "jar:" URLs, 
but I think this should be an improvement to be done in a later release.

Regarding duplicating information: yeah, I want to avoid that too. You gave me 
an idea: Maven includes the pom.xml inside the JAR generated by it, so we can 
extract a lot of information from it. Gradle doesn't, but it can generate a 
pom.xml. Or we could just map all the this information to the 
project.properties file which the Tapestry build already generates. Right now, 
it only includes the JAR version, but more stuff can easily be added.

Regarding the Component Libraries disabling: I don't think that's needed. It 
won't consume any resources unless it's requested. In addition, as the 
T5Dashboard page itself, it's only viewable from localhost by default 
(@WhiteListAccessOnly annotation).

Thanks for the suggestions and discussion!



> Add support for distributed documentation
> -----------------------------------------
>
>                 Key: TAP5-2192
>                 URL: https://issues.apache.org/jira/browse/TAP5-2192
>             Project: Tapestry 5
>          Issue Type: Improvement
>    Affects Versions: 5.4
>            Reporter: Barry Books
>            Assignee: Thiago H. de Paula Figueiredo
>              Labels: documentation, month-of-tapestry
>
> Please add support for a distributed documentation system. The basic 
> requirements are:
> 1. Access to a list of Pages/Compoents/Mixins. (ComponentClassResolver 
> supports pages)
> 2. Access to a Map of all Configurations. The map would have the 
> configuration class as the Key and contain an object such a list or map that 
> contains the configuration.
> 3. Access to a list of configured services.
> From this it should be possible to build documentation of a running system. 
> Thanks
> Barry



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to