Just after people's arguments as to why to use VBScript or Javascript for ASP pages.
Which is better in your opinion, and why?
(and I don't consider ease of use/mearning of VBS a reason) <insert witticism here>
codestorm
FWIW, I'm baffled by your decision to discount ease of use as an argument in this inquiry. For most people, the learning curve is significantly smaller for VBS than JS.
I dont do a lot of ASP development, but my typical rule of thumb is, use VBS server-side (because we use IIS) and JS client-side.
Okay... So You already have JS experience... But some people, like myself, are newbies and new to the whole programming scene. I use ASP at work and have deadlines to meet, so if I can get the job done with VBScript and its easier, not to mention all the refernce material I was able to obtain use VBScript I'm more prone to use it then JavaScript.
I say use what your comfortable with. I use VBscript server-side because that's the way the two full time development guys do it. This way, if they need to fix my pages they will find it easier to do. Obviously I use javascript client-side but as I said, I would go with what you feel comfortable with.
Well, there is something you can do about errors. It might be cheesy, but it seems to work for me.
Heres the synonyms (IMHO)
try{bla}catch(exception e){blah}
is roughly the same as
On Error Resume Next 'like try i guess
'heres the cheesy catch
If Err.Number <> 0 Then
strOutcome = "Error Number: " & Err.Number & ", " & Err.Description & ", Line: " & Err.Line
Response.Write strOutcome
Err.Clear
End If
It seems to work for me. I'm thinking VBScript is better (and this is a hard thing for me since my first love is JAVA) because there is so much out there in the way of help. In all the years I've been doing ASP, I might have seen one or two ASP implementation exaples in JScript or JavaScript.
Well I think VBScript is ugly. JScript has a more pleasing structure.
But VBScript has those little goodies like On Error Resume Next, IsNull, IsEmpty, For Each . . . In . . ., and more.
Actually I see a lot of JScript code in the microsoft documentation, which is very close to JavaScript. And it's not that hard to translate one to the other.
The msdn.microsoft.com scripting site is excellent and is equally good for JScript and VBScript.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.