ASP VBscript vs Jscript

Discussion in 'ASP General' started by Harag, Dec 26, 2003.

  1. Harag

    Harag Guest

    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.
    Harag, Dec 26, 2003
    #1
    1. Advertising

  2. Harag

    TsiuWeng Ng Guest

    Hi,


    http://www.heferito.com/javascriptVSvbscript.asp
    maybe this link might be useful to you

    Regards,
    TsiuWeng

    Harag <> wrote in message news:<>...
    > 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.
    TsiuWeng Ng, Dec 26, 2003
    #2
    1. Advertising

  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" <> wrote in message
    news:...
    > 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.
    freaky friday, Dec 26, 2003
    #3
  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" <> wrote in message
    news:...
    > 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.
    Cowboy \(Gregory A. Beamer\), Dec 26, 2003
    #4
  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?
    freaky friday, Dec 26, 2003
    #5
  6. Harag

    Scott Guest

    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" <> wrote in

    message
    >news:...
    >> 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
    >
    >
    >.
    >
    Scott, Dec 26, 2003
    #6
  7. Harag

    Scott Guest

    Thanks Peter.


    >-----Original Message-----
    >"Scott" <> wrote in

    message
    >news:004f01c3cbe3$f09fb900$...
    >>
    >> 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
    >
    >
    >.
    >
    Scott, Dec 26, 2003
    #7
  8. Harag

    Chris Barber Guest

    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" <> wrote in message
    news:...
    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.
    Chris Barber, Dec 26, 2003
    #8
  9. Harag

    Chris Barber Guest

    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" <> wrote in message
    news:e%...
    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" <> wrote in message
    news:...
    > 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.
    Chris Barber, Dec 26, 2003
    #9
  10. Harag

    Harag Guest

    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"
    <> 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" <> wrote in message
    >news:...
    >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.
    >
    Harag, Dec 27, 2003
    #10
  11. Harag

    Guest Guest

    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" <> wrote in message
    news:...
    > 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.
    Guest, Dec 27, 2003
    #11
  12. > 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.
    freaky friday, Dec 27, 2003
    #12
  13. Harag

    Harag Guest

    On Sat, 27 Dec 2003 16:43:20 -0500, "freaky friday"
    <> 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.
    Harag, Dec 27, 2003
    #13
  14. Harag

    dlbjr Guest

    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
    dlbjr, Dec 28, 2003
    #14
  15. 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
    Michael D. Kersey, Dec 28, 2003
    #15
  16. <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.
    Dave Anderson, Dec 29, 2003
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon Maz
    Replies:
    4
    Views:
    1,261
    Jon Maz
    Sep 9, 2004
  2. Maxwell2006
    Replies:
    5
    Views:
    2,386
    Steven Cheng[MSFT]
    Mar 7, 2006
  3. Andrew Wan

    HELP: ASP JScript & VBScript interoperability

    Andrew Wan, Jun 15, 2007, in forum: ASP General
    Replies:
    1
    Views:
    122
    Anthony Jones
    Jun 15, 2007
  4. John Bentley
    Replies:
    14
    Views:
    345
    Jim Ley
    Feb 5, 2004
  5. VK
    Replies:
    4
    Views:
    351
    Thomas 'PointedEars' Lahn
    Jan 12, 2006
Loading...

Share This Page