No you can still use a declared function .. just give its name. ??

Sanjiva.

Keith Chapman wrote:
Actually the first sounds better cause we are pointing to a declared
function. In the second case the function cannot be reused. So +1 for
the first option.

Thanks,
Keith
Ruwan Linton wrote:
+1 for the second approach in implementing this,

this.init = function () {
 //dostuff
};

Thanks,
Ruwan

Jonathan Marsh wrote:
And I was expecting a function object rather than a function name:

this.init=init;
function init() {
  //dostuff
}

Or, more commonly we'd probably see:

this.init = function () {
  //dostuff
};

The property-based approach is nice because it doesn't reserve more
function
names that a user might want to use himself, and it keeps the
constructurs/destructors visually distinct from operations.

Jonathan Marsh - http://www.wso2.com -
http://auburnmarshes.spaces.live.com
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Keith Chapman
Sent: Thursday, February 07, 2008 7:31 PM
To: mashup-dev
Subject: [mashup-dev] Service Lifecycle for Mashups

Hi,

I think its good to introduce some service life cycle stuff to our
mashups. It makes our stuff more interesting. So basically it would
calla special function at deployment time and another on undeployment.

I propose introducing some annotations to take care of this.
this.init="functionName";    -> To be called in deployment
this.destroy="functionName";    -> To be called on undeployment

Jonathan proposed destruct instead of destroy.
What do u guys this how should we go about this?

Thanks,
Keith.

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

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




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


--
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
email: [EMAIL PROTECTED]; cell: +1 650 265 8311 | +94 77 787 6880

"Oxygenating the Web Service Platform."

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

Reply via email to