469,607 Members | 1,889 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,607 developers. It's quick & easy.

ASP VBscript vs Jscript

Hi All.

I'm stating out doing some web developing. I was wondering which of
the server side languages should I concentrate on and learn.

I Know CSS, HTML, T-SQL

I can look at the client javascript code and work out what it does but
I can't really write it from scratch.

I know mainly VBscript.

I was wondering should I drop VBscript and learn Jscript then code
both the client & server code in Javascript/Jscript

I have a couple "CLASS" files in VBscript and was wondering how does
Jscript do this ?

What books should I get to learn server side Jscript? is it the same
as client side? or is there a lot of differences.

Thanks for any help, pros & cons.

Al.
Jul 19 '05 #1
20 5713
Hi,
http://www.heferito.com/javascriptVSvbscript.asp
maybe this link might be useful to you

Regards,
TsiuWeng

Harag <ha***@REMOVETHESECAPITALSsofthome.net> wrote in message news:<dk********************************@4ax.com>. ..
Hi All.

I'm stating out doing some web developing. I was wondering which of
the server side languages should I concentrate on and learn.

I Know CSS, HTML, T-SQL

I can look at the client javascript code and work out what it does but
I can't really write it from scratch.

I know mainly VBscript.

I was wondering should I drop VBscript and learn Jscript then code
both the client & server code in Javascript/Jscript

I have a couple "CLASS" files in VBscript and was wondering how does
Jscript do this ?

What books should I get to learn server side Jscript? is it the same
as client side? or is there a lot of differences.

Thanks for any help, pros & cons.

Al.

Jul 19 '05 #2
"Harag" <ha***@REMOVETHESECAPITALSsofthome.net> wrote in message
news:dk********************************@4ax.com...
Hi All.

I'm stating out doing some web developing. I was wondering which of
the server side languages should I concentrate on and learn.

I Know CSS, HTML, T-SQL

I can look at the client javascript code and work out what it does but
I can't really write it from scratch.

I know mainly VBscript.

I was wondering should I drop VBscript and learn Jscript then code
both the client & server code in Javascript/Jscript

I have a couple "CLASS" files in VBscript and was wondering how does
Jscript do this ?

What books should I get to learn server side Jscript? is it the same
as client side? or is there a lot of differences.

Thanks for any help, pros & cons.


I would suggest that if you already know VBScript, then continue coding with
what makes you comfortable. I suspect the majority of ASP pages are written
using VBScript (which, btw, is the default scripting language unless changed
on the server). I know this doesn't completely answer your questions, but
my suggestion is work with what you are most comfortable with.

Regards,
Peter Foti
Jul 19 '05 #3
Use what you're comfortable with. There's really no clear advantage to
using one over the other.

However I will mention that the whole "use the same language in both
client-side and server-side" argument doesn't carry a lot of water. In
fact, I think it contributes to far more confusion than good.

"Harag" <ha***@REMOVETHESECAPITALSsofthome.net> wrote in message
news:dk********************************@4ax.com...
Hi All.

I'm stating out doing some web developing. I was wondering which of
the server side languages should I concentrate on and learn.

I Know CSS, HTML, T-SQL

I can look at the client javascript code and work out what it does but
I can't really write it from scratch.

I know mainly VBscript.

I was wondering should I drop VBscript and learn Jscript then code
both the client & server code in Javascript/Jscript

I have a couple "CLASS" files in VBscript and was wondering how does
Jscript do this ?

What books should I get to learn server side Jscript? is it the same
as client side? or is there a lot of differences.

Thanks for any help, pros & cons.

Al.

Jul 19 '05 #4
If you plan on using Microsoft's web parts (forget the actual name for the
annoying little ASP scripts it installs), you are better to learn JScript,
as these snippets are all coded in JScript. Why is this important? Every
time the interpreter switches from VBScript to JScript, you get a perf
penalty. If you code in VBScript, you are more likely to encounter numerous
switches than you are with JScript (which will be 0 switches).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Harag" <ha***@REMOVETHESECAPITALSsofthome.net> wrote in message
news:dk********************************@4ax.com...
Hi All.

