From: Metre Meter on 6 Jan 2010 14:52 While I've been supporting a Classic ASP app for a while, and have also written some separate ASP.Net apps, my understanding is vague on some larger issues - What are the issues with mixing languages in Classic ASP? For example, declaring variables, functions etc. in one language and accessing/calling them in another? - Where is the line between "native" language features (e.g. in JScript), and those features which are part of .Net (or whatever), common to all .Net languages? Or put another way, how are the .Net facilities "mapped" onto a particular language? - What environment does Classic ASP operate within (i.e. analogous to ASP.Net programs operating under CLR)? - What support to I have for the "native" Windows features under ASP.Net? Is everything done through the CLR? Do I have more direct access to Windows' native features under Classic ASP, or does that restrict me in a different way? Is there anything in that vein that I can do in Classic ASP that I can't do in ASP.Net? - Do any languages (particularly JScript) have issues accessing the full features of the Classic ASP or ASP.Net environment? (I had a problem with JScript and collections once, but I was able to work my way around it) - Which is the best way to stucture my programs made up of multiple files? - Via #includes or via <script> tags? The latter sounds better, but how do I include a jscript file within a jscript fileif there are dependencies - Should I really be developing ASP.Net "by hand" or using Visual Studio anyway? - What "type" of object does Server.CreateObject in Classic ASP create? I apologise if these questions seem somewhat vague, or if there are a lot of them. As they're somewhat interconnected, please feel free to answer them by pointing me towards any online resources. Any help is appreciated- thank you!
From: Bob Barrows on 6 Jan 2010 15:31 Metre Meter wrote: > While I've been supporting a Classic ASP app for a while, and have > also written some separate ASP.Net apps, my understanding is vague on > some larger issues > I'll start by suggesting you might benefit from reading the classic ASP documentation: http://msdn2.microsoft.com/en-us/library/ms524664 > - What are the issues with mixing languages in Classic ASP? For > example, declaring variables, functions etc. in one language and > accessing/calling them in another? http://classicasp.aspfaq.com/general/does-order-matter-when-using-different-languages-in-asp.html > > - Where is the line between "native" language features (e.g. in > JScript), and those features which are part of .Net (or whatever), > common to all .Net languages? Or put another way, how are the .Net > facilities "mapped" onto a particular language? better asked in a dotnet group (this is a classic asp group) microsoft.public.dotnet.framework.aspnet www.asp.net > > - What environment does Classic ASP operate within (i.e. analogous to > ASP.Net programs operating under CLR)? Not sure I understand the question. ASP is run by an IIS server using asp.dll > > - What support to I have for the "native" Windows features under > ASP.Net? Is everything done through the CLR? again, better asked in a dotnet group > Do I have more direct > access to Windows' native features under Classic ASP, or does that > restrict me in a different way? Is there anything in that vein that I > can do in Classic ASP that I can't do in ASP.Net? Are you talking about access to the windows api? Don't even think about it with script languages, which is all that classic ASP supports. > > - Do any languages (particularly JScript) have issues accessing the > full features of the Classic ASP or ASP.Net environment? I won't answer for .Net, but for classic ASP the answer is no http://www.aspfaq.com/show.asp?id=2176 > (I had a problem with JScript and collections once, but I was able > to work my way around it) > doesn't seem to be a question > - Which is the best way to stucture my programs made up of multiple > files? > - Via #includes or via <script> tags? For server-side code, I typically use server-side includes (#includes). > The latter sounds better, > but how do I include a jscript file within a jscript fileif there are > dependencies ??? just do it? Are you talking about client-side or server-side code? > - Should I really be developing ASP.Net "by hand" or using Visual > Studio anyway? better asked in a dotnet group > > - What "type" of object does Server.CreateObject in Classic ASP > create? > Whatever type is provided by the type library being referenced ... set rs=createobject("adodb.recordset") causes the creation of an ADO recordset object and returns a reference to it to the rs variable. The "Server." part is not really necessary anymore. It used to be recommended in earlier versions of IIS but is merely overhead now. Use vbscript's CreateObject method instead. -- HTH, Bob Barrows
From: Tim Slattery on 6 Jan 2010 16:06 Metre Meter <metremeter(a)yahoo.co.uk> wrote: >- What are the issues with mixing languages in Classic ASP? For >example, declaring variables, functions etc. in one language and >accessing/calling them in another? As far as I know, different languages live in different spaces. If your ASP code contains blocks of VBScript and of server-side JavaScript, the variables from VBScript will not be available to the Javascript code. I don't think mixing languages like that is a good idea anyway. >- Where is the line between "native" language features (e.g. in >JScript), and those features which are part of .Net (or whatever), >common to all .Net languages? Or put another way, how are the .Net >facilities "mapped" onto a particular language? Can't help with .Net questions. >- What environment does Classic ASP operate within (i.e. analogous to >ASP.Net programs operating under CLR)? Classic ASP is implemented by a filter that runs under IIS. >- Do any languages (particularly JScript) have issues accessing the >full features of the Classic ASP or ASP.Net environment? For classic: I think JavaScript can do anything that VBScript can do. For .Net: no clue >- What "type" of object does Server.CreateObject in Classic ASP >create? An ActiveX component. It's implemented as a DLL, which must be registered on the server. I've written such things in both VB and C++. No doubt it can be done in other languages as well. -- Tim Slattery Slattery_T(a)bls.gov http://members.cox.net/slatteryt
From: Bob Barrows on 6 Jan 2010 16:27 Tim Slattery wrote: > Metre Meter <metremeter(a)yahoo.co.uk> wrote: > >> - What are the issues with mixing languages in Classic ASP? For >> example, declaring variables, functions etc. in one language and >> accessing/calling them in another? > > As far as I know, different languages live in different spaces. If > your ASP code contains blocks of VBScript and of server-side > JavaScript, the variables from VBScript will not be available to the > Javascript code. I don't think mixing languages like that is a good > idea anyway. > You can call vbscript functions from a jscript block and vice versa: http://msdn.microsoft.com/en-us/library/aa260861(VS.60).aspx -- HTH, Bob Barrows
From: Evertjan. on 6 Jan 2010 17:11
Bob Barrows wrote on 06 jan 2010 in microsoft.public.inetserver.asp.general: > Tim Slattery wrote: >> Metre Meter <metremeter(a)yahoo.co.uk> wrote: >> >>> - What are the issues with mixing languages in Classic ASP? For >>> example, declaring variables, functions etc. in one language and >>> accessing/calling them in another? >> >> As far as I know, different languages live in different spaces. If >> your ASP code contains blocks of VBScript and of server-side >> JavaScript, the variables from VBScript will not be available to the >> Javascript code. I don't think mixing languages like that is a good >> idea anyway. >> > > You can call vbscript functions from a jscript block and vice versa: > http://msdn.microsoft.com/en-us/library/aa260861(VS.60).aspx functions and also variables are available to both: ================== <% = a %> <br> <% = b() %> <script language ='javascript' runat='server'> var a = 'Blah'; function b() { return 'Blip'; }; </script> ================== -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress) |