on 06-14-2007 5:21 AM
Hi experts
can anyone plz explain me the difference between model instance and model objects. is it necessary to create model instance when dealing with WebService model.
also tell me what do u mean by associating model objects.
plz explain with reference to the following code :
<b>public void wdDoInit() {
//@@begin wdDoInit()
// create a new model instance (1)
model = new EmailAdWSModel();
// create model objects (2, 3)
Request_SendEmail requestMO = new Request_SendEmail(model);
SendEmail emailMO = new SendEmail(model);
// associate model objects (4)
requestMO.setSendEmail(emailMO);
// bind executable model object to context node (5)
wdContext.nodeRequest_SendEmail().bind(requestMO);
//@@end
}</b>
i found this on sample exercises given on sdn:
can any one help me regarding this.
Thanks in advance.
Hi krishnan..,
To be brief , have a clear idea about model i.e., A model contains number of classes inbuilt in it which u could find after importing a model..
You must create an instance to the model to access the classes in the model..
similarly you create objects to the classes in the model to get it referenced..
As u are used to object oriented programming, i hope u may have a good idea about classes and objects..
An object is always an instance of a class..and u can never access a class without creating an object to the class..
as in the coding which u have given..
"model" is an instance of the model called EmailAdWSModel();
then u create objects for the classes inside the model and then u access the attributes by referencing the objects of the class.
hope u would be clear with this concept
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.