I'm stating out doing some web developing. I was wondering which of
the server side languages should I concentrate on and learn.

I Know CSS, HTML, T-SQL

I can look at the client javascript code and work out what it does but
I can't really write it from scratch.

I know mainly VBscript.

I was wondering should I drop VBscript and learn Jscript then code
both the client & server code in Javascript/Jscript

I have a couple "CLASS" files in VBscript and was wondering how does
Jscript do this ?

What books should I get to learn server side Jscript? is it the same
as client side? or is there a lot of differences.

Thanks for any help, pros & cons.

Al.

Jul 19 '05 #5
> penalty. If you code in VBScript, you are more likely to encounter
numerous
switches than you are with JScript (which will be 0 switches).


what are you talking about? switches to and from what?
Jul 19 '05 #6

I agree that you should use what you're comfortable with,
but what if you client is using JScript/JavaScript and not
VBScript? What do you do then?

I'm in a shop where JavaScript and VBScript are both being
used so I have a choice, but the client wants us to focus
on JavaScript. The claim is that JavaScript is more
robust than VBScript, but I tend to disagree. I think
both have their strengths and weaknesses for different
things.

I would be curious to know also what books are good to
learn JavaScript from, since I have extensive VB
experience and very little ASP experience. I will also be
taking C# & Advance VB.net college classes in January, and
I was curious to know in all three of these scripting
languages are part of the .Net framework?

-----Original Message-----
"Harag" <ha***@REMOVETHESECAPITALSsofthome.net> wrote in messagenews:dk********************************@4ax.com.. .
Hi All.

I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn.
I Know CSS, HTML, T-SQL

I can look at the client javascript code and work out what it does but I can't really write it from scratch.

I know mainly VBscript.

I was wondering should I drop VBscript and learn Jscript then code both the client & server code in Javascript/Jscript

I have a couple "CLASS" files in VBscript and was wondering how does Jscript do this ?

What books should I get to learn server side Jscript? is it the same as client side? or is there a lot of differences.

Thanks for any help, pros & cons.
I would suggest that if you already know VBScript, then

continue coding withwhat makes you comfortable. I suspect the majority of ASP pages are writtenusing VBScript (which, btw, is the default scripting language unless changedon the server). I know this doesn't completely answer your questions, butmy suggestion is work with what you are most comfortable with.
Regards,
Peter Foti
.

Jul 19 '05 #7
"Scott" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...

I agree that you should use what you're comfortable with,
but what if you client is using JScript/JavaScript and not
VBScript? What do you do then?
Well, if you're designing for a client that specifically wants/needs
JavaScript/JScript instead of VBScript, there's not much you can do about
that. Many clients (IMO) don't know about the language that runs the ASP
application, but if they specifically request JavaScript, then you have to
give them what they want I suppose (or try to talk them into letting you
code with VBScript, or tell them you can't meet their needs if you can't do
it).
I'm in a shop where JavaScript and VBScript are both being
used so I have a choice, but the client wants us to focus
on JavaScript. The claim is that JavaScript is more
robust than VBScript, but I tend to disagree. I think
both have their strengths and weaknesses for different
things.
Yes and no. JavaScript probably is a little more robust than VBScript. But
the differences in an ASP environment are really not enough to put any real
distance between the two options, and for the most part you should be able
to do pretty much the same things with either language. And yes, they each
have strengths and weaknesses... for example, if you need to do any sort of
string manipulation, VBScript will probably be quicker and easier to write
than JavaScript equivalents. But if the customer insists, there's not much
you can do about it. If you have other guys in the shop that do JavaScript,
then perhaps they should take this job.

I would be curious to know also what books are good to
learn JavaScript from, since I have extensive VB
experience and very little ASP experience.
The O'Reilly book "javascript: The Definitive Guide" is a great book, both
for learning and as a reference.
I will also be
taking C# & Advance VB.net college classes in January, and
I was curious to know in all three of these scripting
languages are part of the .Net framework?


