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

James Sumners commented on TINKERPOP-2392:
------------------------------------------

> we've largely just struggled with how to make it better without duplicating 
> too much documentation and how to technically test code examples for all 
> language variants within the docs and then, of course, who has time to invest 
> energy into these efforts.

At least in the JavaScript module's readme, a section about how to read the 
reference documentation as a JS developer would be helpful. Describe why these 
"common imports" are common and what they provide the developer. Piecing 
together knowledge of the DSL is difficult enough without also needing to dig 
into the JS implementation to try and decipher how it maps.

> Documentation for JavaScript library is non-existent
> ----------------------------------------------------
>
>                 Key: TINKERPOP-2392
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2392
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: javascript
>    Affects Versions: 3.4.7
>            Reporter: James Sumners
>            Priority: Minor
>
> The readme for the JavaScript client says:
> "Please see the [reference 
> documentation|http://tinkerpop.apache.org/docs/current/reference/#gremlin-javascript]
>  at Apache TinkerPop for more information."
> That reference documentation is completely written in Groovy and does not 
> translate well to JavaScript. At the very least, there should be some 
> documentation that describes how to translate all of the globals used across 
> the reference documentation. For example, in 
> [http://tinkerpop.apache.org/docs/current/reference/#valuemap-step] it is 
> suggested that one can translate the list based values to singular values by 
> writing:
> ```
> g.V().valueMap().by(unfold())
> ```
> How do I translate this for usage in the JavaScript client? I assume the 
> `unfold()` method needs to be attached to the instance referenced by the 
> `by()` function. How do I get that reference easily? Can I pass a parameter 
> like `.by( () => this.unfold() )` (it certainly doesn't work)? Neither 
> `.by("unfold()")` nor `.by("unfold")` work.
> This sort of thing is present throughout the reference documentation and is 
> making it very difficult to get up-to-speed with the JavaScript client.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to