[ 
https://wso2.org/jira/browse/MASHUP-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16145#action_16145
 ] 

Jonathan Marsh commented on MASHUP-744:
---------------------------------------

I would expect the constructor/destructor to be primarily internal, and 
exposing them directly to the user as operations to be a minority case.  So 
we're making people to extra work most of the time to turn them off.  The 
syntax is different than other operations so it won't even be obvious that 
these functions will appear as operations until the user runs the try-it.  I 
think it would be more user friendly to hide the constructor/destructor by 
default.  If one wants to make the constructor visible we already have a way to 
do that.  Instead of:

  this.init = function () {
    ...
  }

use 

  this.init = initialize;
  function initialize() {
    ...
  }

Then you can state visibility explicitly for the initialize function.  Unless I 
misunderstand how this actually appears at the Javascript interpreter level - 
we're not turning init etc into a kind of reserved word are we?  And there's 
not much difference between setting this.init to an anonymous function instead 
of a named function is there?

Also note that I didn't use this.init = "initialize";  which you did in a 
check-in message - was that intentional?

> Operation name is incorrect when this.init = function bar() is used
> -------------------------------------------------------------------
>
>                 Key: MASHUP-744
>                 URL: https://wso2.org/jira/browse/MASHUP-744
>             Project: WSO2 Mashup Server
>          Issue Type: Bug
>            Reporter: Keith Godwin Chapman
>            Assignee: Keith Godwin Chapman
>             Fix For: 1.1
>
>
> Operation name is incorrect when this.init = function bar() is used. Its 
> displayed as init in the WSDL instead of bar.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to