C#, VB.NET and JScript.NET are all languages that can be used with the .NET
Framework.
Good luck,

Peter
Jul 19 '05 #8
Thanks Peter.

-----Original Message-----
"Scott" <an*******@discussions.microsoft.com> wrote in messagenews:00****************************@phx.gbl...

I agree that you should use what you're comfortable with, but what if you client is using JScript/JavaScript and not VBScript? What do you do then?
Well, if you're designing for a client that specifically

wants/needsJavaScript/JScript instead of VBScript, there's not much you can do aboutthat. Many clients (IMO) don't know about the language that runs the ASPapplication, but if they specifically request JavaScript, then you have togive them what they want I suppose (or try to talk them into letting youcode with VBScript, or tell them you can't meet their needs if you can't doit).
I'm in a shop where JavaScript and VBScript are both being used so I have a choice, but the client wants us to focus on JavaScript. The claim is that JavaScript is more
robust than VBScript, but I tend to disagree. I think
both have their strengths and weaknesses for different
things.
Yes and no. JavaScript probably is a little more robust

than VBScript. Butthe differences in an ASP environment are really not enough to put any realdistance between the two options, and for the most part you should be ableto do pretty much the same things with either language. And yes, they eachhave strengths and weaknesses... for example, if you need to do any sort ofstring manipulation, VBScript will probably be quicker and easier to writethan JavaScript equivalents. But if the customer insists, there's not muchyou can do about it. If you have other guys in the shop that do JavaScript,then perhaps they should take this job.

I would be curious to know also what books are good to
learn JavaScript from, since I have extensive VB
experience and very little ASP experience.
The O'Reilly book "javascript: The Definitive Guide" is a

great book, bothfor learning and as a reference.
I will also be
taking C# & Advance VB.net college classes in January, and I was curious to know in all three of these scripting
languages are part of the .Net framework?
C#, VB.NET and JScript.NET are all languages that can be

used with the .NETFramework.
Good luck,

Peter
.

Jul 19 '05 #9
I used to be an ASP VBScript developer until a similar thread a few weeks
ago.

I tried using JScript in server-side ASP and since then I've dropped
VBScript entirely for web stuff since I can now code an entire library set
of functions and use them at both the server and client side. some of these
library routines are pretty complex and having to do them both ways was
beginning to get on my nerves. One such library is a couple of JScript
objects (using prototype etc.) that converts coordinate systems from LatLong
to UK National Grid and back.

Another one that I've been working on is a single JScript include file that
allows XSLT processing to HTML at either the server or the client without
any changes to code - it works so far (OK - there are a couple of minor
gotchas to work around).

So, all I can really say here is that keep VBScript under your belt but for
anything web oriented then spend the few minutes to ponder if an all JScript
solution will help reduce duplication.

Side Note:
I have to say that I'm unimpressed with the lack of intellisense for JScript
objects within Interdev - I really like the way that it does it for Class
definitions in VBScript and oh how I wish it were so with JScript objects!

Cheers,

Chris.

"Harag" <ha***@REMOVETHESECAPITALSsofthome.net> wrote in message
news:dk********************************@4ax.com...
Hi All.

I'm stating out doing some web developing. I was wondering which of
the server side languages should I concentrate on and learn.

I Know CSS, HTML, T-SQL

I can look at the client javascript code and work out what it does but
I can't really write it from scratch.

I know mainly VBscript.

I was wondering should I drop VBscript and learn Jscript then code
both the client & server code in Javascript/Jscript

I have a couple "CLASS" files in VBscript and was wondering how does
Jscript do this ?

What books should I get to learn server side Jscript? is it the same
as client side? or is there a lot of differences.

Thanks for any help, pros & cons.

Al.
Jul 19 '05 #10
It does carry a lot of water but like all such statements needs to be taken
in context.

I (this is my personal experience) found that the switch from ASP VBScript
to JScript was easy and also gave a lot of flexibility in code reuse since
you can use the same .js file for both server-side and client-side usage
(within reason of course) in a lot of instances negating the need to code
things twice (on as VBScript and one as JScript).

