[
https://issues.apache.org/jira/browse/THRIFT-2738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14291409#comment-14291409
]
Andrew de Andrade commented on THRIFT-2738:
-------------------------------------------
There are other things that could be improved:
(1) No leaking globals. Right now, the browser client leaks all the types into
the global namespace. Use a module pattern CommonJS or UMD are both acceptable.
(2) Standard callback approach - The NodeJS client uses the defacto callback
approach where the error is the first argument and the result is the second
argument. The browser client does not follow this standard at all (pretty much
any serious browser app is either a browserify or requirejs app that rely on
npm modules (even projects with bower usually also have package.json files for
npm modules))
(3) Code sharing between the browser javascript and nodejs javascript. The fact
that both of these are maintained separately is strange, since there is a lot
of code and tests that are the same between the two implementations.
> JS coding standards
> -------------------
>
> Key: THRIFT-2738
> URL: https://issues.apache.org/jira/browse/THRIFT-2738
> Project: Thrift
> Issue Type: Sub-task
> Components: JavaScript - Library, Node.js - Library
> Reporter: Konrad Grochowski
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)