|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
HI,
When VBScript 5.0 supports making of Classes is there any need of DLL ? If yes then tell me y? Please, leave the MTS issue. Just talk anything rather than this.
__________________
Quote:
Think Cool :-p |
|
#2
|
||||
|
||||
|
"A language/scripting environment supporting Classes" 'tis meaningless
Unless you're referring to fully-blown object-orientated programming, including inheritance, overrides, overloads, classes, namespaces, and the whole kaboodle... I can't see VBS ever supporting this VBS is for system administration and auomation tasks with no real need for object inheritance. ASP.Net is replacing ASP3.0 anyway, you use fully-blown VB.Net, C#, C++ w/ Managed Extensions, or whatever language you have a CLR for (heck, even COBOL is supported by DotNet) I don't know what you're referring to about DLL files, however, and what's with "MTS" you're referring to? The "Microsoft Transaction Server", perhaps? |
|
#3
|
||||
|
||||
|
Quote:
those "Classes" in vbscript 5.0 and abouve are very weak - "toys" in my opinion. it's nice having them of course and it can make programming easier but distance between scripting class and full scale compiled code is huge. I gather you want it simple - for example, Class can't be stored in the Session thus can't be passed between pages. object created with Server.CreateObject (i.e. from dll file) can be passed inside the session object. also, as the dude said, vbscript Class is very far from being VB class - you can't do any "real" programming within it, where in full scale VB application turned into dll you can do whatever you want. for example, all the "third party components" are dll files created with VB or C++ and most of them can't be written in vbscript classes no matter how hard you try... |
|
#4
|
||||
|
||||
|
Quote:
I really appritiate above point. But couldn't you create server.createobject in your class ? |
|
#5
|
||||
|
||||
|
Is there a chance that you have no idea what you're talking about?
A class is just a template for an object that can derrive or inherit from other classes and have methods or properties that override or overload existing (thus, inherited) members. You use the CreateObject() function method to initiate a new instance of a class, instantiated classes are called "objects" However, the CreateObject() function method only works for COM DLLs or controls that are registered with RegSvr on Windows, and not "Classes-Lite" that VBS supports. These "Lite" classes do not support inheritance (either parent or child), overloads or overrides, and don't need to be concerned about garbage collection and all that malarkey. |
|
#6
|
||||
|
||||
|
he meant if "lite" Class can contain "true" class and the answer is yes it can... but it's not relevant in this case - the vbscript class itself can't be stored in the session, it doesn't matter what it contains.
|
|
#7
|
|||
|
|||
|
I use VBS classes extensively in traditional asp code and find them quite useful, although not truely OO (or not even real close to OO
)One example, I created a bunch of html classes that I add to pages with an include file so I can use page elements somewhat like VB6 form controls.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#8
|
||||
|
||||
|
Hello! To all.
Totally appriciate the way Shadow Wizard and Doug following discussion. Quote:
Such things asked only when you didn't get what the peson wants to say ;-) Carry on. |
|
#9
|
||||
|
||||
|
no problem, glad we could explain things for you - so you got what you wanted?
|
|
#10
|
||||
|
||||
|
Hi,
My last question regarding this is as follow : If I include one file in all my asp pages which contains Class and object is created in default page and I didn't destroyed it in that page. So, Could it be available with the navigations ? If not then how will it get destroyed ? Thank in advance. Happy Brainteasing. |
|
#11
|
||||
|
||||
|
all objects are destroyed when the page is over, i.e. after all the code was executed. the only way to preserve objects as they are is using the Session or Application collections. if you have one page called "class.asp" and in that page you create your class, and include this page in existing ASP code, that Class will indeed be available to the ASP code.
|
|
#12
|
||||
|
||||
|
Can you tell me ...
Can you tell me one line of code how to assign and use object from session. Thank in advance.
|
|
#13
|