Admittedly there are some instances where JScript is more difficult (some
specific cases with COM spring to mind) but these are generally easy to deal
with and a small foray into VBScript for a few lines is no big deal).

The support for arrays in JScript far outstrips VBScript (in my opinion
again) and if only for that I consider my own switch to ASP JScript to be
the right choice.

Database stuff is as-easy with JScript as it is with VBScript - I have a
number of working solutions quite happily using ADO / SQL Server stored
procedures etc. with no apparent ill effects.

My only bugbear with JScript is actually a go at Interdev - why oh why is it
not possible to have intellisense for JScript objects created using the
object.prototype functionality? No need to comment cos I know it ain't gonna
happen any time soon (does it do this in .NET perhaps?).

Chris Barber.

"freaky friday" <fr****@friday.net> wrote in message
news:e%****************@tk2msftngp13.phx.gbl...
Use what you're comfortable with. There's really no clear advantage to
using one over the other.

However I will mention that the whole "use the same language in both
client-side and server-side" argument doesn't carry a lot of water. In
fact, I think it contributes to far more confusion than good.

"Harag" <ha***@REMOVETHESECAPITALSsofthome.net> wrote in message
news:dk********************************@4ax.com...
Hi All.

I'm stating out doing some web developing. I was wondering which of
the server side languages should I concentrate on and learn.

I Know CSS, HTML, T-SQL

I can look at the client javascript code and work out what it does but
I can't really write it from scratch.

I know mainly VBscript.

I was wondering should I drop VBscript and learn Jscript then code
both the client & server code in Javascript/Jscript

I have a couple "CLASS" files in VBscript and was wondering how does
Jscript do this ?

What books should I get to learn server side Jscript? is it the same
as client side? or is there a lot of differences.

Thanks for any help, pros & cons.

Al.


Jul 19 '05 #11

The main reason I'm thinking of switching is that the client side code
is all javascript that I downloaded from "javascriptsource.com" and
altered to suit. I understand the basics of javascript to make the
changes I just don't know it fully as I code mostly VBscript during a
working day.

I don't have a "boss" or "client" to tell what to code in as its for
my own business so thats not really important.

For my project I'm still in the pen & paper design phase so not done
much coding. I do have several "VBscript Class" files that will need
to be changed.

Thanks for the info and points.

Al

On Fri, 26 Dec 2003 21:56:26 -0000, "Chris Barber"
<ch***@blue-canoe.co.uk.NOSPAM> wrote:
I used to be an ASP VBScript developer until a similar thread a few weeks
ago.

I tried using JScript in server-side ASP and since then I've dropped
VBScript entirely for web stuff since I can now code an entire library set
of functions and use them at both the server and client side. some of these
library routines are pretty complex and having to do them both ways was
beginning to get on my nerves. One such library is a couple of JScript
objects (using prototype etc.) that converts coordinate systems from LatLong
to UK National Grid and back.

Another one that I've been working on is a single JScript include file that
allows XSLT processing to HTML at either the server or the client without
any changes to code - it works so far (OK - there are a couple of minor
gotchas to work around).

So, all I can really say here is that keep VBScript under your belt but for
anything web oriented then spend the few minutes to ponder if an all JScript
solution will help reduce duplication.

Side Note:
I have to say that I'm unimpressed with the lack of intellisense for JScript
objects within Interdev - I really like the way that it does it for Class
definitions in VBScript and oh how I wish it were so with JScript objects!

Cheers,

Chris.

"Harag" <ha***@REMOVETHESECAPITALSsofthome.net> wrote in message
news:dk********************************@4ax.com.. .
Hi All.

I'm stating out doing some web developing. I was wondering which of
the server side languages should I concentrate on and learn.

I Know CSS, HTML, T-SQL

I can look at the client javascript code and work out what it does but
I can't really write it from scratch.

I know mainly VBscript.

I was wondering should I drop VBscript and learn Jscript then code
both the client & server code in Javascript/Jscript

I have a couple "CLASS" files in VBscript and was wondering how does
Jscript do this ?

