Click to See Complete Forum and Search --> : Comparing objects in other languages to objects in C++/C#


vikrampschauhan
January 26th, 2005, 03:13 PM
We have Javascript and ASP which are also object oriented(comparing to C++/C#).

In Javascript, when we say:
Date date1=new Date();

a date object is allocated on the heap and its reference given to date1.

Similarly, in ASP, when we say:
connTemp=Server.CreateObject("adodb.connection")

The function CreateObject is creating an adodb connection object(on the heap), and returning the reference to connTemp.

I believe my summary is correct here?

Thinking on similar lines, what exactly happens when we create DOM objects in HTML/DHTML?

eg:

<form...>
<input type="button" name="button1">
</form>

Considering only the button object. When the interpreter processes this line of code, I believe that here also, the object is allocated on the heap(the object in turn may be invoking GDI components) and its reference returned. This causes us to see the button on the page.

Am I correct?

Thanks
Vikram