Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBS Vs JS

Status
Not open for further replies.

codestorm

Programmer
Apr 11, 2001
504
AU
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.

Try reading Jon Hawkins
 
Until my current job, I used JS for ASP, so learning curve not an issue. <insert witticism here>
codestorm
 
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.

But that's just my 2 cents worth :)
 
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.
 
Not to mention the kajillion page Microsoft.com Knowledge Base archive on ASP using VBScript examples.

You'll be hard pressed to find a single page there with JavaScript examples as the server side code.

Go with VBScript. You'll be glad that you did.

ToddWW
 
*sigh* it's error handling leaves much to be desired
(unless there's a pre .net version with try/catch equiv) <insert witticism here>
codestorm
 
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 = &quot;Error Number: &quot; & Err.Number & &quot;, &quot; & Err.Description & &quot;, Line: &quot; & 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.

sjuarez1979
 
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.
 
Thanks all.

I was after more technical (performance) issues between the 2 scipting langs, rather than docos, learning, etc. <insert witticism here>
codestorm
 
To my knowledge, neither language has a greater performance impact on the server over the other. -Ovatvvon :-Q
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top