What books should I get to learn server side Jscript? is it the same
as client side? or is there a lot of differences.

Thanks for any help, pros & cons.

Al.


Jul 19 '05 #12
The rule of thumb is VBScript for ASP server side and Javascript for client.
One cannot avoid Javascript as VBScript is not supported by clients other
then Microsoft's (Netscape, Opera etc whcich still account for a sizable
part of customers one cannot ignore)
"Harag" <ha***@REMOVETHESECAPITALSsofthome.net> wrote in message
news:dk********************************@4ax.com...
Hi All.

I'm stating out doing some web developing. I was wondering which of
the server side languages should I concentrate on and learn.

I Know CSS, HTML, T-SQL

I can look at the client javascript code and work out what it does but
I can't really write it from scratch.

I know mainly VBscript.

I was wondering should I drop VBscript and learn Jscript then code
both the client & server code in Javascript/Jscript

I have a couple "CLASS" files in VBscript and was wondering how does
Jscript do this ?

What books should I get to learn server side Jscript? is it the same
as client side? or is there a lot of differences.

Thanks for any help, pros & cons.

Al.

Jul 19 '05 #13
> The main reason I'm thinking of switching is that the client side code
is all javascript that I downloaded from "javascriptsource.com" and
altered to suit. I understand the basics of javascript to make the
changes I just don't know it fully as I code mostly VBscript during a
working day.


This doesn't explain why you want to use the same language for both
environments. In fact, the last statement sounds like an argument for
*staying* with VBScript on the server side.
Jul 19 '05 #14
On Sat, 27 Dec 2003 16:43:20 -0500, "freaky friday"
<fr****@friday.net> wrote:
This doesn't explain why you want to use the same language for both
environments. In fact, the last statement sounds like an argument for
*staying* with VBScript on the server side.


I want to keep to using Javascript on the client side so I can try to
be compatable with at least NS 7 users (not sure about earlier
versions as I have IE6 NS7 installed).

I thought that if I switch to Jscript now then it would be easier to
learn client javascripting. but looking into it a bit more I'm
thinking more and more of staying with VBscript for the serverside and
learn the basics of javascript for the client side. I've found some
reports and comparison pages and they all seem to lead to VBscript.
I'm not convinced I should drop VBscript completly and change to
Jscript.

As you say the last statment does sound like an argument for staying
with VBscript. I seem to know more about VBscript than I thought I
did. :P

Thanks
Al.

Jul 19 '05 #15
Try this:

<SCRIPT language="vbscript" runat="server">
sub DoThisVBScript()
dblItem = 0
for i = 0 to 1000
for i2 = 0 to 1000
dblItem = i + dblItem
Next
Next
End sub
</SCRIPT>
<SCRIPT language="javascript" runat="server">
function doThisjavascript(){
var dblItem = 0;
if(i=0,i<=1000,i++){
if(i2=0,i2<=1000,i2++){
dblItem++;
}
}
}
</SCRIPT>
<%
dlbTimer = Timer()
DoThisVBScript()
Response.Write Timer() - dlbTimer & " for the vbscript to process"
Response.Flush
Response.Write "<BR/>"
dlbTimer = Timer()
doThisjavascript()
Response.Write Timer() - dlbTimer & " for the javascript to process"
Response.Flush
%>
-dlbjr

Discerning resolutions for the alms
Jul 19 '05 #16
Harag wrote:
<snipped>
I was wondering should I drop VBscript and learn Jscript then code
both the client & server code in Javascript/Jscript

Microsoft does not support VBScript in .NET. In contrast JScript _is_
supported in .NET. So learning more about VBScript will not be useful in
the long run.

VBScript, like Latin, is now a "dead language" (although both are still
used in some quarters).

Good Luck,
Michael D. Kersey

Jul 19 '05 #17
<aa> "wrote":

The rule of thumb is VBScript for ASP server side and Javascript
for client.


There is no such rule. I haven't used VBScript for 3 years. JScript suits me
just fine on the server.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #18
Don't you mean this for the JavaScript?

<SCRIPT language="javascript" runat="server">
function doThisjavascript(){
var dblItem = 0;
for(i=0;i<=1000;i++){
for(i2=0;i2<=1000;i2++){
dblItem+=i;
}
}
}
</SCRIPT>

this gives:
5.816406 for the vbscript to process
3.857422 for the javascript to process

Now Dim the VBScript variables like you are supposed to:

2.853516 for the vbscript to process
3.867188 for the javascript to process

Next, declare the JScript variables (again, as you are supposed to do)
2.84375 for the vbscript to process
1.8125 for the javascript to process

Finally, change the loops to increment the value (as i suspect the original
intent was) instead of adding the outer loop counter.
2.814453 for the vbscript to process
1.742188 for the javascript to process

It does appear that JScript can count to 1,002,001 faster than VBScript.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"dlbjr" <do******@do.u> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Try this:

<SCRIPT language="vbscript" runat="server">
sub DoThisVBScript()
dblItem = 0
for i = 0 to 1000
for i2 = 0 to 1000
dblItem = i + dblItem
Next
Next
End sub
</SCRIPT>
<SCRIPT language="javascript" runat="server">
function doThisjavascript(){
var dblItem = 0;
if(i=0,i<=1000,i++){
if(i2=0,i2<=1000,i2++){
dblItem++;
}
}
}
</SCRIPT>
<%
dlbTimer = Timer()
DoThisVBScript()
Response.Write Timer() - dlbTimer & " for the vbscript to process"
Response.Flush
Response.Write "<BR/>"
dlbTimer = Timer()
doThisjavascript()
Response.Write Timer() - dlbTimer & " for the javascript to process"
Response.Flush
%>
-dlbjr

Discerning resolutions for the alms

Jul 19 '05 #19

I don't know how much truth there is to this statememt,
but I'm assuming if Microsoft did do away with VBScript in
the .Net environment, it's because VB.net took it's
place. Is that what your are saying?
-----Original Message-----
Harag wrote:
<snipped>
I was wondering should I drop VBscript and learn Jscript then code both the client & server code in Javascript/JscriptMicrosoft does not support VBScript in .NET. In contrast

JScript _is_supported in .NET. So learning more about VBScript will not be useful inthe long run.

VBScript, like Latin, is now a "dead language" (although both are stillused in some quarters).

Good Luck,
Michael D. Kersey

.

Jul 19 '05 #20
Scott wrote:
I don't know how much truth there is to this statememt,
but I'm assuming if Microsoft did do away with VBScript in
the .Net environment, it's because VB.net took it's
place. Is that what your are saying?


No, that's what _you_ said!8~)

VB.NET is not the same language as VBScript, nor is it the same language
as VB6. VB.NET, VBScript, and VB6 are distinct languages with distinct
syntaxes and different libraries. No one of these languages is a subset
or superset of any of the others.

Also in the .NET framework, the system objects (e.g., Request, Response,
Server, etc.) have changed significantly.

VBScript is not supported in .NET and VBScript will not run under .NET.
To move an application from ASP VBScript to .NET (either C# or VB.NET)
requires rewriting and retesting the application in it's entirety.

This all despite the fact that VBScript is still (and will remain for
some time) the prevalent language on Microsoft IIS servers.

Unlike VBScript, JScript _is_ supported in .NET. However it is a
different compiler (a complete rewrite) and the .NET system objects are
different (as noted above), so porting an application from ASP JScript
to .NET possibly requires some rewriting and definitely requires
retesting the application in it's entirety.

But as far as learning a language for development on Microsoft platforms
in the future, of the two languages JScript and VBScript, JScript is
your only choice. Of course C#, VB.NET, COBOL.NET and other languages
are also available.

Good Luck,
Michael D. Kersey

Jul 19 '05 #21

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

29 posts views Thread by Christopher Brandsdal | last post: by
15 posts views Thread by Laser Lu | last post: by
3 posts views Thread by Christopher Brandsdal | last post: by
16 posts views Thread by Mike Schinkel | last post: by
5 posts views Thread by gpence | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.